You can subscribe to this list here.
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(14) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
(19) |
Feb
(8) |
Mar
(3) |
Apr
(3) |
May
(1) |
Jun
(1) |
Jul
(1) |
Aug
(3) |
Sep
(3) |
Oct
(5) |
Nov
(1) |
Dec
(1) |
|
From: <den...@us...> - 2010-12-03 20:33:31
|
Revision: 64
http://simcrs.svn.sourceforge.net/simcrs/?rev=64&view=rev
Author: denis_arnaud
Date: 2010-12-03 20:33:24 +0000 (Fri, 03 Dec 2010)
Log Message:
-----------
[StdAir API] Adapted the code to the new StdAir API.
Modified Paths:
--------------
trunk/simcrs/simcrs/SIMCRS_Service.hpp
trunk/simcrs/simcrs/batches/simcrs.cpp
trunk/simcrs/simcrs/command/DistributionManager.cpp
trunk/simcrs/simcrs/command/DistributionManager.hpp
trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
trunk/simcrs/simcrs/service/SIMCRS_ServiceContext.hpp
Modified: trunk/simcrs/simcrs/SIMCRS_Service.hpp
===================================================================
--- trunk/simcrs/simcrs/SIMCRS_Service.hpp 2010-11-02 16:02:32 UTC (rev 63)
+++ trunk/simcrs/simcrs/SIMCRS_Service.hpp 2010-12-03 20:33:24 UTC (rev 64)
@@ -5,7 +5,8 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// StdAir
-#include <stdair/STDAIR_Types.hpp>
+#include <stdair/stdair_basic_types.hpp>
+#include <stdair/stdair_service_types.hpp>
#include <stdair/bom/TravelSolutionTypes.hpp>
// SimCRS
#include <simcrs/SIMCRS_Types.hpp>
Modified: trunk/simcrs/simcrs/batches/simcrs.cpp
===================================================================
--- trunk/simcrs/simcrs/batches/simcrs.cpp 2010-11-02 16:02:32 UTC (rev 63)
+++ trunk/simcrs/simcrs/batches/simcrs.cpp 2010-12-03 20:33:24 UTC (rev 64)
@@ -8,6 +8,7 @@
#include <boost/tokenizer.hpp>
#include <boost/program_options.hpp>
// StdAir
+#include <stdair/stdair_basic_types.hpp>
#include <stdair/basic/BasLogParams.hpp>
#include <stdair/basic/BasDBParams.hpp>
#include <stdair/bom/TravelSolutionStruct.hpp>
Modified: trunk/simcrs/simcrs/command/DistributionManager.cpp
===================================================================
--- trunk/simcrs/simcrs/command/DistributionManager.cpp 2010-11-02 16:02:32 UTC (rev 63)
+++ trunk/simcrs/simcrs/command/DistributionManager.cpp 2010-12-03 20:33:24 UTC (rev 64)
@@ -12,6 +12,7 @@
#include <simcrs/command/DistributionManager.hpp>
namespace SIMCRS {
+
// ////////////////////////////////////////////////////////////////////
void DistributionManager::
getAvailability (const AIRINV::AIRINV_ServicePtr_Map_T& iAIRINV_ServiceMap,
@@ -20,7 +21,7 @@
for (stdair::TravelSolutionList_T::iterator itTS =
ioTravelSolutionList.begin();
itTS != ioTravelSolutionList.end(); ++itTS) {
- stdair::TravelSolutionStruct& lCurrentTravelSolution = *itTS;
+ //stdair::TravelSolutionStruct& lCurrentTravelSolution = *itTS;
}
}
@@ -38,7 +39,7 @@
iTravelSolution.getBookingClassKeyList();
stdair::ClassList_String_T::const_iterator itBookingClassKey =
lBookingClassKeyList.begin();
- for (stdair::KeyList_T::const_iterator itKey = lSegmentDateKeyList.begin();
+ for (stdair::KeyList_T::const_iterator itKey= lSegmentDateKeyList.begin();
itKey != lSegmentDateKeyList.end(); ++itKey, ++itBookingClassKey) {
const std::string& lSegmentDateKey = *itKey;
Modified: trunk/simcrs/simcrs/command/DistributionManager.hpp
===================================================================
--- trunk/simcrs/simcrs/command/DistributionManager.hpp 2010-11-02 16:02:32 UTC (rev 63)
+++ trunk/simcrs/simcrs/command/DistributionManager.hpp 2010-12-03 20:33:24 UTC (rev 64)
@@ -1,11 +1,11 @@
-#ifndef __SIMCRS_CMD_INDEXBUILDER_HPP
-#define __SIMCRS_CMD_INDEXBUILDER_HPP
+#ifndef __SIMCRS_CMD_DISTRIBUTIONMANAGER_HPP
+#define __SIMCRS_CMD_DISTRIBUTIONMANAGER_HPP
// //////////////////////////////////////////////////////////////////////
// Import section
// //////////////////////////////////////////////////////////////////////
-// STDAIR
-#include <stdair/STDAIR_Types.hpp>
+// StdAir
+#include <stdair/stdair_basic_types.hpp>
#include <stdair/bom/TravelSolutionTypes.hpp>
// Airinv
#include <airinv/AIRINV_Types.hpp>
@@ -19,13 +19,14 @@
namespace SIMCRS {
- /** Command wrapping the travel request process. */
+ /** Command wrapping the travel distribution (CRS/GDS) process. */
class DistributionManager {
friend class SIMCRS_Service;
private:
/** Get the availability for each travel solution in the list.. */
static void getAvailability (const AIRINV::AIRINV_ServicePtr_Map_T&,
- const CRSCode_T&, stdair::TravelSolutionList_T&);
+ const CRSCode_T&,
+ stdair::TravelSolutionList_T&);
/** Register a booking (segment sell). */
static void sell (const AIRINV::AIRINV_ServicePtr_Map_T&,
@@ -41,4 +42,4 @@
};
}
-#endif // __SIMCRS_CMD_INDEXBUILDER_HPP
+#endif // __SIMCRS_CMD_DISTRIBUTIONMANAGER_HPP
Modified: trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
===================================================================
--- trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-11-02 16:02:32 UTC (rev 63)
+++ trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-12-03 20:33:24 UTC (rev 64)
@@ -10,7 +10,7 @@
#include <boost/bind.hpp>
#include <boost/make_shared.hpp>
// Standard Airline Object Model
-#include <stdair/STDAIR_Types.hpp>
+#include <stdair/stdair_basic_types.hpp>
#include <stdair/basic/BasChronometer.hpp>
#include <stdair/basic/BasFileMgr.hpp>
#include <stdair/bom/BomManager.hpp>
@@ -309,7 +309,8 @@
}
// ////////////////////////////////////////////////////////////////////
- void SIMCRS_Service::getFare (stdair::TravelSolutionList_T& ioTravelSolutionList) {
+ void SIMCRS_Service::
+ getFare (stdair::TravelSolutionList_T& ioTravelSolutionList) {
if (_simcrsServiceContext == NULL) {
throw NonInitialisedServiceException();
@@ -318,9 +319,9 @@
SIMCRS_ServiceContext& lSIMCRS_ServiceContext= *_simcrsServiceContext;
try {
+
// Retrieve the CRS code
- const CRSCode_T& lCRSCode =
- lSIMCRS_ServiceContext.getCRSCode();
+ const CRSCode_T& lCRSCode = lSIMCRS_ServiceContext.getCRSCode();
// // TODO: optimise this part.
// // Retrieve the map/list of AIRINV_Services
@@ -338,8 +339,7 @@
} catch (const std::exception& error) {
STDAIR_LOG_ERROR ("Exception: " << error.what());
throw AvailabilityRetrievalException();
- }
-
+ }
}
// ////////////////////////////////////////////////////////////////////
@@ -363,6 +363,7 @@
SIMCRS_ServiceContext& lSIMCRS_ServiceContext= *_simcrsServiceContext;
try {
+
// Retrieve the CRS code
const CRSCode_T& lCRSCode =
lSIMCRS_ServiceContext.getCRSCode();
Modified: trunk/simcrs/simcrs/service/SIMCRS_ServiceContext.hpp
===================================================================
--- trunk/simcrs/simcrs/service/SIMCRS_ServiceContext.hpp 2010-11-02 16:02:32 UTC (rev 63)
+++ trunk/simcrs/simcrs/service/SIMCRS_ServiceContext.hpp 2010-12-03 20:33:24 UTC (rev 64)
@@ -10,7 +10,8 @@
// Boost
#include <boost/shared_ptr.hpp>
// StdAir
-#include <stdair/STDAIR_Types.hpp>
+#include <stdair/stdair_basic_types.hpp>
+#include <stdair/stdair_service_types.hpp>
// SimCRS
#include <simcrs/SIMCRS_Types.hpp>
#include <simcrs/service/ServiceAbstract.hpp>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gsa...@us...> - 2010-11-02 16:02:38
|
Revision: 63
http://simcrs.svn.sourceforge.net/simcrs/?rev=63&view=rev
Author: gsabatier
Date: 2010-11-02 16:02:32 +0000 (Tue, 02 Nov 2010)
Log Message:
-----------
[dev] Adapted to the new SimFQT interface.
Modified Paths:
--------------
trunk/simcrs/simcrs/SIMCRS_Service.hpp
trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
Modified: trunk/simcrs/simcrs/SIMCRS_Service.hpp
===================================================================
--- trunk/simcrs/simcrs/SIMCRS_Service.hpp 2010-10-20 12:59:20 UTC (rev 62)
+++ trunk/simcrs/simcrs/SIMCRS_Service.hpp 2010-11-02 16:02:32 UTC (rev 63)
@@ -91,6 +91,9 @@
// /////////// Business Methods /////////////
/** Get a list of travel solutions corresponding to the booking request. */
stdair::TravelSolutionList_T getTravelSolutions (const stdair::BookingRequestStruct&);
+
+ /** Get the fare for each travel solution in the list.. */
+ void getFare (stdair::TravelSolutionList_T&);
/** Get the availability for each travel solution in the list.. */
void getAvailability (stdair::TravelSolutionList_T&);
Modified: trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
===================================================================
--- trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-10-20 12:59:20 UTC (rev 62)
+++ trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-11-02 16:02:32 UTC (rev 63)
@@ -309,8 +309,8 @@
}
// ////////////////////////////////////////////////////////////////////
- void SIMCRS_Service::
- getAvailability (stdair::TravelSolutionList_T& ioTravelSolutionList) {
+ void SIMCRS_Service::getFare (stdair::TravelSolutionList_T& ioTravelSolutionList) {
+
if (_simcrsServiceContext == NULL) {
throw NonInitialisedServiceException();
}
@@ -339,7 +339,18 @@
STDAIR_LOG_ERROR ("Exception: " << error.what());
throw AvailabilityRetrievalException();
}
+
}
+
+ // ////////////////////////////////////////////////////////////////////
+ void SIMCRS_Service::
+ getAvailability (stdair::TravelSolutionList_T& ioTravelSolutionList) {
+ if (_simcrsServiceContext == NULL) {
+ throw NonInitialisedServiceException();
+ }
+ assert (_simcrsServiceContext != NULL);
+ SIMCRS_ServiceContext& lSIMCRS_ServiceContext= *_simcrsServiceContext;
+ }
// ////////////////////////////////////////////////////////////////////
void SIMCRS_Service::sell(const stdair::TravelSolutionStruct& iTravelSolution,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <den...@us...> - 2010-10-20 12:59:26
|
Revision: 62
http://simcrs.svn.sourceforge.net/simcrs/?rev=62&view=rev
Author: denis_arnaud
Date: 2010-10-20 12:59:20 +0000 (Wed, 20 Oct 2010)
Log Message:
-----------
[Dev] A batch/binary program has been created.
Modified Paths:
--------------
trunk/simcrs/simcrs/batches/Makefile.am
trunk/simcrs/simcrs/batches/sources.mk
Added Paths:
-----------
trunk/simcrs/simcrs/batches/simcrs.cpp
Property Changed:
----------------
trunk/simcrs/simcrs/batches/
Property changes on: trunk/simcrs/simcrs/batches
___________________________________________________________________
Modified: svn:ignore
- .deps
.libs
Makefile.in
Makefile
+ .deps
.libs
Makefile.in
Makefile
simcrs
simcrs.log
Modified: trunk/simcrs/simcrs/batches/Makefile.am
===================================================================
--- trunk/simcrs/simcrs/batches/Makefile.am 2010-10-14 16:42:36 UTC (rev 61)
+++ trunk/simcrs/simcrs/batches/Makefile.am 2010-10-20 12:59:20 UTC (rev 62)
@@ -7,10 +7,14 @@
MAINTAINERCLEANFILES = Makefile.in
# Binaries (batches)
-bin_PROGRAMS =
+bin_PROGRAMS = simcrs
-#airinv_SOURCES = $(batches_h_sources) $(batches_cc_sources)
-#airinv_CXXFLAGS = $(BOOST_CFLAGS)
-#airinv_LDADD =
-#airinv_LDFLAGS = $(BOOST_PROGRAM_OPTIONS_LIB) $(top_builddir)/airinv/core/libairinv.la
+simcrs_SOURCES = $(simcrs_batches_h_sources) $(simcrs_batches_cc_sources)
+simcrs_CXXFLAGS = $(BOOST_CFLAGS) $(STDAIR_CFLAGS)
+simcrs_LDADD =
+simcrs_LDFLAGS = $(BOOST_PROGRAM_OPTIONS_LIB) $(STDAIR_LIBS) \
+ $(top_builddir)/airinv/core/libairinv.la \
+ $(top_builddir)/airsched/core/libairsched.la \
+ $(top_builddir)/simfqt/core/libsimfqt.la \
+ $(top_builddir)/simcrs/core/libsimcrs.la
Added: trunk/simcrs/simcrs/batches/simcrs.cpp
===================================================================
--- trunk/simcrs/simcrs/batches/simcrs.cpp (rev 0)
+++ trunk/simcrs/simcrs/batches/simcrs.cpp 2010-10-20 12:59:20 UTC (rev 62)
@@ -0,0 +1,256 @@
+// STL
+#include <sstream>
+#include <fstream>
+#include <string>
+// Boost (Extended STL)
+#include <boost/date_time/posix_time/posix_time.hpp>
+#include <boost/date_time/gregorian/gregorian.hpp>
+#include <boost/tokenizer.hpp>
+#include <boost/program_options.hpp>
+// StdAir
+#include <stdair/basic/BasLogParams.hpp>
+#include <stdair/basic/BasDBParams.hpp>
+#include <stdair/bom/TravelSolutionStruct.hpp>
+// SimCRS
+#include <simcrs/SIMCRS_Service.hpp>
+#include <simcrs/config/simcrs-paths.hpp>
+
+// //////// Constants //////
+/** Default name and location for the log file. */
+const std::string K_SIMCRS_DEFAULT_LOG_FILENAME ("simcrs.log");
+
+/** Default name and location for the (CSV) schedule input file. */
+const std::string K_SIMCRS_DEFAULT_SCHEDULE_INPUT_FILENAME ("../../test/samples/schedule01.csv");
+
+/** Default name and location for the (CSV) O&D input file. */
+const std::string K_SIMCRS_DEFAULT_OND_INPUT_FILENAME ("../../test/samples/ond01.csv");
+
+/** Default name and location for the (CSV) fare input file. */
+const std::string K_SIMCRS_DEFAULT_FARE_INPUT_FILENAME ("../../test/samples/fare01.csv");
+
+
+/** Default name and location for the Xapian database. */
+const std::string K_SIMCRS_DEFAULT_DB_USER ("dsim");
+const std::string K_SIMCRS_DEFAULT_DB_PASSWD ("dsim");
+const std::string K_SIMCRS_DEFAULT_DB_DBNAME ("dsim");
+const std::string K_SIMCRS_DEFAULT_DB_HOST ("localhost");
+const std::string K_SIMCRS_DEFAULT_DB_PORT ("3306");
+
+// ///////// Parsing of Options & Configuration /////////
+// A helper function to simplify the main part.
+template<class T> std::ostream& operator<< (std::ostream& os,
+ const std::vector<T>& v) {
+ std::copy (v.begin(), v.end(), std::ostream_iterator<T> (std::cout, " "));
+ return os;
+}
+
+/** Early return status (so that it can be differentiated from an error). */
+const int K_SIMCRS_EARLY_RETURN_STATUS = 99;
+
+/** Read and parse the command line options. */
+int readConfiguration (int argc, char* argv[],
+ stdair::Filename_T& ioScheduleInputFilename,
+ stdair::Filename_T& ioOnDInputFilename,
+ stdair::Filename_T& ioFareInputFilename,
+ std::string& ioLogFilename,
+ std::string& ioDBUser, std::string& ioDBPasswd,
+ std::string& ioDBHost, std::string& ioDBPort,
+ std::string& ioDBDBName) {
+
+ // Declare a group of options that will be allowed only on command line
+ boost::program_options::options_description generic ("Generic options");
+ generic.add_options()
+ ("prefix", "print installation prefix")
+ ("version,v", "print version string")
+ ("help,h", "produce help message");
+
+ // Declare a group of options that will be allowed both on command
+ // line and in config file
+ boost::program_options::options_description config ("Configuration");
+ config.add_options()
+ ("schedule,s",
+ boost::program_options::value< std::string >(&ioScheduleInputFilename)->default_value(K_SIMCRS_DEFAULT_SCHEDULE_INPUT_FILENAME),
+ "(CVS) input file for the schedules")
+ ("ond,o",
+ boost::program_options::value< std::string >(&ioOnDInputFilename)->default_value(K_SIMCRS_DEFAULT_OND_INPUT_FILENAME),
+ "(CVS) input file for the O&D definitions")
+ ("fare,f",
+ boost::program_options::value< std::string >(&ioFareInputFilename)->default_value(K_SIMCRS_DEFAULT_FARE_INPUT_FILENAME),
+ "(CVS) input file for the fares")
+ ("log,l",
+ boost::program_options::value< std::string >(&ioLogFilename)->default_value(K_SIMCRS_DEFAULT_LOG_FILENAME),
+ "Filepath for the logs")
+ ("user,u",
+ boost::program_options::value< std::string >(&ioDBUser)->default_value(K_SIMCRS_DEFAULT_DB_USER),
+ "SQL database hostname (e.g., dsim)")
+ ("passwd,p",
+ boost::program_options::value< std::string >(&ioDBPasswd)->default_value(K_SIMCRS_DEFAULT_DB_PASSWD),
+ "SQL database hostname (e.g., dsim)")
+ ("host,H",
+ boost::program_options::value< std::string >(&ioDBHost)->default_value(K_SIMCRS_DEFAULT_DB_HOST),
+ "SQL database hostname (e.g., localhost)")
+ ("port,P",
+ boost::program_options::value< std::string >(&ioDBPort)->default_value(K_SIMCRS_DEFAULT_DB_PORT),
+ "SQL database port (e.g., 3306)")
+ ("dbname,m",
+ boost::program_options::value< std::string >(&ioDBDBName)->default_value(K_SIMCRS_DEFAULT_DB_DBNAME),
+ "SQL database name (e.g., dsim)")
+ ;
+
+ // Hidden options, will be allowed both on command line and
+ // in config file, but will not be shown to the user.
+ boost::program_options::options_description hidden ("Hidden options");
+ hidden.add_options()
+ ("copyright",
+ boost::program_options::value< std::vector<std::string> >(),
+ "Show the copyright (license)");
+
+ boost::program_options::options_description cmdline_options;
+ cmdline_options.add(generic).add(config).add(hidden);
+
+ boost::program_options::options_description config_file_options;
+ config_file_options.add(config).add(hidden);
+
+ boost::program_options::options_description visible ("Allowed options");
+ visible.add(generic).add(config);
+
+ boost::program_options::positional_options_description p;
+ p.add ("copyright", -1);
+
+ boost::program_options::variables_map vm;
+ boost::program_options::
+ store (boost::program_options::command_line_parser (argc, argv).
+ options (cmdline_options).positional(p).run(), vm);
+
+ std::ifstream ifs ("simcrs.cfg");
+ boost::program_options::store (parse_config_file (ifs, config_file_options),
+ vm);
+ boost::program_options::notify (vm);
+
+ if (vm.count ("help")) {
+ std::cout << visible << std::endl;
+ return K_SIMCRS_EARLY_RETURN_STATUS;
+ }
+
+ if (vm.count ("version")) {
+ std::cout << PACKAGE_NAME << ", version " << PACKAGE_VERSION << std::endl;
+ return K_SIMCRS_EARLY_RETURN_STATUS;
+ }
+
+ if (vm.count ("prefix")) {
+ std::cout << "Installation prefix: " << PREFIXDIR << std::endl;
+ return K_SIMCRS_EARLY_RETURN_STATUS;
+ }
+
+ if (vm.count ("schedule")) {
+ ioScheduleInputFilename = vm["schedule"].as< std::string >();
+ std::cout << "Schedule input filename is: " << ioScheduleInputFilename
+ << std::endl;
+ }
+
+ if (vm.count ("ond")) {
+ ioOnDInputFilename = vm["ond"].as< std::string >();
+ std::cout << "O&D input filename is: " << ioOnDInputFilename << std::endl;
+ }
+
+ if (vm.count ("fare")) {
+ ioFareInputFilename = vm["fare"].as< std::string >();
+ std::cout << "Fare input filename is: " << ioFareInputFilename << std::endl;
+ }
+
+ if (vm.count ("log")) {
+ ioLogFilename = vm["log"].as< std::string >();
+ std::cout << "Log filename is: " << ioLogFilename << std::endl;
+ }
+
+ if (vm.count ("user")) {
+ ioDBUser = vm["user"].as< std::string >();
+ std::cout << "SQL database user name is: " << ioDBUser << std::endl;
+ }
+
+ if (vm.count ("passwd")) {
+ ioDBPasswd = vm["passwd"].as< std::string >();
+ //std::cout << "SQL database user password is: " << ioDBPasswd << std::endl;
+ }
+
+ if (vm.count ("host")) {
+ ioDBHost = vm["host"].as< std::string >();
+ std::cout << "SQL database host name is: " << ioDBHost << std::endl;
+ }
+
+ if (vm.count ("port")) {
+ ioDBPort = vm["port"].as< std::string >();
+ std::cout << "SQL database port number is: " << ioDBPort << std::endl;
+ }
+
+ if (vm.count ("dbname")) {
+ ioDBDBName = vm["dbname"].as< std::string >();
+ std::cout << "SQL database name is: " << ioDBDBName << std::endl;
+ }
+
+ return 0;
+}
+
+// ///////// M A I N ////////////
+int main (int argc, char* argv[]) {
+
+ // Schedule input filename
+ std::string lScheduleInputFilename;
+
+ // O&D input filename
+ std::string lOnDInputFilename;
+
+ // Fare input filename
+ std::string lFareInputFilename;
+
+ // Output log File
+ std::string lLogFilename;
+
+ // SQL database parameters
+ std::string lDBUser;
+ std::string lDBPasswd;
+ std::string lDBHost;
+ std::string lDBPort;
+ std::string lDBDBName;
+
+ // CRS code
+ std::string lCRSCode ("1P");
+
+ // Airline code
+ // std::string lAirlineCode ("BA");
+
+ // Number of passengers in the travelling group
+ // stdair::PartySize_T lPartySize = 5;
+
+ // Call the command-line option parser
+ const int lOptionParserStatus =
+ readConfiguration (argc, argv, lScheduleInputFilename, lOnDInputFilename,
+ lFareInputFilename, lLogFilename,
+ lDBUser, lDBPasswd, lDBHost, lDBPort, lDBDBName);
+
+ if (lOptionParserStatus == K_SIMCRS_EARLY_RETURN_STATUS) {
+ return 0;
+ }
+
+ // Set the database parameters
+ const stdair::BasDBParams lDBParams (lDBUser, lDBPasswd, lDBHost, lDBPort,
+ lDBDBName);
+
+ // Set the log parameters
+ std::ofstream logOutputFile;
+ // Open and clean the log outputfile
+ logOutputFile.open (lLogFilename.c_str());
+ logOutputFile.clear();
+
+ // Initialise the list of classes/buckets
+ const stdair::BasLogParams lLogParams (stdair::LOG::DEBUG, logOutputFile);
+ SIMCRS::SIMCRS_Service simcrsService (lLogParams, lCRSCode,
+ lScheduleInputFilename,
+ lOnDInputFilename,
+ lFareInputFilename);
+
+ // Make a booking
+ //simcrsService.sell (lAirlineCode, lPartySize);
+
+ return 0;
+}
Modified: trunk/simcrs/simcrs/batches/sources.mk
===================================================================
--- trunk/simcrs/simcrs/batches/sources.mk 2010-10-14 16:42:36 UTC (rev 61)
+++ trunk/simcrs/simcrs/batches/sources.mk 2010-10-20 12:59:20 UTC (rev 62)
@@ -1,2 +1,2 @@
-batches_h_sources =
-batches_cc_sources =
+simcrs_batches_h_sources =
+simcrs_batches_cc_sources = $(top_srcdir)/simcrs/batches/simcrs.cpp
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qua...@us...> - 2010-10-14 16:42:42
|
Revision: 61
http://simcrs.svn.sourceforge.net/simcrs/?rev=61&view=rev
Author: quannaus
Date: 2010-10-14 16:42:36 +0000 (Thu, 14 Oct 2010)
Log Message:
-----------
[dev] Added the OnD file to airsched.
Modified Paths:
--------------
trunk/simcrs/simcrs/SIMCRS_Service.hpp
trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
Modified: trunk/simcrs/simcrs/SIMCRS_Service.hpp
===================================================================
--- trunk/simcrs/simcrs/SIMCRS_Service.hpp 2010-10-14 14:27:05 UTC (rev 60)
+++ trunk/simcrs/simcrs/SIMCRS_Service.hpp 2010-10-14 16:42:36 UTC (rev 61)
@@ -137,8 +137,10 @@
const stdair::Filename_T& iFareInputFilename);
/** Initialise the AIRSCHED service with the given schedule file.
- @param const stdair::Filename_T& Filename of the input schedule file. */
- void initAIRSCHEDService (const stdair::Filename_T& iScheduleInputFilename);
+ @param const stdair::Filename_T& Filename of the input schedule file.
+ @param const stdair::Filename_T& Filename of the input O&D file. */
+ void initAIRSCHEDService (const stdair::Filename_T&,
+ const stdair::Filename_T&);
/** Initialise the SIMFQT service with the given schedule file.
@param const stdair::Filename_T& Filename of the input schedule file. */
Modified: trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
===================================================================
--- trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-10-14 14:27:05 UTC (rev 60)
+++ trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-10-14 16:42:36 UTC (rev 61)
@@ -174,7 +174,7 @@
}
// Initialise the children AirSched service context
- initAIRSCHEDService (iScheduleInputFilename);
+ initAIRSCHEDService (iScheduleInputFilename, iODInputFilename);
// Initialise the children AirSched service context
initAIRINV_Master_Service (iScheduleInputFilename, iODInputFilename);
@@ -186,7 +186,8 @@
// ////////////////////////////////////////////////////////////////////
void SIMCRS_Service::
- initAIRSCHEDService (const stdair::Filename_T& iScheduleInputFilename) {
+ initAIRSCHEDService (const stdair::Filename_T& iScheduleInputFilename,
+ const stdair::Filename_T& iODInputFilename) {
// Retrieve the SimCRS service context
assert (_simcrsServiceContext != NULL);
@@ -203,7 +204,8 @@
// referenced (e.g., at the end of the process).
AIRSCHED_ServicePtr_T lAIRSCHED_Service_ptr =
boost::make_shared<AIRSCHED::AIRSCHED_Service> (lSTDAIR_Service_ptr,
- iScheduleInputFilename);
+ iScheduleInputFilename,
+ iODInputFilename);
// Store the AirSched service object within the (SimCRS) service context
lSIMCRS_ServiceContext.setAIRSCHED_Service (lAIRSCHED_Service_ptr);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <den...@us...> - 2010-10-14 14:27:11
|
Revision: 60
http://simcrs.svn.sourceforge.net/simcrs/?rev=60&view=rev
Author: denis_arnaud
Date: 2010-10-14 14:27:05 +0000 (Thu, 14 Oct 2010)
Log Message:
-----------
[Test] Fixed the running error of the SimCRS test.
Modified Paths:
--------------
trunk/simcrs/Makefile.am
trunk/simcrs/test/simcrs/CRSTestSuite.cpp
trunk/simcrs/test/simcrs/Makefile.am
Modified: trunk/simcrs/Makefile.am
===================================================================
--- trunk/simcrs/Makefile.am 2010-10-14 11:54:59 UTC (rev 59)
+++ trunk/simcrs/Makefile.am 2010-10-14 14:27:05 UTC (rev 60)
@@ -30,7 +30,7 @@
EXTRA_DIST =
# Build in these directories:
-SUBDIRS = airsched airinv simcrs $(TEST_DIR)
+SUBDIRS = airsched airinv simfqt simcrs $(TEST_DIR)
# Configuration helpers
Modified: trunk/simcrs/test/simcrs/CRSTestSuite.cpp
===================================================================
--- trunk/simcrs/test/simcrs/CRSTestSuite.cpp 2010-10-14 11:54:59 UTC (rev 59)
+++ trunk/simcrs/test/simcrs/CRSTestSuite.cpp 2010-10-14 14:27:05 UTC (rev 60)
@@ -37,6 +37,12 @@
// Schedule input filename
std::string lScheduleFilename ("../samples/schedule01.csv");
+ // O&D input filename
+ std::string lOnDFilename ("../samples/ond01.csv");
+
+ // Fare input filename
+ std::string lFareFilename ("../samples/fare01.csv");
+
// Set the log parameters
std::ofstream logOutputFile;
// Open and clean the log outputfile
@@ -46,7 +52,8 @@
// Initialise the list of classes/buckets
const stdair::BasLogParams lLogParams (stdair::LOG::DEBUG, logOutputFile);
SIMCRS::SIMCRS_Service simcrsService (lLogParams, lCRSCode,
- lScheduleFilename);
+ lScheduleFilename, lOnDFilename,
+ lFareFilename);
// Make a booking
//simcrsService.sell (lAirlineCode, lPartySize);
Modified: trunk/simcrs/test/simcrs/Makefile.am
===================================================================
--- trunk/simcrs/test/simcrs/Makefile.am 2010-10-14 11:54:59 UTC (rev 59)
+++ trunk/simcrs/test/simcrs/Makefile.am 2010-10-14 14:27:05 UTC (rev 60)
@@ -19,5 +19,6 @@
CRSTestSuite_LDADD =
CRSTestSuite_LDFLAGS = \
$(BOOST_LIBS) $(CPPUNIT_LIBS) $(EXTRACC_LIBS) $(STDAIR_LIBS) \
+ $(top_builddir)/simfqt/core/libsimfqt.la \
$(top_builddir)/simcrs/core/libsimcrs.la
# $(top_builddir)/airinv/core/libairinv.la
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <den...@us...> - 2010-10-14 11:55:06
|
Revision: 59
http://simcrs.svn.sourceforge.net/simcrs/?rev=59&view=rev
Author: denis_arnaud
Date: 2010-10-14 11:54:59 +0000 (Thu, 14 Oct 2010)
Log Message:
-----------
[Dev] Fixed compilation errors, by referring to (Subversion) external SimFQT project.
Modified Paths:
--------------
trunk/simcrs/configure.ac
trunk/simcrs/simcrs/SIMCRS_Service.hpp
trunk/simcrs/test/Makefile.am
Property Changed:
----------------
trunk/simcrs/
trunk/simcrs/test/
Property changes on: trunk/simcrs
___________________________________________________________________
Modified: svn:externals
- config https://stdair.svn.sourceforge.net/svnroot/stdair/trunk/stdair/config
airsched https://air-sched.svn.sourceforge.net/svnroot/air-sched/trunk/airsched/airsched
airinv https://airinv.svn.sourceforge.net/svnroot/airinv/trunk/airinv/airinv
+ config https://stdair.svn.sourceforge.net/svnroot/stdair/trunk/stdair/config
airsched https://air-sched.svn.sourceforge.net/svnroot/air-sched/trunk/airsched/airsched
airinv https://airinv.svn.sourceforge.net/svnroot/airinv/trunk/airinv/airinv
simfqt https://simfqt.svn.sourceforge.net/svnroot/simfqt/trunk/simfqt/simfqt
Modified: trunk/simcrs/configure.ac
===================================================================
--- trunk/simcrs/configure.ac 2010-10-13 13:31:08 UTC (rev 58)
+++ trunk/simcrs/configure.ac 2010-10-14 11:54:59 UTC (rev 59)
@@ -272,6 +272,15 @@
airinv/core/Makefile
airinv/batches/Makefile
airinv/server/Makefile
+ simfqt/Makefile
+ simfqt/basic/Makefile
+ simfqt/bom/Makefile
+ simfqt/factory/Makefile
+ simfqt/command/Makefile
+ simfqt/service/Makefile
+ simfqt/config/Makefile
+ simfqt/core/Makefile
+ simfqt/batches/Makefile
simcrs/Makefile
simcrs/basic/Makefile
simcrs/bom/Makefile
@@ -285,6 +294,7 @@
test/samples/Makefile
test/airsched/Makefile
test/airinv/Makefile
+ test/simfqt/Makefile
test/simcrs/Makefile
)
AC_OUTPUT
Modified: trunk/simcrs/simcrs/SIMCRS_Service.hpp
===================================================================
--- trunk/simcrs/simcrs/SIMCRS_Service.hpp 2010-10-13 13:31:08 UTC (rev 58)
+++ trunk/simcrs/simcrs/SIMCRS_Service.hpp 2010-10-14 11:54:59 UTC (rev 59)
@@ -44,8 +44,10 @@
@param const stdair::Filename_T& Filename of the input O&D file.
@param const stdair::Filename_T& Filename of the input fare file. */
SIMCRS_Service (const stdair::BasLogParams&, const stdair::BasDBParams&,
- const CRSCode_T&, const stdair::Filename_T&,
- const stdair::Filename_T&, const stdair::Filename_T&);
+ const CRSCode_T&,
+ const stdair::Filename_T& iScheduleInputFilename,
+ const stdair::Filename_T& iODInputFilename,
+ const stdair::Filename_T& iFareInputFilename);
/** Constructor.
<br>The init() method is called; see the corresponding documentation
@@ -58,8 +60,9 @@
@param const stdair::Filename_T& Filename of the input O&D file.
@param const stdair::Filename_T& Filename of the input fare file. */
SIMCRS_Service (const stdair::BasLogParams&, const CRSCode_T&,
- const stdair::Filename_T&, const stdair::Filename_T&,
- const stdair::Filename_T&);
+ const stdair::Filename_T& iScheduleInputFilename,
+ const stdair::Filename_T& iODInputFilename,
+ const stdair::Filename_T& iFareInputFilename);
/** Constructor.
<br>The init() method is called; see the corresponding documentation
@@ -76,8 +79,9 @@
@param const stdair::Filename_T& Filename of the input O&D file.
@param const stdair::Filename_T& Filename of the input fare file. */
SIMCRS_Service (stdair::STDAIR_ServicePtr_T, const CRSCode_T&,
- const stdair::Filename_T&, const stdair::Filename_T&,
- const stdair::Filename_T&);
+ const stdair::Filename_T& iScheduleInputFilename,
+ const stdair::Filename_T& iODInputFilename,
+ const stdair::Filename_T& iFareInputFilename);
/** Destructor. */
~SIMCRS_Service();
@@ -143,8 +147,8 @@
/** Initialise the AIRINV Master service with the given schedule file.
@param const stdair::Filename_T& Filename of the input schedule file.
@param const stdair::Filename_T& Filename of the input O&D file. */
- void initAIRINV_Master_Service (const stdair::Filename_T&,
- const stdair::Filename_T&);
+ void initAIRINV_Master_Service (const stdair::Filename_T& iScheduleInputFilename,
+ const stdair::Filename_T& iODInputFilename);
/** Finalise. */
void finalise ();
@@ -158,4 +162,3 @@
};
}
#endif // __SIMCRS_SVC_SIMCRS_SERVICE_HPP
-
Property changes on: trunk/simcrs/test
___________________________________________________________________
Modified: svn:externals
- samples https://stdair.svn.sourceforge.net/svnroot/stdair/trunk/stdair/test/samples
airsched https://air-sched.svn.sourceforge.net/svnroot/air-sched/trunk/airsched/test/airsched
airinv https://airinv.svn.sourceforge.net/svnroot/airinv/trunk/airinv/test/airinv
+ samples https://stdair.svn.sourceforge.net/svnroot/stdair/trunk/stdair/test/samples
airsched https://air-sched.svn.sourceforge.net/svnroot/air-sched/trunk/airsched/test/airsched
airinv https://airinv.svn.sourceforge.net/svnroot/airinv/trunk/airinv/test/airinv
simfqt https://simfqt.svn.sourceforge.net/svnroot/simfqt/trunk/simfqt/test/simfqt
Modified: trunk/simcrs/test/Makefile.am
===================================================================
--- trunk/simcrs/test/Makefile.am 2010-10-13 13:31:08 UTC (rev 58)
+++ trunk/simcrs/test/Makefile.am 2010-10-14 11:54:59 UTC (rev 59)
@@ -4,7 +4,7 @@
MAINTAINERCLEANFILES = Makefile.in
##
-SUBDIRS = samples airsched airinv simcrs
+SUBDIRS = samples airsched airinv simfqt simcrs
EXTRA_DIST =
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qua...@us...> - 2010-10-13 13:31:14
|
Revision: 58
http://simcrs.svn.sourceforge.net/simcrs/?rev=58&view=rev
Author: quannaus
Date: 2010-10-13 13:31:08 +0000 (Wed, 13 Oct 2010)
Log Message:
-----------
[dev] Added input files in AIRINV and SIMFQT.
Modified Paths:
--------------
trunk/simcrs/simcrs/SIMCRS_Service.hpp
trunk/simcrs/simcrs/command/DistributionManager.cpp
trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
trunk/simcrs/simcrs/service/SIMCRS_ServiceContext.cpp
trunk/simcrs/simcrs/service/SIMCRS_ServiceContext.hpp
Modified: trunk/simcrs/simcrs/SIMCRS_Service.hpp
===================================================================
--- trunk/simcrs/simcrs/SIMCRS_Service.hpp 2010-09-15 13:05:51 UTC (rev 57)
+++ trunk/simcrs/simcrs/SIMCRS_Service.hpp 2010-10-13 13:31:08 UTC (rev 58)
@@ -40,9 +40,12 @@
@param const stdair::BasLogParams& Parameters for the output log stream.
@param const stdair::BasDBParams& Parameters for the database access.
@param const CRSCode_T& Code of the owner of the distribution system.
- @param const stdair::Filename_T& Filename of the input schedule file. */
+ @param const stdair::Filename_T& Filename of the input schedule file.
+ @param const stdair::Filename_T& Filename of the input O&D file.
+ @param const stdair::Filename_T& Filename of the input fare file. */
SIMCRS_Service (const stdair::BasLogParams&, const stdair::BasDBParams&,
- const CRSCode_T&, const stdair::Filename_T&);
+ const CRSCode_T&, const stdair::Filename_T&,
+ const stdair::Filename_T&, const stdair::Filename_T&);
/** Constructor.
<br>The init() method is called; see the corresponding documentation
@@ -51,9 +54,12 @@
that log outputs can be directed onto that stream.
@param const stdair::BasLogParams& Parameters for the output log stream.
@param const CRSCode_T& Code of the owner of the distribution system.
- @param const stdair::Filename_T& Filename of the input schedule file. */
- SIMCRS_Service (const stdair::BasLogParams&,
- const CRSCode_T&, const stdair::Filename_T&);
+ @param const stdair::Filename_T& Filename of the input schedule file.
+ @param const stdair::Filename_T& Filename of the input O&D file.
+ @param const stdair::Filename_T& Filename of the input fare file. */
+ SIMCRS_Service (const stdair::BasLogParams&, const CRSCode_T&,
+ const stdair::Filename_T&, const stdair::Filename_T&,
+ const stdair::Filename_T&);
/** Constructor.
<br>The init() method is called; see the corresponding documentation
@@ -66,9 +72,12 @@
DSIM_Service).
@param stdair::STDAIR_ServicePtr_T Reference on the STDAIR service.
@param const CRSCode_T& Code of the owner of the distribution system.
- @param const stdair::Filename_T& Filename of the input schedule file. */
- SIMCRS_Service (stdair::STDAIR_ServicePtr_T,
- const CRSCode_T&, const stdair::Filename_T&);
+ @param const stdair::Filename_T& Filename of the input schedule file.
+ @param const stdair::Filename_T& Filename of the input O&D file.
+ @param const stdair::Filename_T& Filename of the input fare file. */
+ SIMCRS_Service (stdair::STDAIR_ServicePtr_T, const CRSCode_T&,
+ const stdair::Filename_T&, const stdair::Filename_T&,
+ const stdair::Filename_T&);
/** Destructor. */
~SIMCRS_Service();
@@ -116,17 +125,26 @@
/** Initialise.
<br>The CSV file, describing the airline schedules for the
simulator, is parsed and the inventories are generated accordingly.
- @param const stdair::Filename_T& Filename of the input schedule file. */
- void init (const stdair::Filename_T& iScheduleInputFilename);
+ @param const stdair::Filename_T& Filename of the input schedule file.
+ @param const stdair::Filename_T& Filename of the input O&D file.
+ @param const stdair::Filename_T& Filename of the input fare file. */
+ void init (const stdair::Filename_T& iScheduleInputFilename,
+ const stdair::Filename_T& iODInputFilename,
+ const stdair::Filename_T& iFareInputFilename);
/** Initialise the AIRSCHED service with the given schedule file.
@param const stdair::Filename_T& Filename of the input schedule file. */
void initAIRSCHEDService (const stdair::Filename_T& iScheduleInputFilename);
+
+ /** Initialise the SIMFQT service with the given schedule file.
+ @param const stdair::Filename_T& Filename of the input schedule file. */
+ void initSIMFQTService (const stdair::Filename_T& iFareInputFilename);
- /** Initialise the list of AIRINV services.
- <br>After having initialised the AIRSCHED service, parse the list of
- airline inventories and build a AIRINV service for each airline. */
- void initAIRINVServices ();
+ /** Initialise the AIRINV Master service with the given schedule file.
+ @param const stdair::Filename_T& Filename of the input schedule file.
+ @param const stdair::Filename_T& Filename of the input O&D file. */
+ void initAIRINV_Master_Service (const stdair::Filename_T&,
+ const stdair::Filename_T&);
/** Finalise. */
void finalise ();
Modified: trunk/simcrs/simcrs/command/DistributionManager.cpp
===================================================================
--- trunk/simcrs/simcrs/command/DistributionManager.cpp 2010-09-15 13:05:51 UTC (rev 57)
+++ trunk/simcrs/simcrs/command/DistributionManager.cpp 2010-10-13 13:31:08 UTC (rev 58)
@@ -58,8 +58,7 @@
const stdair::ClassCode_T lClassCode (ostr.str());
lAirinvService_ptr->sell (lSegmentDateKey, lClassCode, iPartySize);
}
-
-
+
// DEBUG
// STDAIR_LOG_DEBUG ("The booking has been made");
Modified: trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
===================================================================
--- trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-09-15 13:05:51 UTC (rev 57)
+++ trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-10-13 13:31:08 UTC (rev 58)
@@ -20,9 +20,11 @@
#include <stdair/service/Logger.hpp>
#include <stdair/STDAIR_Service.hpp>
// Airline Inventory
-#include <airinv/AIRINV_Service.hpp>
+#include <airinv/AIRINV_Master_Service.hpp>
// Airline Schedule
#include <airsched/AIRSCHED_Service.hpp>
+// Fare Quote
+#include <simfqt/SIMFQT_Service.hpp>
// Simcrs
#include <simcrs/basic/BasConst_SIMCRS_Service.hpp>
#include <simcrs/command/DistributionManager.hpp>
@@ -46,7 +48,9 @@
SIMCRS_Service::
SIMCRS_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr,
const CRSCode_T& iCRSCode,
- const stdair::Filename_T& iScheduleInputFilename)
+ const stdair::Filename_T& iScheduleInputFilename,
+ const stdair::Filename_T& iODInputFilename,
+ const stdair::Filename_T& iFareInputFilename)
: _simcrsServiceContext (NULL) {
// Initialise the service context
@@ -60,7 +64,7 @@
lSIMCRS_ServiceContext.setSTDAIR_Service (ioSTDAIR_ServicePtr);
// Initialise the context
- init (iScheduleInputFilename);
+ init (iScheduleInputFilename, iODInputFilename, iFareInputFilename);
}
// ////////////////////////////////////////////////////////////////////
@@ -68,7 +72,9 @@
SIMCRS_Service (const stdair::BasLogParams& iLogParams,
const stdair::BasDBParams& iDBParams,
const CRSCode_T& iCRSCode,
- const stdair::Filename_T& iScheduleInputFilename)
+ const stdair::Filename_T& iScheduleInputFilename,
+ const stdair::Filename_T& iODInputFilename,
+ const stdair::Filename_T& iFareInputFilename)
: _simcrsServiceContext (NULL) {
// Initialise the service context
@@ -78,14 +84,16 @@
initStdAirService (iLogParams, iDBParams);
// Initialise the (remaining of the) context
- init (iScheduleInputFilename);
+ init (iScheduleInputFilename, iODInputFilename, iFareInputFilename);
}
// ////////////////////////////////////////////////////////////////////
SIMCRS_Service::
SIMCRS_Service (const stdair::BasLogParams& iLogParams,
const CRSCode_T& iCRSCode,
- const stdair::Filename_T& iScheduleInputFilename)
+ const stdair::Filename_T& iScheduleInputFilename,
+ const stdair::Filename_T& iODInputFilename,
+ const stdair::Filename_T& iFareInputFilename)
: _simcrsServiceContext (NULL) {
// Initialise the service context
@@ -95,7 +103,7 @@
initStdAirService (iLogParams);
// Initialise the (remaining of the) context
- init (iScheduleInputFilename);
+ init (iScheduleInputFilename, iODInputFilename, iFareInputFilename);
}
// ////////////////////////////////////////////////////////////////////
@@ -152,7 +160,9 @@
}
// ////////////////////////////////////////////////////////////////////
- void SIMCRS_Service::init (const stdair::Filename_T& iScheduleInputFilename) {
+ void SIMCRS_Service::init (const stdair::Filename_T& iScheduleInputFilename,
+ const stdair::Filename_T& iODInputFilename,
+ const stdair::Filename_T& iFareInputFilename) {
// Check that the file path given as input corresponds to an actual file
const bool doesExistAndIsReadable =
@@ -166,8 +176,12 @@
// Initialise the children AirSched service context
initAIRSCHEDService (iScheduleInputFilename);
- // Initialise the children AirInv service context
- initAIRINVServices ();
+ // Initialise the children AirSched service context
+ initAIRINV_Master_Service (iScheduleInputFilename, iODInputFilename);
+
+
+ // Initialise the children SimFQT service context
+ initSIMFQTService (iFareInputFilename);
}
// ////////////////////////////////////////////////////////////////////
@@ -196,8 +210,9 @@
}
// ////////////////////////////////////////////////////////////////////
- void SIMCRS_Service::initAIRINVServices () {
-
+ void SIMCRS_Service::
+ initSIMFQTService (const stdair::Filename_T& iFareInputFilename) {
+
// Retrieve the SimCRS service context
assert (_simcrsServiceContext != NULL);
SIMCRS_ServiceContext& lSIMCRS_ServiceContext = *_simcrsServiceContext;
@@ -206,33 +221,44 @@
stdair::STDAIR_ServicePtr_T lSTDAIR_Service_ptr =
lSIMCRS_ServiceContext.getSTDAIR_Service();
assert (lSTDAIR_Service_ptr != NULL);
+
+ // Initialise the SIMFQT service handler
+ // Note that the (Boost.)Smart Pointer keeps track of the references
+ // on the Service object, and deletes that object when it is no longer
+ // referenced (e.g., at the end of the process).
+ SIMFQT_ServicePtr_T lSIMFQT_Service_ptr =
+ boost::make_shared<SIMFQT::SIMFQT_Service> (lSTDAIR_Service_ptr,
+ iFareInputFilename);
+
+ // Store the Simfqt service object within the (SimCRS) service context
+ lSIMCRS_ServiceContext.setSIMFQT_Service (lSIMFQT_Service_ptr);
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ void SIMCRS_Service::
+ initAIRINV_Master_Service (const stdair::Filename_T& iScheduleInputFilename,
+ const stdair::Filename_T& iODInputFilename) {
- // Retrieve, from the StdAir service context, the root of the BOM tree
- stdair::BomRoot& lBomRoot = lSTDAIR_Service_ptr->getBomRoot();
+ // Retrieve the SimCRS service context
+ assert (_simcrsServiceContext != NULL);
+ SIMCRS_ServiceContext& lSIMCRS_ServiceContext = *_simcrsServiceContext;
- // Retrieve the list of Inventory objects: one per airline
- const stdair::InventoryMap_T& lInventoryMap =
- stdair::BomManager::getMap<stdair::Inventory> (lBomRoot);
-
- // Browse the inventory map and initialise the corresponding
- // AirInv services.
- for (stdair::InventoryMap_T::const_iterator itInv = lInventoryMap.begin();
- itInv != lInventoryMap.end(); ++itInv) {
- const stdair::AirlineCode_T& lAirlineCode = itInv->first;
+ // Retrieve the StdAir service context
+ stdair::STDAIR_ServicePtr_T lSTDAIR_Service_ptr =
+ lSIMCRS_ServiceContext.getSTDAIR_Service();
+ assert (lSTDAIR_Service_ptr != NULL);
- // Build an AirInv service instance, tracked by a Boost SmartPointer
- AIRINV_ServicePtr_T lAIRINV_Service_ptr =
- AIRINV_ServicePtr_T (new AIRINV::AIRINV_Service (lSTDAIR_Service_ptr,
- lAirlineCode));
+ // Initialise the AIRINV service handler
+ // Note that the (Boost.)Smart Pointer keeps track of the references
+ // on the Service object, and deletes that object when it is no longer
+ // referenced (e.g., at the end of the process).
+ AIRINV_Master_ServicePtr_T lAIRINV_Master_Service_ptr =
+ boost::make_shared<AIRINV::AIRINV_Master_Service> (lSTDAIR_Service_ptr,
+ iScheduleInputFilename,
+ iODInputFilename);
- // TODO: Understand why the following does not compile
- // boost::make_shared<AIRINV::AIRINV_Service> (lSTDAIR_Service_ptr,
- // lAirlineCode, lCurrentInv);
-
- // Store the AirInv service object within the (SimCRS) service context
- lSIMCRS_ServiceContext.addAIRINV_Service (lAirlineCode,
- lAIRINV_Service_ptr);
- }
+ // Store the Airinv service object within the (SimCRS) service context
+ lSIMCRS_ServiceContext.setAIRINV_Master_Service (lAIRINV_Master_Service_ptr);
}
// ////////////////////////////////////////////////////////////////////
@@ -294,17 +320,17 @@
const CRSCode_T& lCRSCode =
lSIMCRS_ServiceContext.getCRSCode();
- // TODO: optimise this part.
- // Retrieve the map/list of AIRINV_Services
- const AIRINV_ServicePtr_Map_T& lAIRINV_ServiceMap =
- lSIMCRS_ServiceContext.getAIRINV_ServiceMap ();
+ // // TODO: optimise this part.
+ // // Retrieve the map/list of AIRINV_Services
+ // const AIRINV_ServicePtr_Map_T& lAIRINV_ServiceMap =
+ // lSIMCRS_ServiceContext.getAIRINV_ServiceMap ();
- // Delegate the action to the dedicated command
- stdair::BasChronometer lAvailabilityRetrievalChronometer;
- lAvailabilityRetrievalChronometer.start();
- DistributionManager::getAvailability (lAIRINV_ServiceMap,
- lCRSCode, ioTravelSolutionList);
- // const double lAvailabilityRetrievalMeasure =
+ // // Delegate the action to the dedicated command
+ // stdair::BasChronometer lAvailabilityRetrievalChronometer;
+ // lAvailabilityRetrievalChronometer.start();
+ // DistributionManager::getAvailability (lAIRINV_ServiceMap,
+ // lCRSCode, ioTravelSolutionList);
+ // // const double lAvailabilityRetrievalMeasure =
// lAvailabilityRetrievalChronometer.elapsed();
} catch (const std::exception& error) {
@@ -328,16 +354,16 @@
const CRSCode_T& lCRSCode =
lSIMCRS_ServiceContext.getCRSCode();
- // TODO: optimise this part.
- // Retrieve the map/list of AIRINV_Services
- const AIRINV_ServicePtr_Map_T& lAIRINV_ServiceMap =
- lSIMCRS_ServiceContext.getAIRINV_ServiceMap ();
+ // // TODO: optimise this part.
+ // // Retrieve the map/list of AIRINV_Services
+ // const AIRINV_ServicePtr_Map_T& lAIRINV_ServiceMap =
+ // lSIMCRS_ServiceContext.getAIRINV_ServiceMap ();
- // Delegate the booking to the dedicated command
- stdair::BasChronometer lSellChronometer;
- lSellChronometer.start();
- DistributionManager::sell (lAIRINV_ServiceMap,
- lCRSCode, iTravelSolution, iPartySize);
+ // // Delegate the booking to the dedicated command
+ // stdair::BasChronometer lSellChronometer;
+ // lSellChronometer.start();
+ // DistributionManager::sell (lAIRINV_ServiceMap,
+ // lCRSCode, iTravelSolution, iPartySize);
// DEBUG
// const double lSellMeasure = lSellChronometer.elapsed();
Modified: trunk/simcrs/simcrs/service/SIMCRS_ServiceContext.cpp
===================================================================
--- trunk/simcrs/simcrs/service/SIMCRS_ServiceContext.cpp 2010-09-15 13:05:51 UTC (rev 57)
+++ trunk/simcrs/simcrs/service/SIMCRS_ServiceContext.cpp 2010-10-13 13:31:08 UTC (rev 58)
@@ -46,36 +46,4 @@
oStr << shortDisplay();
return oStr.str();
}
-
- // //////////////////////////////////////////////////////////////////////
- AIRINV_ServicePtr_T SIMCRS_ServiceContext::
- getAIRINV_Service (const stdair::AirlineCode_T& iAirlineCode) const {
- AIRINV_ServicePtr_Map_T::const_iterator itValueType =
- _airinvServiceMap.find (iAirlineCode);
-
- if (itValueType == _airinvServiceMap.end()) {
- STDAIR_LOG_ERROR ("Cannot find the Inventory service (AIRINV_Service) for"
- << "the given airline: " << iAirlineCode
- << ". By design, it should not happen.");
- assert (false);
- }
-
- AIRINV_ServicePtr_T oAIRINV_Service_ptr = itValueType->second;
- return oAIRINV_Service_ptr;
- }
-
- // //////////////////////////////////////////////////////////////////////
- void SIMCRS_ServiceContext::
- addAIRINV_Service (const stdair::AirlineCode_T& iAirlineCode,
- AIRINV_ServicePtr_T ioAIRINV_ServicePtr) {
- const bool hasInsertBeenSuccessful = _airinvServiceMap.
- insert (AIRINV_ServicePtr_Map_T::value_type (iAirlineCode,
- ioAIRINV_ServicePtr)).second;
-
- if (hasInsertBeenSuccessful == false) {
- STDAIR_LOG_ERROR ("Cannot add the inventory service handler for this airline: "
- << iAirlineCode);
- assert (false);
- }
- }
}
Modified: trunk/simcrs/simcrs/service/SIMCRS_ServiceContext.hpp
===================================================================
--- trunk/simcrs/simcrs/service/SIMCRS_ServiceContext.hpp 2010-09-15 13:05:51 UTC (rev 57)
+++ trunk/simcrs/simcrs/service/SIMCRS_ServiceContext.hpp 2010-10-13 13:31:08 UTC (rev 58)
@@ -16,25 +16,27 @@
#include <simcrs/service/ServiceAbstract.hpp>
namespace AIRINV {
- class AIRINV_Service;
+ class AIRINV_Master_Service;
}
namespace AIRSCHED {
class AIRSCHED_Service;
}
+namespace SIMFQT {
+ class SIMFQT_Service;
+}
+
namespace SIMCRS {
- /** Pointer on the AIRINV Service handler. */
- typedef boost::shared_ptr<AIRINV::AIRINV_Service> AIRINV_ServicePtr_T;
+ /** Pointer on the AIRINV Master Service handler. */
+ typedef boost::shared_ptr<AIRINV::AIRINV_Master_Service> AIRINV_Master_ServicePtr_T;
/** Pointer on the AIRSCHED Service handler. */
typedef boost::shared_ptr<AIRSCHED::AIRSCHED_Service> AIRSCHED_ServicePtr_T;
- /** Typedef which defines a map of airline codes and the corresponding
- airline inventories. */
- typedef std::map<const stdair::AirlineCode_T,
- AIRINV_ServicePtr_T> AIRINV_ServicePtr_Map_T;
+ /** Pointer on the SIMFQT Service handler. */
+ typedef boost::shared_ptr<SIMFQT::SIMFQT_Service> SIMFQT_ServicePtr_T;
/** Class holding the context of the Simcrs services. */
@@ -69,19 +71,20 @@
return _CRSCode;
}
- /** Get a reference on the AIRINV service handler which corresponds to
- the given airline code. */
- AIRINV_ServicePtr_T getAIRINV_Service (const stdair::AirlineCode_T&) const;
-
- /** Get a reference on the list of AIRINV_Services. */
- const AIRINV_ServicePtr_Map_T& getAIRINV_ServiceMap () const {
- return _airinvServiceMap;
+ /** Get a reference on the AIRINV Master service handler. */
+ AIRINV_Master_ServicePtr_T getAIRINV_Master_Service () const {
+ return _airinvMasterService;
}
/** Get a reference on the AIRSCHED service handler. */
AIRSCHED_ServicePtr_T getAIRSCHED_Service () const {
return _airschedService;
}
+
+ /** Get a reference on the SIMFQT service handler. */
+ SIMFQT_ServicePtr_T getSIMFQT_Service () const {
+ return _simfqtService;
+ }
// ///////////////// Setters ///////////////////
@@ -95,16 +98,22 @@
_CRSCode = iCRSCode;
}
- /** Add the pointer on the AIRINV service handler to the dedicated list. */
- void addAIRINV_Service (const stdair::AirlineCode_T& iAirlineCode,
- AIRINV_ServicePtr_T ioAIRINV_ServicePtr);
+ /** Set the pointer on the AIRINV Master service handler. */
+ void setAIRINV_Master_Service (AIRINV_Master_ServicePtr_T ioAIRINV_Master_ServicePtr) {
+ _airinvMasterService = ioAIRINV_Master_ServicePtr;
+ }
/** Set the pointer on the AIRSCHED service handler. */
void setAIRSCHED_Service (AIRSCHED_ServicePtr_T ioAIRSCHED_ServicePtr) {
_airschedService = ioAIRSCHED_ServicePtr;
}
+ /** Set the pointer on the SIMFQT service handler. */
+ void setSIMFQT_Service (SIMFQT_ServicePtr_T ioSIMFQT_ServicePtr) {
+ _simfqtService = ioSIMFQT_ServicePtr;
+ }
+
private:
// //////////////////// Display Methods /////////////////////
/** Display the short SIMCRS_ServiceContext content. */
@@ -122,9 +131,12 @@
/** Airline Schedule Service Handler. */
AIRSCHED_ServicePtr_T _airschedService;
- /** Airline Inventory Service Handler map. */
- AIRINV_ServicePtr_Map_T _airinvServiceMap;
+ /** Fare Quote Service Handler. */
+ SIMFQT_ServicePtr_T _simfqtService;
+ /** Airline Inventory Service Handler. */
+ AIRINV_Master_ServicePtr_T _airinvMasterService;
+
private:
// //////////// Attributes //////////////////
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qua...@us...> - 2010-09-15 13:05:57
|
Revision: 57
http://simcrs.svn.sourceforge.net/simcrs/?rev=57&view=rev
Author: quannaus
Date: 2010-09-15 13:05:51 +0000 (Wed, 15 Sep 2010)
Log Message:
-----------
[dev] Adapted to the new stdair architecture.
Modified Paths:
--------------
trunk/simcrs/simcrs/command/DistributionManager.cpp
trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
Modified: trunk/simcrs/simcrs/command/DistributionManager.cpp
===================================================================
--- trunk/simcrs/simcrs/command/DistributionManager.cpp 2010-09-07 11:38:15 UTC (rev 56)
+++ trunk/simcrs/simcrs/command/DistributionManager.cpp 2010-09-15 13:05:51 UTC (rev 57)
@@ -41,9 +41,11 @@
for (stdair::KeyList_T::const_iterator itKey = lSegmentDateKeyList.begin();
itKey != lSegmentDateKeyList.end(); ++itKey, ++itBookingClassKey) {
const std::string& lSegmentDateKey = *itKey;
- stdair::AirlineCode_T lAirlineCode = "";
- lAirlineCode = lSegmentDateKey.at(0) + lSegmentDateKey.at(1);
+ std::ostringstream ostrCode;
+ ostrCode << lSegmentDateKey.at(0) << lSegmentDateKey.at(1);
+ stdair::AirlineCode_T lAirlineCode = ostrCode.str();
+
// Do the sale within the corresponding inventory.
AIRINV::AIRINV_ServicePtr_Map_T::const_iterator itAirinvService =
iAIRINV_ServiceMap.find (lAirlineCode);
Modified: trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
===================================================================
--- trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-09-07 11:38:15 UTC (rev 56)
+++ trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-09-15 13:05:51 UTC (rev 57)
@@ -211,12 +211,12 @@
stdair::BomRoot& lBomRoot = lSTDAIR_Service_ptr->getBomRoot();
// Retrieve the list of Inventory objects: one per airline
- stdair::InventoryMap_T& lInventoryMap =
+ const stdair::InventoryMap_T& lInventoryMap =
stdair::BomManager::getMap<stdair::Inventory> (lBomRoot);
// Browse the inventory map and initialise the corresponding
// AirInv services.
- for (stdair::InventoryMap_T::iterator itInv = lInventoryMap.begin();
+ for (stdair::InventoryMap_T::const_iterator itInv = lInventoryMap.begin();
itInv != lInventoryMap.end(); ++itInv) {
const stdair::AirlineCode_T& lAirlineCode = itInv->first;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <den...@us...> - 2010-09-07 11:38:22
|
Revision: 56
http://simcrs.svn.sourceforge.net/simcrs/?rev=56&view=rev
Author: denis_arnaud
Date: 2010-09-07 11:38:15 +0000 (Tue, 07 Sep 2010)
Log Message:
-----------
[Build] The StdAir and ExtraCC libraries are no longer Subversion
external references.
Modified Paths:
--------------
trunk/simcrs/test/simcrs/Makefile.am
Modified: trunk/simcrs/test/simcrs/Makefile.am
===================================================================
--- trunk/simcrs/test/simcrs/Makefile.am 2010-09-06 19:28:56 UTC (rev 55)
+++ trunk/simcrs/test/simcrs/Makefile.am 2010-09-07 11:38:15 UTC (rev 56)
@@ -14,12 +14,10 @@
XFAIL_TESTS = #
CRSTestSuite_SOURCES = CRSTestSuite.hpp CRSTestSuite.cpp
-CRSTestSuite_CXXFLAGS= $(CPPUNIT_CFLAGS) $(BOOST_CFLAGS)
+CRSTestSuite_CXXFLAGS = $(BOOST_CFLAGS) $(CPPUNIT_CFLAGS) \
+ $(EXTRACC_CFLAGS) $(STDAIR_CFLAGS)
CRSTestSuite_LDADD =
CRSTestSuite_LDFLAGS = \
- $(BOOST_LIBS) $(CPPUNIT_LIBS) \
- $(top_builddir)/extracppunit/libextracppunit.la \
- $(top_builddir)/stdair/core/libstdair.la \
+ $(BOOST_LIBS) $(CPPUNIT_LIBS) $(EXTRACC_LIBS) $(STDAIR_LIBS) \
$(top_builddir)/simcrs/core/libsimcrs.la
# $(top_builddir)/airinv/core/libairinv.la
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <den...@us...> - 2010-09-06 19:29:03
|
Revision: 55
http://simcrs.svn.sourceforge.net/simcrs/?rev=55&view=rev
Author: denis_arnaud
Date: 2010-09-06 19:28:56 +0000 (Mon, 06 Sep 2010)
Log Message:
-----------
[Build] Changed the dependency on StdAir, which is no longer an external Subversion reference.
Modified Paths:
--------------
trunk/simcrs/Makefile.am
trunk/simcrs/configure.ac
trunk/simcrs/simcrs/basic/Makefile.am
trunk/simcrs/simcrs/basic/sources.mk
trunk/simcrs/simcrs/batches/Makefile.am
trunk/simcrs/simcrs/bom/Makefile.am
trunk/simcrs/simcrs/command/Makefile.am
trunk/simcrs/simcrs/command/sources.mk
trunk/simcrs/simcrs/config/Makefile.am
trunk/simcrs/simcrs/core/Makefile.am
trunk/simcrs/simcrs/core/sources.mk
trunk/simcrs/simcrs/factory/Makefile.am
trunk/simcrs/simcrs/factory/sources.mk
trunk/simcrs/simcrs/service/Makefile.am
trunk/simcrs/simcrs/service/sources.mk
trunk/simcrs/test/Makefile.am
Added Paths:
-----------
trunk/simcrs/simcrs.spec
Removed Paths:
-------------
trunk/simcrs/simcrs.spec.in
Property Changed:
----------------
trunk/simcrs/
trunk/simcrs/test/
Property changes on: trunk/simcrs
___________________________________________________________________
Modified: svn:ignore
- autom4te.cache
configure
config.status
config.log
libtool
aclocal.m4
Makefile.in
Makefile
INSTALL
COPYING
simcrs-config
simcrs.spec
simcrs.m4
simcrs.pc
simcrs-*.tar.*
+ autom4te.cache
configure
config.status
config.log
libtool
aclocal.m4
Makefile.in
Makefile
INSTALL
COPYING
simcrs-config
simcrs.m4
simcrs.pc
simcrs-*.tar.*
Modified: svn:externals
- config https://stdair.svn.sourceforge.net/svnroot/stdair/trunk/stdair/config
db https://stdair.svn.sourceforge.net/svnroot/stdair/trunk/stdair/db
stdair https://stdair.svn.sourceforge.net/svnroot/stdair/trunk/stdair/stdair
airsched https://air-sched.svn.sourceforge.net/svnroot/air-sched/trunk/airsched/airsched
airinv https://airinv.svn.sourceforge.net/svnroot/airinv/trunk/airinv/airinv
extracppunit https://extracc.svn.sourceforge.net/svnroot/extracc/trunk/extracc/extracppunit
+ config https://stdair.svn.sourceforge.net/svnroot/stdair/trunk/stdair/config
airsched https://air-sched.svn.sourceforge.net/svnroot/air-sched/trunk/airsched/airsched
airinv https://airinv.svn.sourceforge.net/svnroot/airinv/trunk/airinv/airinv
Modified: trunk/simcrs/Makefile.am
===================================================================
--- trunk/simcrs/Makefile.am 2010-08-20 14:55:41 UTC (rev 54)
+++ trunk/simcrs/Makefile.am 2010-09-06 19:28:56 UTC (rev 55)
@@ -21,10 +21,16 @@
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure \
config-h.in sic/stamp-h.in autogen.sh bootstrap
-EXTRA_DIST = @PACKAGE@.spec @PACKAGE@.m4 @PACKAGE@.pc Makefile.common
+# Note 1: the RPM specification file (@PACKAGE@.spec) must not be distributed
+# with the rest of the source code. The tar-ball will be used by the packaging
+# process, from an external RPM specification file: duplicating it in the
+# tar-ball may only confuse things.
+# Note 2: Both @PACKAGE@.m4 and @PACKAGE@.pc must not be distributed, as they
+# will be generated by the configure script.
+EXTRA_DIST =
# Build in these directories:
-SUBDIRS = stdair airsched airinv @PACKAGE@ extracppunit $(TEST_DIR)
+SUBDIRS = airsched airinv simcrs $(TEST_DIR)
# Configuration helpers
Modified: trunk/simcrs/configure.ac
===================================================================
--- trunk/simcrs/configure.ac 2010-08-20 14:55:41 UTC (rev 54)
+++ trunk/simcrs/configure.ac 2010-09-06 19:28:56 UTC (rev 55)
@@ -10,10 +10,6 @@
AM_PATH_CPPUNIT(1.10)
AM_CONDITIONAL([HAVE_CPPUNIT], [test "x$CPPUNIT_LIBS" != x])
-# RPM release number
-RPM_RELEASE="1"
-AC_SUBST(RPM_RELEASE)
-
# Shared library versioning
GENERIC_LIBRARY_VERSION="99:99:99"
# | | |
@@ -110,10 +106,10 @@
# thus directly accessible within the extracppunit directory.
# When that library will be widely avaible on Linux distributions,
# the external reference can be removed and the following line uncommented.
-#AM_PATH_EXTRACC
-#AC_SUBST(EXTRACC_VERSION)
-#AC_SUBST(EXTRACC_CFLAGS)
-#AC_SUBST(EXTRACC_LIBS)
+AM_PATH_EXTRACC
+AC_SUBST(EXTRACC_VERSION)
+AC_SUBST(EXTRACC_CFLAGS)
+AC_SUBST(EXTRACC_LIBS)
# -----------------------------------------------------------
# Python: http://www.python.org
@@ -173,6 +169,17 @@
AC_SUBST(SOCI_CFLAGS)
AC_SUBST(SOCI_LIBS)
+# -----------------------------------------------------------------------------
+# Support for StdAir (): http://sf.net/projects/stdair
+# -----------------------------------------------------------------------------
+# Note: the StdAir is now imported as a Subversion external reference,
+# thus directly accessible within the extracppunit directory.
+# When that library will be widely avaible on Linux distributions,
+# the external reference can be removed and the following line uncommented.
+AM_PATH_STDAIR
+AC_SUBST(STDAIR_VERSION)
+AC_SUBST(STDAIR_CFLAGS)
+AC_SUBST(STDAIR_LIBS)
# -------------------------------------------------------------------
# Support for documentation
@@ -245,18 +252,7 @@
Makefile
simcrs-config
simcrs.pc
- simcrs.spec
simcrs.m4
- stdair/Makefile
- stdair/basic/Makefile
- stdair/bom/Makefile
- stdair/dbadaptor/Makefile
- stdair/factory/Makefile
- stdair/command/Makefile
- stdair/config/Makefile
- stdair/service/Makefile
- stdair/core/Makefile
- stdair/batches/Makefile
airsched/Makefile
airsched/basic/Makefile
airsched/bom/Makefile
@@ -285,10 +281,8 @@
simcrs/config/Makefile
simcrs/core/Makefile
simcrs/batches/Makefile
- extracppunit/Makefile
test/Makefile
test/samples/Makefile
- test/stdair/Makefile
test/airsched/Makefile
test/airinv/Makefile
test/simcrs/Makefile
@@ -365,6 +359,11 @@
o SOCI_CFLAGS ..... : ${SOCI_CFLAGS}
o SOCI_LIBS ....... : ${SOCI_LIBS}
+ - StdAir ............ :
+ o STDAIR_VERSION .. : ${STDAIR_VERSION}
+ o STDAIR_CFLAGS ... : ${STDAIR_CFLAGS}
+ o STDAIR_LIBS ..... : ${STDAIR_LIBS}
+
- ExtraCC ........... :
o EXTRACC_VERSION . : ${EXTRACC_VERSION}
o EXTRACC_CFLAGS .. : ${EXTRACC_CFLAGS}
Modified: trunk/simcrs/simcrs/basic/Makefile.am
===================================================================
--- trunk/simcrs/simcrs/basic/Makefile.am 2010-08-20 14:55:41 UTC (rev 54)
+++ trunk/simcrs/simcrs/basic/Makefile.am 2010-09-06 19:28:56 UTC (rev 55)
@@ -1,11 +1,16 @@
-## basic sub-directory
+## simcrs/basic sub-directory
include $(top_srcdir)/Makefile.common
include $(srcdir)/sources.mk
-noinst_LTLIBRARIES= libbas.la
+#
+noinst_LTLIBRARIES = libsimcrsbas.la
-libbas_la_SOURCES= $(bas_h_sources) $(bas_cc_sources)
-libbas_la_CXXFLAGS =
+libsimcrsbas_la_SOURCES = $(simcrs_bas_h_sources) $(simcrs_bas_cc_sources)
+libsimcrsbas_la_CXXFLAGS = $(STDAIR_CFLAGS)
+libsimcrsbas_la_LDFLAGS =
+
+#
#pkgincludedir = $(includedir)/@PACKAGE@/basic
-#pkginclude_HEADERS = $(bas_h_sources)
+#pkginclude_HEADERS = $(simcrs_bas_h_sources)
+
Modified: trunk/simcrs/simcrs/basic/sources.mk
===================================================================
--- trunk/simcrs/simcrs/basic/sources.mk 2010-08-20 14:55:41 UTC (rev 54)
+++ trunk/simcrs/simcrs/basic/sources.mk 2010-09-06 19:28:56 UTC (rev 55)
@@ -1,3 +1,6 @@
-bas_h_sources = $(top_srcdir)/simcrs/basic/BasConst_General.hpp \
- $(top_srcdir)/simcrs/basic/BasConst_SIMCRS_Service.hpp
-bas_cc_sources = $(top_srcdir)/simcrs/basic/BasConst.cpp
+simcrs_bas_h_sources = \
+ $(top_srcdir)/simcrs/basic/BasConst_General.hpp \
+ $(top_srcdir)/simcrs/basic/BasConst_SIMCRS_Service.hpp
+simcrs_bas_cc_sources = \
+ $(top_srcdir)/simcrs/basic/BasConst.cpp
+
Modified: trunk/simcrs/simcrs/batches/Makefile.am
===================================================================
--- trunk/simcrs/simcrs/batches/Makefile.am 2010-08-20 14:55:41 UTC (rev 54)
+++ trunk/simcrs/simcrs/batches/Makefile.am 2010-09-06 19:28:56 UTC (rev 55)
@@ -1,4 +1,4 @@
-# batches
+# simcrs/batches
include $(top_srcdir)/Makefile.common
include $(srcdir)/sources.mk
@@ -13,3 +13,4 @@
#airinv_CXXFLAGS = $(BOOST_CFLAGS)
#airinv_LDADD =
#airinv_LDFLAGS = $(BOOST_PROGRAM_OPTIONS_LIB) $(top_builddir)/airinv/core/libairinv.la
+
Modified: trunk/simcrs/simcrs/bom/Makefile.am
===================================================================
--- trunk/simcrs/simcrs/bom/Makefile.am 2010-08-20 14:55:41 UTC (rev 54)
+++ trunk/simcrs/simcrs/bom/Makefile.am 2010-09-06 19:28:56 UTC (rev 55)
@@ -1,12 +1,15 @@
-## bom sub-directory
+## simcrs/bom sub-directory
include $(top_srcdir)/Makefile.common
include $(srcdir)/sources.mk
-noinst_LTLIBRARIES= libbom.la
+#
+noinst_LTLIBRARIES = libsimcrsbom.la
-libbom_la_SOURCES= $(bom_h_sources) $(bom_cc_sources)
-libbom_la_CXXFLAGS =
-libbom_la_LDFLAGS =
+libsimcrsbom_la_SOURCES = $(simcrs_bom_h_sources) $(simcrs_bom_cc_sources)
+libsimcrsbom_la_CXXFLAGS = $(STDAIR_CFLAGS)
+libsimcrsbom_la_LDFLAGS =
+#
#pkgincludedir = $(includedir)/@PACKAGE@/bom
-#pkginclude_HEADERS = $(bom_h_sources)
+#pkginclude_HEADERS = $(simcrs_bom_h_sources)
+
Modified: trunk/simcrs/simcrs/command/Makefile.am
===================================================================
--- trunk/simcrs/simcrs/command/Makefile.am 2010-08-20 14:55:41 UTC (rev 54)
+++ trunk/simcrs/simcrs/command/Makefile.am 2010-09-06 19:28:56 UTC (rev 55)
@@ -1,14 +1,17 @@
-## command sub-directory
+## simcrs/command sub-directory
include $(top_srcdir)/Makefile.common
include $(srcdir)/sources.mk
-noinst_LTLIBRARIES= libcmd.la
+#
+noinst_LTLIBRARIES = libsimcrscmd.la
-libcmd_la_SOURCES= $(cmd_h_sources) $(cmd_cc_sources)
-libcmd_la_CXXFLAGS = $(BOOST_CFLAGS)
-libcmd_la_LIBADD =
-libcmd_la_LDFLAGS = $(BOOST_LIBS) \
+libsimcrscmd_la_SOURCES = $(simcrs_cmd_h_sources) $(simcrs_cmd_cc_sources)
+libsimcrscmd_la_CXXFLAGS = $(BOOST_CFLAGS) $(STDAIR_CFLAGS)
+libsimcrscmd_la_LIBADD =
+libsimcrscmd_la_LDFLAGS = $(BOOST_LIBS) \
$(top_builddir)/airinv/core/libairinv.la
+#
#pkgincludedir = $(includedir)/@PACKAGE@/command
-#pkginclude_HEADERS = $(cmd_h_sources)
+#pkginclude_HEADERS = $(simcrs_cmd_h_sources)
+
Modified: trunk/simcrs/simcrs/command/sources.mk
===================================================================
--- trunk/simcrs/simcrs/command/sources.mk 2010-08-20 14:55:41 UTC (rev 54)
+++ trunk/simcrs/simcrs/command/sources.mk 2010-09-06 19:28:56 UTC (rev 55)
@@ -1,4 +1,5 @@
-cmd_h_sources = \
- $(top_srcdir)/simcrs/command/DistributionManager.hpp
-cmd_cc_sources = \
- $(top_srcdir)/simcrs/command/DistributionManager.cpp
+simcrs_cmd_h_sources = \
+ $(top_srcdir)/simcrs/command/DistributionManager.hpp
+simcrs_cmd_cc_sources = \
+ $(top_srcdir)/simcrs/command/DistributionManager.cpp
+
Modified: trunk/simcrs/simcrs/config/Makefile.am
===================================================================
--- trunk/simcrs/simcrs/config/Makefile.am 2010-08-20 14:55:41 UTC (rev 54)
+++ trunk/simcrs/simcrs/config/Makefile.am 2010-09-06 19:28:56 UTC (rev 55)
@@ -24,3 +24,4 @@
@echo '#define DATADIR "$(datadir)"' >> $@
@echo '#define DOCDIR "$(docdir)"' >> $@
@echo '#endif // __SIMCRS_PATHS_HPP' >> $@
+
Modified: trunk/simcrs/simcrs/core/Makefile.am
===================================================================
--- trunk/simcrs/simcrs/core/Makefile.am 2010-08-20 14:55:41 UTC (rev 54)
+++ trunk/simcrs/simcrs/core/Makefile.am 2010-09-06 19:28:56 UTC (rev 55)
@@ -1,4 +1,4 @@
-# core
+# simcrs/core
include $(top_srcdir)/Makefile.common
include $(srcdir)/sources.mk
@@ -12,15 +12,16 @@
# Library
lib_LTLIBRARIES = libsimcrs.la
-libsimcrs_la_SOURCES = $(service_h_sources) $(service_cc_sources)
+libsimcrs_la_SOURCES = $(simcrs_service_h_sources) $(simcrs_service_cc_sources)
libsimcrs_la_LIBADD = \
- $(top_builddir)/simcrs/basic/libbas.la \
- $(top_builddir)/simcrs/bom/libbom.la \
- $(top_builddir)/simcrs/factory/libfac.la \
- $(top_builddir)/simcrs/command/libcmd.la \
- $(top_builddir)/simcrs/service/libsvc.la
+ $(top_builddir)/simcrs/basic/libsimcrsbas.la \
+ $(top_builddir)/simcrs/bom/libsimcrsbom.la \
+ $(top_builddir)/simcrs/factory/libsimcrsfac.la \
+ $(top_builddir)/simcrs/command/libsimcrscmd.la \
+ $(top_builddir)/simcrs/service/libsimcrssvc.la
libsimcrs_la_LDFLAGS = \
- $(BOOST_DATE_TIME_LIB) $(BOOST_PROGRAM_OPTIONS_LIB) $(BOOST_FILESYSTEM_LIB) \
- $(top_builddir)/stdair/core/libstdair.la \
+ $(BOOST_DATE_TIME_LIB) $(BOOST_PROGRAM_OPTIONS_LIB) \
+ $(BOOST_FILESYSTEM_LIB) $(STDAIR_LIBS) \
$(top_builddir)/airsched/core/libairsched.la \
-version-info $(GENERIC_LIBRARY_VERSION)
+
Modified: trunk/simcrs/simcrs/core/sources.mk
===================================================================
--- trunk/simcrs/simcrs/core/sources.mk 2010-08-20 14:55:41 UTC (rev 54)
+++ trunk/simcrs/simcrs/core/sources.mk 2010-09-06 19:28:56 UTC (rev 55)
@@ -1,4 +1,5 @@
-service_h_sources = \
+simcrs_service_h_sources = \
$(top_srcdir)/simcrs/SIMCRS_Types.hpp \
$(top_srcdir)/simcrs/SIMCRS_Service.hpp
-service_cc_sources =
+simcrs_service_cc_sources =
+
Modified: trunk/simcrs/simcrs/factory/Makefile.am
===================================================================
--- trunk/simcrs/simcrs/factory/Makefile.am 2010-08-20 14:55:41 UTC (rev 54)
+++ trunk/simcrs/simcrs/factory/Makefile.am 2010-09-06 19:28:56 UTC (rev 55)
@@ -1,11 +1,15 @@
-## factory sub-directory
+## simcrs/factory sub-directory
include $(top_srcdir)/Makefile.common
include $(srcdir)/sources.mk
-noinst_LTLIBRARIES= libfac.la
+#
+noinst_LTLIBRARIES = libsimcrsfac.la
-libfac_la_SOURCES= $(fac_h_sources) $(fac_cc_sources)
-libfac_la_CXXFLAGS =
+libsimcrsfac_la_SOURCES = $(simcrs_fac_h_sources) $(simcrs_fac_cc_sources)
+libsimcrsfac_la_CXXFLAGS = $(STDAIR_CFLAGS)
+libsimcrsfac_la_LDFLAGS =
+#
#pkgincludedir = $(includedir)/@PACKAGE@/factory
-#pkginclude_HEADERS = $(fac_h_sources)
+#pkginclude_HEADERS = $(simcrs_fac_h_sources)
+
Modified: trunk/simcrs/simcrs/factory/sources.mk
===================================================================
--- trunk/simcrs/simcrs/factory/sources.mk 2010-08-20 14:55:41 UTC (rev 54)
+++ trunk/simcrs/simcrs/factory/sources.mk 2010-09-06 19:28:56 UTC (rev 55)
@@ -1,10 +1,11 @@
-fac_h_sources = \
+simcrs_fac_h_sources = \
$(top_srcdir)/simcrs/factory/FacBomAbstract.hpp \
$(top_srcdir)/simcrs/factory/FacServiceAbstract.hpp \
$(top_srcdir)/simcrs/factory/FacSupervisor.hpp \
$(top_srcdir)/simcrs/factory/FacSimcrsServiceContext.hpp
-fac_cc_sources = \
+simcrs_fac_cc_sources = \
$(top_srcdir)/simcrs/factory/FacBomAbstract.cpp \
$(top_srcdir)/simcrs/factory/FacServiceAbstract.cpp \
$(top_srcdir)/simcrs/factory/FacSupervisor.cpp \
$(top_srcdir)/simcrs/factory/FacSimcrsServiceContext.cpp
+
Modified: trunk/simcrs/simcrs/service/Makefile.am
===================================================================
--- trunk/simcrs/simcrs/service/Makefile.am 2010-08-20 14:55:41 UTC (rev 54)
+++ trunk/simcrs/simcrs/service/Makefile.am 2010-09-06 19:28:56 UTC (rev 55)
@@ -1,11 +1,15 @@
-## command sub-directory
+## simcrs/service sub-directory
include $(top_srcdir)/Makefile.common
include $(srcdir)/sources.mk
-noinst_LTLIBRARIES= libsvc.la
+#
+noinst_LTLIBRARIES = libsimcrssvc.la
-libsvc_la_SOURCES= $(svc_h_sources) $(svc_cc_sources)
-libsvc_la_CXXFLAGS = $(BOOST_CFLAGS)
+libsimcrssvc_la_SOURCES = $(simcrs_svc_h_sources) $(simcrs_svc_cc_sources)
+libsimcrssvc_la_CXXFLAGS = $(BOOST_CFLAGS) $(STDAIR_CFLAGS)
+libsimcrssvc_la_LDFLAGS =
+#
#pkgincludedir = $(includedir)/@PACKAGE@/service
-#pkginclude_HEADERS = $(svc_h_sources)
+#pkginclude_HEADERS = $(simcrs_svc_h_sources)
+
Modified: trunk/simcrs/simcrs/service/sources.mk
===================================================================
--- trunk/simcrs/simcrs/service/sources.mk 2010-08-20 14:55:41 UTC (rev 54)
+++ trunk/simcrs/simcrs/service/sources.mk 2010-09-06 19:28:56 UTC (rev 55)
@@ -1,5 +1,8 @@
-svc_h_sources = $(top_srcdir)/simcrs/service/ServiceAbstract.hpp \
- $(top_srcdir)/simcrs/service/SIMCRS_ServiceContext.hpp
-svc_cc_sources = $(top_srcdir)/simcrs/service/ServiceAbstract.cpp \
- $(top_srcdir)/simcrs/service/SIMCRS_ServiceContext.cpp \
- $(top_srcdir)/simcrs/service/SIMCRS_Service.cpp
+simcrs_svc_h_sources = \
+ $(top_srcdir)/simcrs/service/ServiceAbstract.hpp \
+ $(top_srcdir)/simcrs/service/SIMCRS_ServiceContext.hpp
+simcrs_svc_cc_sources = \
+ $(top_srcdir)/simcrs/service/ServiceAbstract.cpp \
+ $(top_srcdir)/simcrs/service/SIMCRS_ServiceContext.cpp \
+ $(top_srcdir)/simcrs/service/SIMCRS_Service.cpp
+
Copied: trunk/simcrs/simcrs.spec (from rev 54, trunk/simcrs/simcrs.spec.in)
===================================================================
--- trunk/simcrs/simcrs.spec (rev 0)
+++ trunk/simcrs/simcrs.spec 2010-09-06 19:28:56 UTC (rev 55)
@@ -0,0 +1,120 @@
+#
+%global mydocs __tmp_docdir
+#
+Name: simcrs
+Version: 99.99.99
+Release: 1%{?dist}
+
+Summary: C++ library providing a clean API for a Travel-oriented Distribution System
+
+Group: System Environment/Libraries
+License: LGPLv2
+URL: http://%{name}.sourceforge.net
+Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
+%{?el5:BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)}
+
+BuildRequires: boost-devel
+BuildRequires: mysql-devel
+BuildRequires: soci-mysql-devel
+
+%description
+%{name} aims at providing a clean API and a simple implementation, as a C++
+library, of a Travel-oriented Distribution System. It corresponds to the
+simulated version of the real-world Computerized Reservation Systems (CRS).
+
+Install the %{name} package if you need a library for simulated CRS C++
+C++ library.
+
+%package devel
+Summary: Header files, libraries and development documentation for %{name}
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: pkgconfig
+
+%description devel
+This package contains the header files, static libraries and
+development documentation for %{name}. If you would like to develop
+programs using %{name}, you will need to install %{name}-devel.
+
+%package doc
+Summary: HTML documentation for the %{name} library
+Group: Documentation
+%{?fedora:BuildArch: noarch}
+BuildRequires: tex(latex)
+BuildRequires: doxygen, ghostscript
+
+%description doc
+This package contains the documentation in the HTML format of the %{name}
+library. The documentation is the same as at the %{name} web page.
+
+
+%prep
+%setup -q
+# The INSTALL package is not relevant for RPM package users
+# (e.g., see https://bugzilla.redhat.com/show_bug.cgi?id=489233#c4)
+rm -f INSTALL
+# Fix some permissions and formats
+chmod -x ABOUT-NLS AUTHORS ChangeLog COPYING NEWS README
+find . -type f -name '*.[hc]pp' -exec chmod 644 {} \;
+
+
+%build
+%configure --disable-static
+make %{?_smp_mflags}
+
+%install
+# On Fedora, the BuildRoot is automatically cleaned. Which is not the case for
+# RedHat. See: https://fedoraproject.org/wiki/Packaging/Guidelines#BuildRoot_tag
+%{?rhel:rm -rf $RPM_BUILD_ROOT}
+
+make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
+%find_lang %{name}
+# Remove unpackaged files from the buildroot
+rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/config.h
+rm -f $RPM_BUILD_ROOT%{_infodir}/dir
+rm -f $RPM_BUILD_ROOT%{_libdir}/lib%{name}.la
+
+mkdir -p %{mydocs}
+mv $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{mydocs}
+
+%if 0%{?rhel}
+%clean
+rm -rf $RPM_BUILD_ROOT
+%endif
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
+%files -f %{name}.lang
+%defattr(-,root,root,-)
+%doc AUTHORS ChangeLog COPYING NEWS README
+%{_bindir}/%{name}_indexer
+%{_bindir}/%{name}_searcher
+%{_libdir}/lib*.so.*
+%{_mandir}/man3/%{name}.3.*
+
+%files devel
+%defattr(-,root,root,-)
+%{_includedir}/%{name}
+%{_bindir}/%{name}-config
+%{_libdir}/lib%{name}.so
+%{_libdir}/pkgconfig/%{name}.pc
+%{_datadir}/aclocal/%{name}.m4
+%{_infodir}/%{name}-ref.info.*
+%{_mandir}/man1/%{name}-config.1.*
+
+%files doc
+%defattr(-,root,root,-)
+%doc %{mydocs}/html
+%doc COPYING
+
+
+%changelog
+* Mon Sep 06 2010 Denis Arnaud <den...@m4...> 99.99.99-1
+- Upstream integration
+
+* Sun Mar 22 2009 Denis Arnaud <den...@m4...> 0.2.0-1
+- RPM release for Fedora 10
+
Deleted: trunk/simcrs/simcrs.spec.in
===================================================================
--- trunk/simcrs/simcrs.spec.in 2010-08-20 14:55:41 UTC (rev 54)
+++ trunk/simcrs/simcrs.spec.in 2010-09-06 19:28:56 UTC (rev 55)
@@ -1,147 +0,0 @@
-#
-%define mydocs __tmp_docdir
-#
-Name: @PACKAGE@
-Version: @VERSION@
-Release: @RPM_RELEASE@%{?dist}
-
-Summary: C++ library providing a clean API for parsing travel-focused requests
-
-Group: System Environment/Libraries
-License: LGPLv2
-URL: http://%{name}.sourceforge.net
-Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: gsl-devel >= 1.8
-BuildRequires: boost-devel >= 1.34
-BuildRequires: mysql-devel >= 5.0
-BuildRequires: mysql++-devel >= 3.0
-BuildRequires: cppunit-devel >= 1.10
-BuildRequires: xapian-core-devel >= 1.0
-BuildRequires: soci-devel >= 3.0
-#Requires:
-
-%description
-That project aims at providing a clean API, and the corresponding C++
-implementation, for parsing travel-focused requests (e.g., "washington
-dc beijing monday a/r +aa -ua 1 week 2 adults 1 dog").
-
-The C++ library uses Xapian (http://www.xapian.org) for the
-Information Retrieval part, on freely available travel-related data
-(e.g., country names and codes, city names and codes, airline names
-and codes, etc.).
-
-The C++ library exposes a simple, clean and object-oriented, API. For
-instance, the static Parse() method takes, as input, a string
-containing the travel request, and yields, as output, the list of the
-recognised terms as well as their corresponding types. As an example,
-the travel request "washington dc beijing monday a/r +aa -ua 1 week 2
-adults 1 dog" would give the following list:
- * Origin airport: Washington, DC, USA
- * Destination airport: Beijing, China
- * Date of travel: next Monday
- * Date of return: 1 week after next Monday
- * Preferred airline: American Airlines;
- non-preferred airline: United Airlines
- * Number of travellers: 2 adults and a dog
-
-The output can then be used by other systems, for instance to book the
-corresponding travel or to visualise it on a map and calendar and to
-share it with others.
-
-%package devel
-Summary: Header files, libraries and development documentation for %{name}
-Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
-Requires: pkgconfig
-Requires(post): info
-Requires(preun): info
-
-%description devel
-This package contains the header files, static libraries and
-development documentation for %{name}. If you would like to develop
-programs using %{name}, you will need to install %{name}-devel.
-
-%package doc
-Summary: HTML documentation for the @PACKAGE_NAME@ library
-Group: Documentation
-BuildArch: noarch
-BuildRequires: doxygen, texlive-latex, texlive-dvips, ghostscript
-
-%description doc
-This package contains the documentation in the HTML format of the @PACKAGE_NAME@
-library. The documentation is the same as at the @PACKAGE_NAME@ web page.
-
-
-%prep
-%setup -q
-# find ./doc -type f -perm 755 -exec chmod 644 {} \;
-# Fix some permissions and formats
-rm -f INSTALL
-chmod -x ABOUT-NLS AUTHORS ChangeLog COPYING NEWS README
-find . -type f -name '*.[hc]pp' -exec chmod 644 {} \;
-
-
-%build
-%configure --disable-static
-make %{?_smp_mflags}
-
-%install
-rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT
-%find_lang %{name}
-# remove unpackaged files from the buildroot
-rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/config.h
-rm -f $RPM_BUILD_ROOT%{_infodir}/dir
-rm -f $RPM_BUILD_ROOT%{_libdir}/lib%{name}.la
-# chmod 644 doc/html/installdox doc/html/*.png doc/html/*.ico
-rm -rf %{mydocs} && mkdir -p %{mydocs}
-mv $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{mydocs}
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%post -p /sbin/ldconfig
-
-%postun -p /sbin/ldconfig
-
-%post devel
-/sbin/install-info %{_infodir}/%{name}-ref.info.* %{_infodir}/dir || :
-
-%preun devel
-if [ "$1" = 0 ]; then
- /sbin/install-info --delete %{_infodir}/%{name}-ref.info.* %{_infodir}/dir || :
-fi
-
-%files -f %{name}.lang
-%defattr(-,root,root,-)
-%doc AUTHORS ChangeLog COPYING NEWS README
-%{_bindir}/%{name}_indexer
-%{_bindir}/%{name}_searcher
-%{_libdir}/lib*.so.*
-%{_mandir}/man3/%{name}.3.*
-
-%files devel
-%defattr(-,root,root,-)
-%{_includedir}/%{name}
-%{_bindir}/%{name}-config
-%{_libdir}/lib%{name}.so
-%{_libdir}/pkgconfig/%{name}.pc
-%{_datadir}/aclocal/%{name}.m4
-%{_infodir}/%{name}-ref.info.*
-%{_mandir}/man1/%{name}-config.1.*
-
-%files doc
-%defattr(-,root,root,-)
-%doc %{mydocs}/html
-%doc AUTHORS ChangeLog COPYING NEWS README
-
-
-%changelog
-* Sun Mar 29 2009 Denis Arnaud <den...@m4...> 0.3.0-1
-- Now relies on the new SOCI RPM
-
-* Sun Mar 22 2009 Denis Arnaud <den...@m4...> 0.2.0-1
-- RPM release for Fedora 10
-
Property changes on: trunk/simcrs/test
___________________________________________________________________
Modified: svn:externals
- samples https://stdair.svn.sourceforge.net/svnroot/stdair/trunk/stdair/test/samples
stdair https://stdair.svn.sourceforge.net/svnroot/stdair/trunk/stdair/test/stdair
airsched https://air-sched.svn.sourceforge.net/svnroot/air-sched/trunk/airsched/test/airsched
airinv https://airinv.svn.sourceforge.net/svnroot/airinv/trunk/airinv/test/airinv
+ samples https://stdair.svn.sourceforge.net/svnroot/stdair/trunk/stdair/test/samples
airsched https://air-sched.svn.sourceforge.net/svnroot/air-sched/trunk/airsched/test/airsched
airinv https://airinv.svn.sourceforge.net/svnroot/airinv/trunk/airinv/test/airinv
Modified: trunk/simcrs/test/Makefile.am
===================================================================
--- trunk/simcrs/test/Makefile.am 2010-08-20 14:55:41 UTC (rev 54)
+++ trunk/simcrs/test/Makefile.am 2010-09-06 19:28:56 UTC (rev 55)
@@ -1,10 +1,10 @@
-## test sub-directory
+## test sub-directory of the SimCRS project
include $(top_srcdir)/Makefile.common
MAINTAINERCLEANFILES = Makefile.in
##
-SUBDIRS = samples stdair airsched airinv simcrs
+SUBDIRS = samples airsched airinv simcrs
EXTRA_DIST =
@@ -12,3 +12,4 @@
check_PROGRAMS =
TESTS = $(check_PROGRAMS)
XFAIL_TESTS = #
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qua...@us...> - 2010-08-20 14:55:49
|
Revision: 54
http://simcrs.svn.sourceforge.net/simcrs/?rev=54&view=rev
Author: quannaus
Date: 2010-08-20 14:55:41 +0000 (Fri, 20 Aug 2010)
Log Message:
-----------
[dev] Adapted to the new stdair.
Modified Paths:
--------------
trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
Modified: trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
===================================================================
--- trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-08-20 10:46:42 UTC (rev 53)
+++ trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-08-20 14:55:41 UTC (rev 54)
@@ -13,10 +13,10 @@
#include <stdair/STDAIR_Types.hpp>
#include <stdair/basic/BasChronometer.hpp>
#include <stdair/basic/BasFileMgr.hpp>
-#include <stdair/bom/BomManager.hpp> // for display()
+#include <stdair/bom/BomManager.hpp>
#include <stdair/bom/TravelSolutionStruct.hpp>
-#include <stdair/bom/InventoryTypes.hpp>
-#include <stdair/bom/BomSource.hpp>
+#include <stdair/bom/BomRoot.hpp>
+#include <stdair/bom/Inventory.hpp>
#include <stdair/service/Logger.hpp>
#include <stdair/STDAIR_Service.hpp>
// Airline Inventory
@@ -211,14 +211,14 @@
stdair::BomRoot& lBomRoot = lSTDAIR_Service_ptr->getBomRoot();
// Retrieve the list of Inventory objects: one per airline
- const stdair::InventoryList_T& lInventoryList = lBomRoot.getInventoryList();
-
- // Browse the inventory list and initialise the corresponding
+ stdair::InventoryMap_T& lInventoryMap =
+ stdair::BomManager::getMap<stdair::Inventory> (lBomRoot);
+
+ // Browse the inventory map and initialise the corresponding
// AirInv services.
- for (stdair::InventoryList_T::iterator itInv = lInventoryList.begin();
- itInv != lInventoryList.end(); ++itInv) {
- stdair::Inventory& lCurrentInv = *itInv;
- const stdair::AirlineCode_T& lAirlineCode = lCurrentInv.getAirlineCode();
+ for (stdair::InventoryMap_T::iterator itInv = lInventoryMap.begin();
+ itInv != lInventoryMap.end(); ++itInv) {
+ const stdair::AirlineCode_T& lAirlineCode = itInv->first;
// Build an AirInv service instance, tracked by a Boost SmartPointer
AIRINV_ServicePtr_T lAIRINV_Service_ptr =
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <den...@us...> - 2010-08-20 10:46:48
|
Revision: 53
http://simcrs.svn.sourceforge.net/simcrs/?rev=53&view=rev
Author: denis_arnaud
Date: 2010-08-20 10:46:42 +0000 (Fri, 20 Aug 2010)
Log Message:
-----------
[Build] Added a missing tab in the Makefile.
Modified Paths:
--------------
trunk/simcrs/Makefile.am
Modified: trunk/simcrs/Makefile.am
===================================================================
--- trunk/simcrs/Makefile.am 2010-08-16 07:56:48 UTC (rev 52)
+++ trunk/simcrs/Makefile.am 2010-08-20 10:46:42 UTC (rev 53)
@@ -50,7 +50,7 @@
snapshot-src:
- $(MAKE) dist distdir=@PACKAGE_TARNAME@-`date +"%Y%m%d"`
+ $(MAKE) dist distdir=@PACKAGE_TARNAME@-`date +"%Y%m%d"`
snapshot-html:
$(MAKE) -C doc dist-html html_tarname=@PACKAGE_TARNAME@-html-doc-`date +"%Y%m%d"`
@@ -71,3 +71,4 @@
upload-gui: dist-gui
@UPLOAD_COMMAND@ @PACKAGE_TARNAME@-gui-@VERSION@.tar.gz \
@PACKAGE_TARNAME@-gui-@VERSION@.tar.bz2
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qua...@us...> - 2010-08-16 07:56:55
|
Revision: 52
http://simcrs.svn.sourceforge.net/simcrs/?rev=52&view=rev
Author: quannaus
Date: 2010-08-16 07:56:48 +0000 (Mon, 16 Aug 2010)
Log Message:
-----------
[dev] Implemented a sale.
Modified Paths:
--------------
trunk/simcrs/simcrs/command/DistributionManager.cpp
trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
Modified: trunk/simcrs/simcrs/command/DistributionManager.cpp
===================================================================
--- trunk/simcrs/simcrs/command/DistributionManager.cpp 2010-07-07 15:11:00 UTC (rev 51)
+++ trunk/simcrs/simcrs/command/DistributionManager.cpp 2010-08-16 07:56:48 UTC (rev 52)
@@ -32,33 +32,32 @@
const stdair::NbOfSeats_T& iPartySize) {
try {
- // const stdair::OutboundPath& lOutboundPath =
- // iTravelSolution.getOutboundPath();
- // TODO: optimise this part.
- // Browse the list/map of AIRINV_Services to see if the airline
- // takes part in the sale, and forward the sale procedure to
- // theses airlines.
- // for (AIRINV::AIRINV_ServicePtr_Map_T::const_iterator itINV =
- // iAIRINV_ServiceMap.begin();
- // itINV != iAIRINV_ServiceMap.end(); ++itINV) {
- // const stdair::AirlineCode_T lCurrentAirlineCode = itINV->first;
+ const stdair::KeyList_T& lSegmentDateKeyList =
+ iTravelSolution.getSegmentDateKeyList ();
+ const stdair::ClassList_String_T& lBookingClassKeyList =
+ iTravelSolution.getBookingClassKeyList();
+ stdair::ClassList_String_T::const_iterator itBookingClassKey =
+ lBookingClassKeyList.begin();
+ for (stdair::KeyList_T::const_iterator itKey = lSegmentDateKeyList.begin();
+ itKey != lSegmentDateKeyList.end(); ++itKey, ++itBookingClassKey) {
+ const std::string& lSegmentDateKey = *itKey;
+ stdair::AirlineCode_T lAirlineCode = "";
+ lAirlineCode = lSegmentDateKey.at(0) + lSegmentDateKey.at(1);
- // const bool isAirlineFlown =
- // lOutboundPath.isAirlineFlown (lCurrentAirlineCode);
- // if (isAirlineFlown == true) {
- // DEBUG
- // STDAIR_LOG_DEBUG ("A booking will be made, reported by the "
- // << iCRSCode << " CRS, for the airline "
- // << lCurrentAirlineCode << ", and for "
- // << iPartySize << " passengers.");
-
- // AIRINV::AIRINV_ServicePtr_T lAIRINV_Service_ptr = itINV->second;
-
- // assert (lAIRINV_Service_ptr != NULL);
- // lAIRINV_Service_ptr->sell (iTravelSolution, iPartySize);
- // }
- // }
-
+ // Do the sale within the corresponding inventory.
+ AIRINV::AIRINV_ServicePtr_Map_T::const_iterator itAirinvService =
+ iAIRINV_ServiceMap.find (lAirlineCode);
+ assert (itAirinvService != iAIRINV_ServiceMap.end());
+ const AIRINV::AIRINV_ServicePtr_T& lAirinvService_ptr =
+ itAirinvService->second;
+ assert (lAirinvService_ptr);
+ std::ostringstream ostr;
+ ostr <<*itBookingClassKey;
+ const stdair::ClassCode_T lClassCode (ostr.str());
+ lAirinvService_ptr->sell (lSegmentDateKey, lClassCode, iPartySize);
+ }
+
+
// DEBUG
// STDAIR_LOG_DEBUG ("The booking has been made");
Modified: trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
===================================================================
--- trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-07-07 15:11:00 UTC (rev 51)
+++ trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-08-16 07:56:48 UTC (rev 52)
@@ -163,10 +163,6 @@
throw FileNotFoundException();
}
- // Retrieve the service context
- assert (_simcrsServiceContext != NULL);
- SIMCRS_ServiceContext& lSIMCRS_ServiceContext = *_simcrsServiceContext;
-
// Initialise the children AirSched service context
initAIRSCHEDService (iScheduleInputFilename);
@@ -269,10 +265,9 @@
lAIRSCHED_Service_ptr->getTravelSolutions (oTravelSolutionList,
iBookingRequest);
- const double lTravelSolutionRetrievingMeasure =
- lTravelSolutionRetrievingChronometer.elapsed();
-
- // DEBUG
+ // DEBUG
+ // const double lTravelSolutionRetrievingMeasure =
+ // lTravelSolutionRetrievingChronometer.elapsed();
// STDAIR_LOG_DEBUG ("Travel solution retrieving: "
// << lTravelSolutionRetrievingMeasure << " - "
// << lSIMCRS_ServiceContext.display());
@@ -309,8 +304,8 @@
lAvailabilityRetrievalChronometer.start();
DistributionManager::getAvailability (lAIRINV_ServiceMap,
lCRSCode, ioTravelSolutionList);
- const double lAvailabilityRetrievalMeasure =
- lAvailabilityRetrievalChronometer.elapsed();
+ // const double lAvailabilityRetrievalMeasure =
+ // lAvailabilityRetrievalChronometer.elapsed();
} catch (const std::exception& error) {
STDAIR_LOG_ERROR ("Exception: " << error.what());
@@ -343,9 +338,9 @@
lSellChronometer.start();
DistributionManager::sell (lAIRINV_ServiceMap,
lCRSCode, iTravelSolution, iPartySize);
- const double lSellMeasure = lSellChronometer.elapsed();
// DEBUG
+ // const double lSellMeasure = lSellChronometer.elapsed();
// STDAIR_LOG_DEBUG ("Booking sell: " << lSellMeasure << " - "
// << lSIMCRS_ServiceContext.display());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qua...@us...> - 2010-07-07 15:11:07
|
Revision: 51
http://simcrs.svn.sourceforge.net/simcrs/?rev=51&view=rev
Author: quannaus
Date: 2010-07-07 15:11:00 +0000 (Wed, 07 Jul 2010)
Log Message:
-----------
[dev] Removed Network.
Modified Paths:
--------------
trunk/simcrs/simcrs/command/DistributionManager.cpp
trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
trunk/simcrs/simcrs/service/SIMCRS_ServiceContext.hpp
Modified: trunk/simcrs/simcrs/command/DistributionManager.cpp
===================================================================
--- trunk/simcrs/simcrs/command/DistributionManager.cpp 2010-06-13 20:23:46 UTC (rev 50)
+++ trunk/simcrs/simcrs/command/DistributionManager.cpp 2010-07-07 15:11:00 UTC (rev 51)
@@ -4,7 +4,6 @@
// STL
#include <cassert>
// StdAir
-#include <stdair/bom/OutboundPath.hpp>
#include <stdair/bom/TravelSolutionStruct.hpp>
#include <stdair/service/Logger.hpp>
// Airline Inventory
@@ -33,32 +32,32 @@
const stdair::NbOfSeats_T& iPartySize) {
try {
- const stdair::OutboundPath& lOutboundPath =
- iTravelSolution.getOutboundPath();
+ // const stdair::OutboundPath& lOutboundPath =
+ // iTravelSolution.getOutboundPath();
// TODO: optimise this part.
// Browse the list/map of AIRINV_Services to see if the airline
// takes part in the sale, and forward the sale procedure to
// theses airlines.
- for (AIRINV::AIRINV_ServicePtr_Map_T::const_iterator itINV =
- iAIRINV_ServiceMap.begin();
- itINV != iAIRINV_ServiceMap.end(); ++itINV) {
- const stdair::AirlineCode_T lCurrentAirlineCode = itINV->first;
+ // for (AIRINV::AIRINV_ServicePtr_Map_T::const_iterator itINV =
+ // iAIRINV_ServiceMap.begin();
+ // itINV != iAIRINV_ServiceMap.end(); ++itINV) {
+ // const stdair::AirlineCode_T lCurrentAirlineCode = itINV->first;
- const bool isAirlineFlown =
- lOutboundPath.isAirlineFlown (lCurrentAirlineCode);
- if (isAirlineFlown == true) {
+ // const bool isAirlineFlown =
+ // lOutboundPath.isAirlineFlown (lCurrentAirlineCode);
+ // if (isAirlineFlown == true) {
// DEBUG
// STDAIR_LOG_DEBUG ("A booking will be made, reported by the "
// << iCRSCode << " CRS, for the airline "
// << lCurrentAirlineCode << ", and for "
// << iPartySize << " passengers.");
- AIRINV::AIRINV_ServicePtr_T lAIRINV_Service_ptr = itINV->second;
+ // AIRINV::AIRINV_ServicePtr_T lAIRINV_Service_ptr = itINV->second;
- assert (lAIRINV_Service_ptr != NULL);
- lAIRINV_Service_ptr->sell (iTravelSolution, iPartySize);
- }
- }
+ // assert (lAIRINV_Service_ptr != NULL);
+ // lAIRINV_Service_ptr->sell (iTravelSolution, iPartySize);
+ // }
+ // }
// DEBUG
// STDAIR_LOG_DEBUG ("The booking has been made");
Modified: trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
===================================================================
--- trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-06-13 20:23:46 UTC (rev 50)
+++ trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-07-07 15:11:00 UTC (rev 51)
@@ -181,7 +181,6 @@
// Retrieve the SimCRS service context
assert (_simcrsServiceContext != NULL);
SIMCRS_ServiceContext& lSIMCRS_ServiceContext = *_simcrsServiceContext;
-
// Retrieve the StdAir service context
stdair::STDAIR_ServicePtr_T lSTDAIR_Service_ptr =
Modified: trunk/simcrs/simcrs/service/SIMCRS_ServiceContext.hpp
===================================================================
--- trunk/simcrs/simcrs/service/SIMCRS_ServiceContext.hpp 2010-06-13 20:23:46 UTC (rev 50)
+++ trunk/simcrs/simcrs/service/SIMCRS_ServiceContext.hpp 2010-07-07 15:11:00 UTC (rev 51)
@@ -56,7 +56,6 @@
/** Destructor. */
~SIMCRS_ServiceContext();
-
private:
// ///////////////// Getters ///////////////////
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <den...@us...> - 2010-06-13 20:23:53
|
Revision: 50
http://simcrs.svn.sourceforge.net/simcrs/?rev=50&view=rev
Author: denis_arnaud
Date: 2010-06-13 20:23:46 +0000 (Sun, 13 Jun 2010)
Log Message:
-----------
[Test] Updated the dependency for the new ExtraCPPUnit library name.
Modified Paths:
--------------
trunk/simcrs/configure.ac
trunk/simcrs/test/simcrs/Makefile.am
Modified: trunk/simcrs/configure.ac
===================================================================
--- trunk/simcrs/configure.ac 2010-05-03 11:51:54 UTC (rev 49)
+++ trunk/simcrs/configure.ac 2010-06-13 20:23:46 UTC (rev 50)
@@ -103,14 +103,17 @@
fi
-# -----------------------------------------------------------
-# Python
-# -----------------------------------------------------------
-PGAC_CHECK_PYTHON_EMBED_SETUP
-AC_SUBST(PYTHON_VERSION)
-AC_SUBST(PYTHON_LIBS)
-AC_SUBST(PYTHON_CFLAGS)
-AC_SUBST(PYTHON_ADD_LIBS)
+# -----------------------------------------------------------------------------
+# Support for ExtraCC (Extra-CruiseControl): http://sf.net/projects/extracc
+# -----------------------------------------------------------------------------
+# Note: the ExtraCC is now imported as a Subversion external reference,
+# thus directly accessible within the extracppunit directory.
+# When that library will be widely avaible on Linux distributions,
+# the external reference can be removed and the following line uncommented.
+#AM_PATH_EXTRACC
+#AC_SUBST(EXTRACC_VERSION)
+#AC_SUBST(EXTRACC_CFLAGS)
+#AC_SUBST(EXTRACC_LIBS)
# -----------------------------------------------------------
# Python: http://www.python.org
@@ -362,6 +365,11 @@
o SOCI_CFLAGS ..... : ${SOCI_CFLAGS}
o SOCI_LIBS ....... : ${SOCI_LIBS}
+ - ExtraCC ........... :
+ o EXTRACC_VERSION . : ${EXTRACC_VERSION}
+ o EXTRACC_CFLAGS .. : ${EXTRACC_CFLAGS}
+ o EXTRACC_LIBS .... : ${EXTRACC_LIBS}
+
- CPPUNIT ........... :
o CPPUNIT_VERSION . : ${CPPUNIT_VERSION}
o CPPUNIT_CFLAGS .. : ${CPPUNIT_CFLAGS}
Modified: trunk/simcrs/test/simcrs/Makefile.am
===================================================================
--- trunk/simcrs/test/simcrs/Makefile.am 2010-05-03 11:51:54 UTC (rev 49)
+++ trunk/simcrs/test/simcrs/Makefile.am 2010-06-13 20:23:46 UTC (rev 50)
@@ -18,7 +18,8 @@
CRSTestSuite_LDADD =
CRSTestSuite_LDFLAGS = \
$(BOOST_LIBS) $(CPPUNIT_LIBS) \
- $(top_builddir)/extracppunit/libextracc-extracppunit.la \
+ $(top_builddir)/extracppunit/libextracppunit.la \
$(top_builddir)/stdair/core/libstdair.la \
$(top_builddir)/simcrs/core/libsimcrs.la
# $(top_builddir)/airinv/core/libairinv.la
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qua...@us...> - 2010-05-03 11:52:00
|
Revision: 49
http://simcrs.svn.sourceforge.net/simcrs/?rev=49&view=rev
Author: quannaus
Date: 2010-05-03 11:51:54 +0000 (Mon, 03 May 2010)
Log Message:
-----------
[dev] Removed StatStatus and StartAnalysisDate.
Modified Paths:
--------------
trunk/simcrs/simcrs/SIMCRS_Service.hpp
trunk/simcrs/simcrs/SIMCRS_Types.hpp
trunk/simcrs/simcrs/command/DistributionManager.cpp
trunk/simcrs/simcrs/command/DistributionManager.hpp
trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
Modified: trunk/simcrs/simcrs/SIMCRS_Service.hpp
===================================================================
--- trunk/simcrs/simcrs/SIMCRS_Service.hpp 2010-04-25 17:31:09 UTC (rev 48)
+++ trunk/simcrs/simcrs/SIMCRS_Service.hpp 2010-05-03 11:51:54 UTC (rev 49)
@@ -78,6 +78,9 @@
// /////////// Business Methods /////////////
/** Get a list of travel solutions corresponding to the booking request. */
stdair::TravelSolutionList_T getTravelSolutions (const stdair::BookingRequestStruct&);
+
+ /** Get the availability for each travel solution in the list.. */
+ void getAvailability (stdair::TravelSolutionList_T&);
/** Register a booking. */
void sell (const stdair::TravelSolutionStruct&, const stdair::PartySize_T&);
Modified: trunk/simcrs/simcrs/SIMCRS_Types.hpp
===================================================================
--- trunk/simcrs/simcrs/SIMCRS_Types.hpp 2010-04-25 17:31:09 UTC (rev 48)
+++ trunk/simcrs/simcrs/SIMCRS_Types.hpp 2010-05-03 11:51:54 UTC (rev 49)
@@ -35,7 +35,10 @@
class BookingException : public RootException {
};
+ class AvailabilityRetrievalException : public RootException {
+ };
+
// /////////////// Log /////////////
/** Level of logs. */
namespace LOG {
Modified: trunk/simcrs/simcrs/command/DistributionManager.cpp
===================================================================
--- trunk/simcrs/simcrs/command/DistributionManager.cpp 2010-04-25 17:31:09 UTC (rev 48)
+++ trunk/simcrs/simcrs/command/DistributionManager.cpp 2010-05-03 11:51:54 UTC (rev 49)
@@ -13,9 +13,20 @@
#include <simcrs/command/DistributionManager.hpp>
namespace SIMCRS {
-
- // //////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
void DistributionManager::
+ getAvailability (const AIRINV::AIRINV_ServicePtr_Map_T& iAIRINV_ServiceMap,
+ const CRSCode_T& iCRSCode,
+ stdair::TravelSolutionList_T& ioTravelSolutionList) {
+ for (stdair::TravelSolutionList_T::iterator itTS =
+ ioTravelSolutionList.begin();
+ itTS != ioTravelSolutionList.end(); ++itTS) {
+ stdair::TravelSolutionStruct& lCurrentTravelSolution = *itTS;
+ }
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ void DistributionManager::
sell (const AIRINV::AIRINV_ServicePtr_Map_T& iAIRINV_ServiceMap,
const CRSCode_T& iCRSCode,
const stdair::TravelSolutionStruct& iTravelSolution,
Modified: trunk/simcrs/simcrs/command/DistributionManager.hpp
===================================================================
--- trunk/simcrs/simcrs/command/DistributionManager.hpp 2010-04-25 17:31:09 UTC (rev 48)
+++ trunk/simcrs/simcrs/command/DistributionManager.hpp 2010-05-03 11:51:54 UTC (rev 49)
@@ -6,6 +6,7 @@
// //////////////////////////////////////////////////////////////////////
// STDAIR
#include <stdair/STDAIR_Types.hpp>
+#include <stdair/bom/TravelSolutionTypes.hpp>
// Airinv
#include <airinv/AIRINV_Types.hpp>
// Simcrs
@@ -22,7 +23,10 @@
class DistributionManager {
friend class SIMCRS_Service;
private:
-
+ /** Get the availability for each travel solution in the list.. */
+ static void getAvailability (const AIRINV::AIRINV_ServicePtr_Map_T&,
+ const CRSCode_T&, stdair::TravelSolutionList_T&);
+
/** Register a booking (segment sell). */
static void sell (const AIRINV::AIRINV_ServicePtr_Map_T&,
const CRSCode_T&, const stdair::TravelSolutionStruct&,
Modified: trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
===================================================================
--- trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-04-25 17:31:09 UTC (rev 48)
+++ trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-05-03 11:51:54 UTC (rev 49)
@@ -32,17 +32,17 @@
namespace SIMCRS {
- // //////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
SIMCRS_Service::SIMCRS_Service () : _simcrsServiceContext (NULL) {
assert (false);
}
- // //////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
SIMCRS_Service::SIMCRS_Service (const SIMCRS_Service& iService) {
assert (false);
}
- // //////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
SIMCRS_Service::
SIMCRS_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr,
const CRSCode_T& iCRSCode,
@@ -63,7 +63,7 @@
init (iScheduleInputFilename);
}
- // //////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
SIMCRS_Service::
SIMCRS_Service (const stdair::BasLogParams& iLogParams,
const stdair::BasDBParams& iDBParams,
@@ -81,7 +81,7 @@
init (iScheduleInputFilename);
}
- // //////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
SIMCRS_Service::
SIMCRS_Service (const stdair::BasLogParams& iLogParams,
const CRSCode_T& iCRSCode,
@@ -98,13 +98,13 @@
init (iScheduleInputFilename);
}
- // //////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
SIMCRS_Service::~SIMCRS_Service () {
// Delete/Clean all the objects from memory
finalise();
}
- // //////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
void SIMCRS_Service::initServiceContext (const CRSCode_T& iCRSCode) {
// Initialise the service context
SIMCRS_ServiceContext& lSIMCRS_ServiceContext =
@@ -112,7 +112,7 @@
_simcrsServiceContext = &lSIMCRS_ServiceContext;
}
- // //////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
void SIMCRS_Service::
initStdAirService (const stdair::BasLogParams& iLogParams,
const stdair::BasDBParams& iDBParams) {
@@ -132,7 +132,7 @@
lSIMCRS_ServiceContext.setSTDAIR_Service (lSTDAIR_Service_ptr);
}
- // //////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
void SIMCRS_Service::
initStdAirService (const stdair::BasLogParams& iLogParams) {
@@ -151,7 +151,7 @@
lSIMCRS_ServiceContext.setSTDAIR_Service (lSTDAIR_Service_ptr);
}
- // //////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
void SIMCRS_Service::init (const stdair::Filename_T& iScheduleInputFilename) {
// Check that the file path given as input corresponds to an actual file
@@ -174,7 +174,7 @@
initAIRINVServices ();
}
- // //////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
void SIMCRS_Service::
initAIRSCHEDService (const stdair::Filename_T& iScheduleInputFilename) {
@@ -188,25 +188,19 @@
lSIMCRS_ServiceContext.getSTDAIR_Service();
assert (lSTDAIR_Service_ptr != NULL);
-
- // ////////////// Airline Schedule Management (AirSched) /////////////
- // TODO: do not hardcode the start analysis date
- const stdair::Date_T lStartAnalysisDate (2000, boost::gregorian::Jan, 1);
-
// Initialise the AIRSCHED service handler
// Note that the (Boost.)Smart Pointer keeps track of the references
// on the Service object, and deletes that object when it is no longer
// referenced (e.g., at the end of the process).
AIRSCHED_ServicePtr_T lAIRSCHED_Service_ptr =
boost::make_shared<AIRSCHED::AIRSCHED_Service> (lSTDAIR_Service_ptr,
- lStartAnalysisDate,
iScheduleInputFilename);
// Store the AirSched service object within the (SimCRS) service context
lSIMCRS_ServiceContext.setAIRSCHED_Service (lAIRSCHED_Service_ptr);
}
- // //////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
void SIMCRS_Service::initAIRINVServices () {
// Retrieve the SimCRS service context
@@ -246,7 +240,7 @@
}
}
- // //////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
void SIMCRS_Service::finalise () {
assert (_simcrsServiceContext != NULL);
}
@@ -291,6 +285,39 @@
return oTravelSolutionList;
}
+
+ // ////////////////////////////////////////////////////////////////////
+ void SIMCRS_Service::
+ getAvailability (stdair::TravelSolutionList_T& ioTravelSolutionList) {
+ if (_simcrsServiceContext == NULL) {
+ throw NonInitialisedServiceException();
+ }
+ assert (_simcrsServiceContext != NULL);
+ SIMCRS_ServiceContext& lSIMCRS_ServiceContext= *_simcrsServiceContext;
+
+ try {
+ // Retrieve the CRS code
+ const CRSCode_T& lCRSCode =
+ lSIMCRS_ServiceContext.getCRSCode();
+
+ // TODO: optimise this part.
+ // Retrieve the map/list of AIRINV_Services
+ const AIRINV_ServicePtr_Map_T& lAIRINV_ServiceMap =
+ lSIMCRS_ServiceContext.getAIRINV_ServiceMap ();
+
+ // Delegate the action to the dedicated command
+ stdair::BasChronometer lAvailabilityRetrievalChronometer;
+ lAvailabilityRetrievalChronometer.start();
+ DistributionManager::getAvailability (lAIRINV_ServiceMap,
+ lCRSCode, ioTravelSolutionList);
+ const double lAvailabilityRetrievalMeasure =
+ lAvailabilityRetrievalChronometer.elapsed();
+
+ } catch (const std::exception& error) {
+ STDAIR_LOG_ERROR ("Exception: " << error.what());
+ throw AvailabilityRetrievalException();
+ }
+ }
// ////////////////////////////////////////////////////////////////////
void SIMCRS_Service::sell(const stdair::TravelSolutionStruct& iTravelSolution,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <den...@us...> - 2010-04-25 17:31:15
|
Revision: 48
http://simcrs.svn.sourceforge.net/simcrs/?rev=48&view=rev
Author: denis_arnaud
Date: 2010-04-25 17:31:09 +0000 (Sun, 25 Apr 2010)
Log Message:
-----------
[Conf] Added the server layer in the AirInv library.
Modified Paths:
--------------
trunk/simcrs/configure.ac
Modified: trunk/simcrs/configure.ac
===================================================================
--- trunk/simcrs/configure.ac 2010-04-22 11:02:36 UTC (rev 47)
+++ trunk/simcrs/configure.ac 2010-04-25 17:31:09 UTC (rev 48)
@@ -272,6 +272,7 @@
airinv/config/Makefile
airinv/core/Makefile
airinv/batches/Makefile
+ airinv/server/Makefile
simcrs/Makefile
simcrs/basic/Makefile
simcrs/bom/Makefile
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qua...@us...> - 2010-04-22 11:02:42
|
Revision: 47
http://simcrs.svn.sourceforge.net/simcrs/?rev=47&view=rev
Author: quannaus
Date: 2010-04-22 11:02:36 +0000 (Thu, 22 Apr 2010)
Log Message:
-----------
[dev] Adapted to the new version of stdair.
Modified Paths:
--------------
trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
Modified: trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
===================================================================
--- trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-04-06 14:43:56 UTC (rev 46)
+++ trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-04-22 11:02:36 UTC (rev 47)
@@ -14,11 +14,9 @@
#include <stdair/basic/BasChronometer.hpp>
#include <stdair/basic/BasFileMgr.hpp>
#include <stdair/bom/BomManager.hpp> // for display()
-#include <stdair/bom/BomRoot.hpp>
-#include <stdair/bom/BomList.hpp>
#include <stdair/bom/TravelSolutionStruct.hpp>
#include <stdair/bom/InventoryTypes.hpp>
-#include <stdair/bom/Inventory.hpp>
+#include <stdair/bom/BomSource.hpp>
#include <stdair/service/Logger.hpp>
#include <stdair/STDAIR_Service.hpp>
// Airline Inventory
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <den...@us...> - 2010-04-06 14:44:02
|
Revision: 46
http://simcrs.svn.sourceforge.net/simcrs/?rev=46&view=rev
Author: denis_arnaud
Date: 2010-04-06 14:43:56 +0000 (Tue, 06 Apr 2010)
Log Message:
-----------
[Conf] Added the StdAir batch layer.
Modified Paths:
--------------
trunk/simcrs/configure.ac
Modified: trunk/simcrs/configure.ac
===================================================================
--- trunk/simcrs/configure.ac 2010-03-24 12:03:02 UTC (rev 45)
+++ trunk/simcrs/configure.ac 2010-04-06 14:43:56 UTC (rev 46)
@@ -253,6 +253,7 @@
stdair/config/Makefile
stdair/service/Makefile
stdair/core/Makefile
+ stdair/batches/Makefile
airsched/Makefile
airsched/basic/Makefile
airsched/bom/Makefile
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <den...@us...> - 2010-03-24 12:03:16
|
Revision: 45
http://simcrs.svn.sourceforge.net/simcrs/?rev=45&view=rev
Author: denis_arnaud
Date: 2010-03-24 12:03:02 +0000 (Wed, 24 Mar 2010)
Log Message:
-----------
[Test] Migrated the test to CPPUnit-framework.
Modified Paths:
--------------
trunk/simcrs/test/simcrs/Makefile.am
Added Paths:
-----------
trunk/simcrs/test/simcrs/CRSTestSuite.cpp
trunk/simcrs/test/simcrs/CRSTestSuite.hpp
Removed Paths:
-------------
trunk/simcrs/test/simcrs/sell.cpp
Property Changed:
----------------
trunk/simcrs/test/simcrs/
Property changes on: trunk/simcrs/test/simcrs
___________________________________________________________________
Modified: svn:ignore
- .deps
.libs
Makefile.in
Makefile
sell
sell.log
+ .deps
.libs
Makefile.in
Makefile
CRSTestSuite
CRSTestSuite.log
CRSTestSuite_results.xml
Added: trunk/simcrs/test/simcrs/CRSTestSuite.cpp
===================================================================
--- trunk/simcrs/test/simcrs/CRSTestSuite.cpp (rev 0)
+++ trunk/simcrs/test/simcrs/CRSTestSuite.cpp 2010-03-24 12:03:02 UTC (rev 45)
@@ -0,0 +1,86 @@
+// STL
+#include <sstream>
+#include <fstream>
+#include <string>
+// CPPUNIT
+#include <extracppunit/CppUnitCore.hpp>
+// StdAir
+#include <stdair/basic/BasLogParams.hpp>
+#include <stdair/basic/BasDBParams.hpp>
+#include <stdair/bom/TravelSolutionStruct.hpp>
+// SimCRS
+#include <simcrs/SIMCRS_Service.hpp>
+// SimCRS Test Suite
+#include <test/simcrs/CRSTestSuite.hpp>
+
+// //////////////////////////////////////////////////////////////////////
+// Test is based on ...
+// //////////////////////////////////////////////////////////////////////
+
+// //////////////////////////////////////////////////////////////////////
+void CRSTestSuite::simpleCRSHelper() {
+
+ try {
+
+ // CRS code
+ std::string lCRSCode ("1P");
+
+ // Airline code
+ std::string lAirlineCode ("BA");
+
+ // Number of passengers in the travelling group
+ // stdair::PartySize_T lPartySize = 5;
+
+ // Output log File
+ std::string lLogFilename ("CRSTestSuite.log");
+
+ // Schedule input filename
+ std::string lScheduleFilename ("../samples/schedule01.csv");
+
+ // Set the log parameters
+ std::ofstream logOutputFile;
+ // Open and clean the log outputfile
+ logOutputFile.open (lLogFilename.c_str());
+ logOutputFile.clear();
+
+ // Initialise the list of classes/buckets
+ const stdair::BasLogParams lLogParams (stdair::LOG::DEBUG, logOutputFile);
+ SIMCRS::SIMCRS_Service simcrsService (lLogParams, lCRSCode,
+ lScheduleFilename);
+
+ // Make a booking
+ //simcrsService.sell (lAirlineCode, lPartySize);
+
+ } catch (const SIMCRS::RootException& otexp) {
+ std::cerr << "Standard exception: " << otexp.what() << std::endl;
+ return;
+
+ } catch (const std::exception& stde) {
+ std::cerr << "Standard exception: " << stde.what() << std::endl;
+ return;
+
+ } catch (...) {
+ return;
+ }
+
+}
+
+// //////////////////////////////////////////////////////////////////////
+void CRSTestSuite::simpleCRS () {
+ // TODO: Check that the crs goes as expected
+ CPPUNIT_ASSERT_NO_THROW ( simpleCRSHelper(););
+}
+
+// //////////////////////////////////////////////////////////////////////
+// void CRSTestSuite::errorCase () {
+// CPPUNIT_ASSERT (false);
+// }
+
+// //////////////////////////////////////////////////////////////////////
+CRSTestSuite::CRSTestSuite () {
+ _describeKey << "Running test on CRS";
+}
+
+// /////////////// M A I N /////////////////
+CPPUNIT_MAIN()
+
Added: trunk/simcrs/test/simcrs/CRSTestSuite.hpp
===================================================================
--- trunk/simcrs/test/simcrs/CRSTestSuite.hpp (rev 0)
+++ trunk/simcrs/test/simcrs/CRSTestSuite.hpp 2010-03-24 12:03:02 UTC (rev 45)
@@ -0,0 +1,31 @@
+// STL
+#include <iosfwd>
+// CPPUNIT
+#include <cppunit/extensions/HelperMacros.h>
+
+/** Utility class for CPPUnit-based testing. */
+class CRSTestSuite : public CppUnit::TestFixture {
+ CPPUNIT_TEST_SUITE (CRSTestSuite);
+ CPPUNIT_TEST (simpleCRS);
+ // CPPUNIT_TEST (errorCase);
+ CPPUNIT_TEST_SUITE_END ();
+public:
+
+ /** Test a simple crs functionality. */
+ void simpleCRS();
+
+ /** Test some error detection functionalities. */
+ // void errorCase ();
+
+ /** Constructor. */
+ CRSTestSuite ();
+
+private:
+ /** Test a simple crs functionality. */
+ void simpleCRSHelper();
+
+protected:
+ std::stringstream _describeKey;
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION (CRSTestSuite);
Modified: trunk/simcrs/test/simcrs/Makefile.am
===================================================================
--- trunk/simcrs/test/simcrs/Makefile.am 2010-03-21 11:53:46 UTC (rev 44)
+++ trunk/simcrs/test/simcrs/Makefile.am 2010-03-24 12:03:02 UTC (rev 45)
@@ -9,22 +9,16 @@
EXTRA_DIST =
##
-check_PROGRAMS = sell
+check_PROGRAMS = CRSTestSuite
TESTS = $(check_PROGRAMS)
XFAIL_TESTS = #
-#InventoryTestSuite_SOURCES = InventoryTestSuite.hpp \
- InventoryTestSuite.cpp
-#InventoryTestSuite_CXXFLAGS= $(CPPUNIT_CFLAGS) $(BOOST_CFLAGS)
-#InventoryTestSuite_LDADD = $(top_builddir)/test/com/libcppunitcore.la
-#InventoryTestSuite_LDFLAGS = \
-# $(BOOST_LIBS) $(CPPUNIT_LIBS) \
-# $(top_builddir)/stdair/core/libstdair.la \
-# $(top_builddir)/simcrs/libsimcrs.la
-
-sell_SOURCES = sell.cpp
-sell_CXXFLAGS= $(CPPUNIT_CFLAGS) $(BOOST_CFLAGS)
-sell_LDADD =
-sell_LDFLAGS = $(BOOST_LIBS) \
+CRSTestSuite_SOURCES = CRSTestSuite.hpp CRSTestSuite.cpp
+CRSTestSuite_CXXFLAGS= $(CPPUNIT_CFLAGS) $(BOOST_CFLAGS)
+CRSTestSuite_LDADD =
+CRSTestSuite_LDFLAGS = \
+ $(BOOST_LIBS) $(CPPUNIT_LIBS) \
+ $(top_builddir)/extracppunit/libextracc-extracppunit.la \
$(top_builddir)/stdair/core/libstdair.la \
$(top_builddir)/simcrs/core/libsimcrs.la
+# $(top_builddir)/airinv/core/libairinv.la
Deleted: trunk/simcrs/test/simcrs/sell.cpp
===================================================================
--- trunk/simcrs/test/simcrs/sell.cpp 2010-03-21 11:53:46 UTC (rev 44)
+++ trunk/simcrs/test/simcrs/sell.cpp 2010-03-24 12:03:02 UTC (rev 45)
@@ -1,59 +0,0 @@
-// STL
-#include <cassert>
-#include <iostream>
-#include <sstream>
-#include <fstream>
-#include <string>
-// STDAIR
-#include <stdair/STDAIR_Types.hpp>
-#include <stdair/basic/BasLogParams.hpp>
-#include <stdair/basic/BasDBParams.hpp>
-#include <stdair/bom/TravelSolutionStruct.hpp>
-// SIMCRS
-#include <simcrs/SIMCRS_Service.hpp>
-#include <simcrs/config/simcrs-paths.hpp>
-
-// ///////// M A I N ////////////
-int main (int argc, char* argv[]) {
-
- try {
-
- // CRS code
- std::string lCRSCode ("1P");
-
- // Airline code
- std::string lAirlineCode ("BA");
-
- // Number of passengers in the travelling group
- stdair::PartySize_T lPartySize = 5;
-
- // Output log File
- std::string lLogFilename ("sell.log");
-
- // Schedule input filename
- std::string lScheduleFilename ("../samples/schedule01.csv");
-
- // Set the log parameters
- std::ofstream logOutputFile;
- // Open and clean the log outputfile
- logOutputFile.open (lLogFilename.c_str());
- logOutputFile.clear();
-
- // Initialise the list of classes/buckets
- const stdair::BasLogParams lLogParams (stdair::LOG::DEBUG, logOutputFile);
- SIMCRS::SIMCRS_Service simcrsService (lLogParams, lCRSCode,
- lScheduleFilename);
-
- // Make a booking
- //simcrsService.sell (lAirlineCode, lPartySize);
-
- } catch (const std::exception& stde) {
- std::cerr << "Standard exception: " << stde.what() << std::endl;
- return -1;
-
- } catch (...) {
- return -1;
- }
-
- return 0;
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <den...@us...> - 2010-03-21 11:53:52
|
Revision: 44
http://simcrs.svn.sourceforge.net/simcrs/?rev=44&view=rev
Author: denis_arnaud
Date: 2010-03-21 11:53:46 +0000 (Sun, 21 Mar 2010)
Log Message:
-----------
[Dev] Fixed an inconsistency in the SIMCRS_Service implementation.
Modified Paths:
--------------
trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
Modified: trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
===================================================================
--- trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-03-15 10:27:27 UTC (rev 43)
+++ trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-03-21 11:53:46 UTC (rev 44)
@@ -295,8 +295,8 @@
}
// ////////////////////////////////////////////////////////////////////
- void SIMCRS_Service::sell (const stdair::TravelSolutionStruct& iTravelSolution,
- const stdair::NbOfSeats_T& iPartySize) {
+ void SIMCRS_Service::sell(const stdair::TravelSolutionStruct& iTravelSolution,
+ const stdair::PartySize_T& iPartySize) {
if (_simcrsServiceContext == NULL) {
throw NonInitialisedServiceException();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <den...@us...> - 2010-03-15 10:27:34
|
Revision: 43
http://simcrs.svn.sourceforge.net/simcrs/?rev=43&view=rev
Author: denis_arnaud
Date: 2010-03-15 10:27:27 +0000 (Mon, 15 Mar 2010)
Log Message:
-----------
[Test] Added the dependency on the StdAir library.
Modified Paths:
--------------
trunk/simcrs/test/simcrs/Makefile.am
Modified: trunk/simcrs/test/simcrs/Makefile.am
===================================================================
--- trunk/simcrs/test/simcrs/Makefile.am 2010-02-18 15:43:08 UTC (rev 42)
+++ trunk/simcrs/test/simcrs/Makefile.am 2010-03-15 10:27:27 UTC (rev 43)
@@ -1,4 +1,4 @@
-## test sub-directory
+## test/simcrs sub-directory
include $(top_srcdir)/Makefile.common
MAINTAINERCLEANFILES = Makefile.in
@@ -19,10 +19,12 @@
#InventoryTestSuite_LDADD = $(top_builddir)/test/com/libcppunitcore.la
#InventoryTestSuite_LDFLAGS = \
# $(BOOST_LIBS) $(CPPUNIT_LIBS) \
+# $(top_builddir)/stdair/core/libstdair.la \
# $(top_builddir)/simcrs/libsimcrs.la
sell_SOURCES = sell.cpp
sell_CXXFLAGS= $(CPPUNIT_CFLAGS) $(BOOST_CFLAGS)
sell_LDADD =
sell_LDFLAGS = $(BOOST_LIBS) \
+ $(top_builddir)/stdair/core/libstdair.la \
$(top_builddir)/simcrs/core/libsimcrs.la
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qua...@us...> - 2010-02-18 15:43:14
|
Revision: 42
http://simcrs.svn.sourceforge.net/simcrs/?rev=42&view=rev
Author: quannaus
Date: 2010-02-18 15:43:08 +0000 (Thu, 18 Feb 2010)
Log Message:
-----------
[dev] Removed a DEBUG.
Modified Paths:
--------------
trunk/simcrs/simcrs/command/DistributionManager.cpp
trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
Modified: trunk/simcrs/simcrs/command/DistributionManager.cpp
===================================================================
--- trunk/simcrs/simcrs/command/DistributionManager.cpp 2010-02-07 21:04:25 UTC (rev 41)
+++ trunk/simcrs/simcrs/command/DistributionManager.cpp 2010-02-18 15:43:08 UTC (rev 42)
@@ -37,10 +37,10 @@
lOutboundPath.isAirlineFlown (lCurrentAirlineCode);
if (isAirlineFlown == true) {
// DEBUG
- STDAIR_LOG_DEBUG ("A booking will be made, reported by the "
- << iCRSCode << " CRS, for the airline "
- << lCurrentAirlineCode << ", and for "
- << iPartySize << " passengers.");
+ // STDAIR_LOG_DEBUG ("A booking will be made, reported by the "
+ // << iCRSCode << " CRS, for the airline "
+ // << lCurrentAirlineCode << ", and for "
+ // << iPartySize << " passengers.");
AIRINV::AIRINV_ServicePtr_T lAIRINV_Service_ptr = itINV->second;
@@ -50,7 +50,7 @@
}
// DEBUG
- STDAIR_LOG_DEBUG ("The booking has been made");
+ // STDAIR_LOG_DEBUG ("The booking has been made");
} catch (const std::exception& lStdError) {
STDAIR_LOG_ERROR ("Error: " << lStdError.what());
Modified: trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
===================================================================
--- trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-02-07 21:04:25 UTC (rev 41)
+++ trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-02-18 15:43:08 UTC (rev 42)
@@ -282,9 +282,9 @@
lTravelSolutionRetrievingChronometer.elapsed();
// DEBUG
- STDAIR_LOG_DEBUG ("Travel solution retrieving: "
- << lTravelSolutionRetrievingMeasure << " - "
- << lSIMCRS_ServiceContext.display());
+ // STDAIR_LOG_DEBUG ("Travel solution retrieving: "
+ // << lTravelSolutionRetrievingMeasure << " - "
+ // << lSIMCRS_ServiceContext.display());
} catch (const std::exception& error) {
STDAIR_LOG_ERROR ("Exception: " << error.what());
@@ -322,8 +322,8 @@
const double lSellMeasure = lSellChronometer.elapsed();
// DEBUG
- STDAIR_LOG_DEBUG ("Booking sell: " << lSellMeasure << " - "
- << lSIMCRS_ServiceContext.display());
+ // STDAIR_LOG_DEBUG ("Booking sell: " << lSellMeasure << " - "
+ // << lSIMCRS_ServiceContext.display());
} catch (const std::exception& error) {
STDAIR_LOG_ERROR ("Exception: " << error.what());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <den...@us...> - 2010-02-07 21:04:32
|
Revision: 41
http://simcrs.svn.sourceforge.net/simcrs/?rev=41&view=rev
Author: denis_arnaud
Date: 2010-02-07 21:04:25 +0000 (Sun, 07 Feb 2010)
Log Message:
-----------
[Init] The AirlineFeature objects are now initialised within the STDAIR_Service instance.
Modified Paths:
--------------
trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
Modified: trunk/simcrs/simcrs/service/SIMCRS_Service.cpp
===================================================================
--- trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-02-07 20:02:59 UTC (rev 40)
+++ trunk/simcrs/simcrs/service/SIMCRS_Service.cpp 2010-02-07 21:04:25 UTC (rev 41)
@@ -15,13 +15,10 @@
#include <stdair/basic/BasFileMgr.hpp>
#include <stdair/bom/BomManager.hpp> // for display()
#include <stdair/bom/BomRoot.hpp>
-#include <stdair/bom/AirlineFeature.hpp>
-#include <stdair/bom/AirlineFeatureSet.hpp>
+#include <stdair/bom/BomList.hpp>
+#include <stdair/bom/TravelSolutionStruct.hpp>
#include <stdair/bom/InventoryTypes.hpp>
#include <stdair/bom/Inventory.hpp>
-#include <stdair/bom/TravelSolutionStruct.hpp>
-#include <stdair/bom/BomList.hpp>
-#include <stdair/factory/FacBomContent.hpp>
#include <stdair/service/Logger.hpp>
#include <stdair/STDAIR_Service.hpp>
// Airline Inventory
@@ -131,30 +128,8 @@
// Smart Pointers component.
stdair::STDAIR_ServicePtr_T lSTDAIR_Service_ptr =
boost::make_shared<stdair::STDAIR_Service> (iLogParams, iDBParams);
-
- // Retrieve the root of the BOM tree, on which all of the other BOM objects
- // will be attached
assert (lSTDAIR_Service_ptr != NULL);
- stdair::BomRoot& lBomRoot = lSTDAIR_Service_ptr->getBomRoot();
- // TODO: do not hardcode the initialisation of AirlineFeatureSet
- // Initialise the set of required airline features
- stdair::AirlineFeatureSet& lAirlineFeatureSet =
- stdair::FacBomContent::instance().create<stdair::AirlineFeatureSet>();
-
- // Airline code
- stdair::AirlineCode_T lAirlineCode ("BA");
- // Initialise an AirlineFeature object
- stdair::AirlineFeatureKey_T lAirlineFeatureKey (lAirlineCode);
- stdair::AirlineFeature& lAirlineFeature = stdair::FacBomContent::
- instance().create<stdair::AirlineFeature> (lAirlineFeatureKey);
- stdair::FacBomContent::
- linkWithParent<stdair::AirlineFeature> (lAirlineFeature,
- lAirlineFeatureSet);
-
- // Set the AirlineFeatureSet for the BomRoot.
- lBomRoot.setAirlineFeatureSet (&lAirlineFeatureSet);
-
// Store the STDAIR service object within the (SIMCRS) service context
lSIMCRS_ServiceContext.setSTDAIR_Service (lSTDAIR_Service_ptr);
}
@@ -172,30 +147,8 @@
// Smart Pointers component.
stdair::STDAIR_ServicePtr_T lSTDAIR_Service_ptr =
boost::make_shared<stdair::STDAIR_Service> (iLogParams);
-
- // Retrieve the root of the BOM tree, on which all of the other BOM objects
- // will be attached
assert (lSTDAIR_Service_ptr != NULL);
- stdair::BomRoot& lBomRoot = lSTDAIR_Service_ptr->getBomRoot();
- // TODO: do not hardcode the initialisation of AirlineFeatureSet
- // Initialise the set of required airline features
- stdair::AirlineFeatureSet& lAirlineFeatureSet =
- stdair::FacBomContent::instance().create<stdair::AirlineFeatureSet>();
-
- // Airline code
- stdair::AirlineCode_T lAirlineCode ("BA");
- // Initialise an AirlineFeature object
- stdair::AirlineFeatureKey_T lAirlineFeatureKey (lAirlineCode);
- stdair::AirlineFeature& lAirlineFeature = stdair::FacBomContent::
- instance().create<stdair::AirlineFeature> (lAirlineFeatureKey);
- stdair::FacBomContent::
- linkWithParent<stdair::AirlineFeature> (lAirlineFeature,
- lAirlineFeatureSet);
-
- // Set the AirlineFeatureSet for the BomRoot.
- lBomRoot.setAirlineFeatureSet (&lAirlineFeatureSet);
-
// Store the STDAIR service object within the (SIMCRS) service context
lSIMCRS_ServiceContext.setSTDAIR_Service (lSTDAIR_Service_ptr);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <den...@us...> - 2010-02-07 20:03:06
|
Revision: 40
http://simcrs.svn.sourceforge.net/simcrs/?rev=40&view=rev
Author: denis_arnaud
Date: 2010-02-07 20:02:59 +0000 (Sun, 07 Feb 2010)
Log Message:
-----------
[StdAir] Added the command layer for StdAir.
Modified Paths:
--------------
trunk/simcrs/configure.ac
Modified: trunk/simcrs/configure.ac
===================================================================
--- trunk/simcrs/configure.ac 2010-02-07 19:44:14 UTC (rev 39)
+++ trunk/simcrs/configure.ac 2010-02-07 20:02:59 UTC (rev 40)
@@ -15,7 +15,7 @@
AC_SUBST(RPM_RELEASE)
# Shared library versioning
-GENERIC_LIBRARY_VERSION="0:1:0"
+GENERIC_LIBRARY_VERSION="99:99:99"
# | | |
# +------+ | +---+
# | | |
@@ -249,6 +249,7 @@
stdair/bom/Makefile
stdair/dbadaptor/Makefile
stdair/factory/Makefile
+ stdair/command/Makefile
stdair/config/Makefile
stdair/service/Makefile
stdair/core/Makefile
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|