You can subscribe to this list here.
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
(51) |
Nov
(8) |
Dec
(13) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
(32) |
Feb
(47) |
Mar
(6) |
Apr
(19) |
May
(7) |
Jun
(19) |
Jul
(39) |
Aug
(51) |
Sep
(39) |
Oct
(18) |
Nov
(10) |
Dec
(27) |
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <den...@us...> - 2009-12-28 16:08:37
|
Revision: 70
http://stdair.svn.sourceforge.net/stdair/?rev=70&view=rev
Author: denis_arnaud
Date: 2009-12-28 16:08:25 +0000 (Mon, 28 Dec 2009)
Log Message:
-----------
[Test] The ExtraCC library is now embedded within the project.
Modified Paths:
--------------
trunk/stdair/Makefile.am
Added Paths:
-----------
trunk/stdair/test/inheritance/
Removed Paths:
-------------
trunk/stdair/test/stdair/inheritance/
Modified: trunk/stdair/Makefile.am
===================================================================
--- trunk/stdair/Makefile.am 2009-12-28 15:49:16 UTC (rev 69)
+++ trunk/stdair/Makefile.am 2009-12-28 16:08:25 UTC (rev 70)
@@ -25,7 +25,7 @@
EXTRA_DIST =
# Build in these directories:
-SUBDIRS = stdair @PACKAGE@ $(HTML_DOC_DIR) $(TEST_DIR)
+SUBDIRS = stdair @PACKAGE@ $(HTML_DOC_DIR) extracppunit $(TEST_DIR)
# Configuration helpers
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <den...@us...> - 2009-12-28 15:49:26
|
Revision: 69
http://stdair.svn.sourceforge.net/stdair/?rev=69&view=rev
Author: denis_arnaud
Date: 2009-12-28 15:49:16 +0000 (Mon, 28 Dec 2009)
Log Message:
-----------
[Test] Added extracppunit as an external dependency.
Modified Paths:
--------------
trunk/stdair/configure.ac
trunk/stdair/test/stdair/Makefile.am
trunk/stdair/test/stdair/StandardAirlineITTestSuite.cpp
Removed Paths:
-------------
trunk/stdair/test/inheritance/
Property Changed:
----------------
trunk/stdair/
Property changes on: trunk/stdair
___________________________________________________________________
Added: svn:externals
+ extracppunit https://extracc.svn.sourceforge.net/svnroot/extracc/trunk/extracc/extracppunit
Modified: trunk/stdair/configure.ac
===================================================================
--- trunk/stdair/configure.ac 2009-12-28 15:33:39 UTC (rev 68)
+++ trunk/stdair/configure.ac 2009-12-28 15:49:16 UTC (rev 69)
@@ -200,8 +200,8 @@
doc/local/index.doc
doc/doxygen_html.cfg
doc/sourceforge/howto_release_stdair.html
+ extracppunit/Makefile
test/Makefile
- test/com/Makefile
test/inheritance/Makefile
test/mpl/Makefile
test/mpl/book/Makefile
Modified: trunk/stdair/test/stdair/Makefile.am
===================================================================
--- trunk/stdair/test/stdair/Makefile.am 2009-12-28 15:33:39 UTC (rev 68)
+++ trunk/stdair/test/stdair/Makefile.am 2009-12-28 15:49:16 UTC (rev 69)
@@ -18,5 +18,5 @@
StandardAirlineITTestSuite_CXXFLAGS= $(BOOST_CFLAGS) $(CPPUNIT_CFLAGS)
StandardAirlineITTestSuite_LDADD =
StandardAirlineITTestSuite_LDFLAGS = $(BOOST_LIBS) $(CPPUNIT_LIBS) \
- $(top_builddir)/test/com/libcppunitcore.la \
+ $(top_builddir)/extracppunit/libextracc-extracppunit.la \
$(top_builddir)/stdair/core/libstdair.la
Modified: trunk/stdair/test/stdair/StandardAirlineITTestSuite.cpp
===================================================================
--- trunk/stdair/test/stdair/StandardAirlineITTestSuite.cpp 2009-12-28 15:33:39 UTC (rev 68)
+++ trunk/stdair/test/stdair/StandardAirlineITTestSuite.cpp 2009-12-28 15:49:16 UTC (rev 69)
@@ -2,7 +2,7 @@
#include <iostream>
#include <string>
// CPPUNIT
-#include <test/com/CppUnitCore.hpp>
+#include <extracppunit/CppUnitCore.hpp>
// STDAIR
//#include <stdair/STDAIR_Service.hpp>
// STDAIR Test Suite
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <den...@us...> - 2009-12-28 15:33:45
|
Revision: 68
http://stdair.svn.sourceforge.net/stdair/?rev=68&view=rev
Author: denis_arnaud
Date: 2009-12-28 15:33:39 +0000 (Mon, 28 Dec 2009)
Log Message:
-----------
[Test] Moved the tests into a sub-directory labelled 'stdair', so as to allow for sharing them.
Modified Paths:
--------------
trunk/stdair/configure.ac
trunk/stdair/test/Makefile.am
Added Paths:
-----------
trunk/stdair/test/stdair/
trunk/stdair/test/stdair/Makefile.am
trunk/stdair/test/stdair/StandardAirlineITTestSuite.cpp
trunk/stdair/test/stdair/StandardAirlineITTestSuite.hpp
trunk/stdair/test/stdair/inheritance/
Removed Paths:
-------------
trunk/stdair/test/StandardAirlineITTestSuite.cpp
trunk/stdair/test/StandardAirlineITTestSuite.hpp
trunk/stdair/test/inheritance/Makefile.am
trunk/stdair/test/inheritance/inherit.cpp
Modified: trunk/stdair/configure.ac
===================================================================
--- trunk/stdair/configure.ac 2009-12-23 14:45:19 UTC (rev 67)
+++ trunk/stdair/configure.ac 2009-12-28 15:33:39 UTC (rev 68)
@@ -204,7 +204,9 @@
test/com/Makefile
test/inheritance/Makefile
test/mpl/Makefile
- test/mpl/book/Makefile)
+ test/mpl/book/Makefile
+ test/stdair/Makefile
+)
AC_OUTPUT
echo "
Modified: trunk/stdair/test/Makefile.am
===================================================================
--- trunk/stdair/test/Makefile.am 2009-12-23 14:45:19 UTC (rev 67)
+++ trunk/stdair/test/Makefile.am 2009-12-28 15:33:39 UTC (rev 68)
@@ -9,13 +9,7 @@
EXTRA_DIST =
##
-check_PROGRAMS = StandardAirlineITTestSuite
+check_PROGRAMS =
TESTS = $(check_PROGRAMS)
-XFAIL_TESTS = #IndexBuildingTestSuite
+XFAIL_TESTS = #
-StandardAirlineITTestSuite_SOURCES = StandardAirlineITTestSuite.hpp StandardAirlineITTestSuite.cpp
-StandardAirlineITTestSuite_CXXFLAGS= $(BOOST_CFLAGS) $(CPPUNIT_CFLAGS)
-StandardAirlineITTestSuite_LDADD =
-StandardAirlineITTestSuite_LDFLAGS = $(BOOST_LIBS) $(CPPUNIT_LIBS) \
- $(top_builddir)/test/com/libcppunitcore.la \
- $(top_builddir)/@PACKAGE@/core/lib@PACKAGE@.la
Deleted: trunk/stdair/test/StandardAirlineITTestSuite.cpp
===================================================================
--- trunk/stdair/test/StandardAirlineITTestSuite.cpp 2009-12-23 14:45:19 UTC (rev 67)
+++ trunk/stdair/test/StandardAirlineITTestSuite.cpp 2009-12-28 15:33:39 UTC (rev 68)
@@ -1,53 +0,0 @@
-// STL
-#include <iostream>
-#include <string>
-// CPPUNIT
-#include <test/com/CppUnitCore.hpp>
-// STDAIR
-//#include <stdair/STDAIR_Service.hpp>
-// STDAIR Test Suite
-#include <test/StandardAirlineITTestSuite.hpp>
-
-// //////////////////////////////////////////////////////////////////////
-void testStandardAirlineITHelper() {
-
- try {
-
- // Output log File
- const std::string lLogFilename ("StandardAirlineITTestSuite.log");
-
- // Set the log parameters
- std::ofstream logOutputFile;
-
- // Open and clean the log outputfile
- logOutputFile.open (lLogFilename.c_str());
- logOutputFile.clear();
-
- // Initialise the stdair BOM
- // STDAIR::STDAIR_Service stdairService (logOutputFile);
-
- } catch (const std::exception& stde) {
- std::cerr << "Standard exception: " << stde.what() << std::endl;
-
- } catch (...) {
- std::cerr << "Unknown exception" << std::endl;
- }
-}
-
-// //////////////////////////////////////////////////////////////////////
-void StandardAirlineITTestSuite::testStandardAirlineIT() {
- CPPUNIT_ASSERT_NO_THROW (testStandardAirlineITHelper(););
-}
-
-// //////////////////////////////////////////////////////////////////////
-// void StandardAirlineITTestSuite::errorCase () {
-// CPPUNIT_ASSERT (false);
-// }
-
-// //////////////////////////////////////////////////////////////////////
-StandardAirlineITTestSuite::StandardAirlineITTestSuite () {
- _describeKey << "Running test on STDAIR Optimisation function";
-}
-
-// /////////////// M A I N /////////////////
-CPPUNIT_MAIN()
Deleted: trunk/stdair/test/StandardAirlineITTestSuite.hpp
===================================================================
--- trunk/stdair/test/StandardAirlineITTestSuite.hpp 2009-12-23 14:45:19 UTC (rev 67)
+++ trunk/stdair/test/StandardAirlineITTestSuite.hpp 2009-12-28 15:33:39 UTC (rev 68)
@@ -1,25 +0,0 @@
-// STL
-#include <sstream>
-// CPPUNIT
-#include <cppunit/extensions/HelperMacros.h>
-
-class StandardAirlineITTestSuite : public CppUnit::TestFixture {
- CPPUNIT_TEST_SUITE (StandardAirlineITTestSuite);
- CPPUNIT_TEST (testStandardAirlineIT);
- // CPPUNIT_TEST (errorCase);
- CPPUNIT_TEST_SUITE_END ();
-public:
-
- /** Test the Standard Airline IT base library. */
- void testStandardAirlineIT ();
-
- /** Test some error detection functionalities. */
- // void errorCase ();
-
- /** Constructor. */
- StandardAirlineITTestSuite ();
-
-protected:
- std::stringstream _describeKey;
-};
-CPPUNIT_TEST_SUITE_REGISTRATION (StandardAirlineITTestSuite);
Deleted: trunk/stdair/test/inheritance/Makefile.am
===================================================================
--- trunk/stdair/test/inheritance/Makefile.am 2009-12-23 14:45:19 UTC (rev 67)
+++ trunk/stdair/test/inheritance/Makefile.am 2009-12-28 15:33:39 UTC (rev 68)
@@ -1,14 +0,0 @@
-## test/inheritance sub-directory
-include $(top_srcdir)/Makefile.common
-
-MAINTAINERCLEANFILES = Makefile.in
-
-SUBDIRS =
-
-check_PROGRAMS = inherit
-
-inherit_SOURCES = inherit.cpp
-inherit_CXXFLAGS = $(BOOST_CFLAGS)
-inherit_LDADD = $(BOOST_LIB)
-
-EXTRA_DIST =
Deleted: trunk/stdair/test/inheritance/inherit.cpp
===================================================================
--- trunk/stdair/test/inheritance/inherit.cpp 2009-12-23 14:45:19 UTC (rev 67)
+++ trunk/stdair/test/inheritance/inherit.cpp 2009-12-28 15:33:39 UTC (rev 68)
@@ -1,81 +0,0 @@
-// STL
-#include <cassert>
-#include <iostream>
-#include <string>
-
-// ////////////////////////////////////
-typedef unsigned int Size_T;
-typedef std::pair<Size_T, Size_T> RectangleSize_T;
-
-// ////////////////////////////////////
-/** Rectangle */
-struct Rectangle {
-
- /** Constructor */
- Rectangle (const Size_T& iWidth, const Size_T& iHeight)
- : _width (iWidth), _height (iHeight) { }
- /** Destructor */
- virtual ~Rectangle () { }
-
- /** Get the size. */
- RectangleSize_T getSize() const {
- return RectangleSize_T (_width, _height);
- }
-
- /** Display. When the object is actually inherits from Rectangle,
- the display() method actually called is the one of the
- inheriting object. */
- virtual void display () const {
- std::cout << "Hello, I am a rectangle of size (" << _width << " x "
- << _height << ")" << std::endl;
- }
-
- // //////// Attributes /////////
- /** Width, Height */
- Size_T _width;
- Size_T _height;
-};
-
-/** Square */
-struct Square : public Rectangle {
-
- /** Constructor */
- Square (const Size_T& iWidth) : Rectangle (iWidth, iWidth) { }
- /** Destructor */
- virtual ~Square () { }
-
- /** Get the size. That method overshadows the Rectangle::getSize() one. */
- Size_T getSize() const {
- return _width;
- }
-
- /** Display */
- void display () const {
- std::cout << "Hello, I am a square of size (" << _width << ")"
- << std::endl;
- }
-};
-
-
-// ////////// M A I N //////////////
-int main (int argc, char* argv[]) {
-
- Square lSquare (10);
- lSquare.display();
- const Size_T& lSquareSize = lSquare.getSize();
- std::cout << " and my size is: " << lSquareSize << std::endl;
-
- Rectangle& lRectangle = lSquare;
- lRectangle.display();
- const RectangleSize_T& lRectangleSize = lRectangle.getSize();
- std::cout << " and my size is: " << lRectangleSize.first << " x "
- << lRectangleSize.second << std::endl;
-
- Rectangle lRectangleCopy = lSquare;
- lRectangleCopy.display();
- const RectangleSize_T& lRectangleCopySize = lRectangleCopy.getSize();
- std::cout << " and my size is: " << lRectangleCopySize.first << " x "
- << lRectangleCopySize.second << std::endl;
-
- return 0;
-}
Property changes on: trunk/stdair/test/stdair
___________________________________________________________________
Added: svn:ignore
+ .deps
.libs
Makefile.in
Makefile
StandardAirlineITTestSuite
StandardAirlineITTestSuite.log
StandardAirlineITTestSuite_results.xml
Copied: trunk/stdair/test/stdair/Makefile.am (from rev 67, trunk/stdair/test/Makefile.am)
===================================================================
--- trunk/stdair/test/stdair/Makefile.am (rev 0)
+++ trunk/stdair/test/stdair/Makefile.am 2009-12-28 15:33:39 UTC (rev 68)
@@ -0,0 +1,22 @@
+## test sub-directory
+include $(top_srcdir)/Makefile.common
+
+MAINTAINERCLEANFILES = Makefile.in
+
+##
+SUBDIRS =
+
+EXTRA_DIST =
+##
+
+check_PROGRAMS = StandardAirlineITTestSuite
+TESTS = $(check_PROGRAMS)
+XFAIL_TESTS = #IndexBuildingTestSuite
+
+StandardAirlineITTestSuite_SOURCES = StandardAirlineITTestSuite.hpp \
+ StandardAirlineITTestSuite.cpp
+StandardAirlineITTestSuite_CXXFLAGS= $(BOOST_CFLAGS) $(CPPUNIT_CFLAGS)
+StandardAirlineITTestSuite_LDADD =
+StandardAirlineITTestSuite_LDFLAGS = $(BOOST_LIBS) $(CPPUNIT_LIBS) \
+ $(top_builddir)/test/com/libcppunitcore.la \
+ $(top_builddir)/stdair/core/libstdair.la
Copied: trunk/stdair/test/stdair/StandardAirlineITTestSuite.cpp (from rev 67, trunk/stdair/test/StandardAirlineITTestSuite.cpp)
===================================================================
--- trunk/stdair/test/stdair/StandardAirlineITTestSuite.cpp (rev 0)
+++ trunk/stdair/test/stdair/StandardAirlineITTestSuite.cpp 2009-12-28 15:33:39 UTC (rev 68)
@@ -0,0 +1,53 @@
+// STL
+#include <iostream>
+#include <string>
+// CPPUNIT
+#include <test/com/CppUnitCore.hpp>
+// STDAIR
+//#include <stdair/STDAIR_Service.hpp>
+// STDAIR Test Suite
+#include <test/stdair/StandardAirlineITTestSuite.hpp>
+
+// //////////////////////////////////////////////////////////////////////
+void testStandardAirlineITHelper() {
+
+ try {
+
+ // Output log File
+ const std::string lLogFilename ("StandardAirlineITTestSuite.log");
+
+ // Set the log parameters
+ std::ofstream logOutputFile;
+
+ // Open and clean the log outputfile
+ logOutputFile.open (lLogFilename.c_str());
+ logOutputFile.clear();
+
+ // Initialise the stdair BOM
+ // STDAIR::STDAIR_Service stdairService (logOutputFile);
+
+ } catch (const std::exception& stde) {
+ std::cerr << "Standard exception: " << stde.what() << std::endl;
+
+ } catch (...) {
+ std::cerr << "Unknown exception" << std::endl;
+ }
+}
+
+// //////////////////////////////////////////////////////////////////////
+void StandardAirlineITTestSuite::testStandardAirlineIT() {
+ CPPUNIT_ASSERT_NO_THROW (testStandardAirlineITHelper(););
+}
+
+// //////////////////////////////////////////////////////////////////////
+// void StandardAirlineITTestSuite::errorCase () {
+// CPPUNIT_ASSERT (false);
+// }
+
+// //////////////////////////////////////////////////////////////////////
+StandardAirlineITTestSuite::StandardAirlineITTestSuite () {
+ _describeKey << "Running test on STDAIR Optimisation function";
+}
+
+// /////////////// M A I N /////////////////
+CPPUNIT_MAIN()
Copied: trunk/stdair/test/stdair/StandardAirlineITTestSuite.hpp (from rev 67, trunk/stdair/test/StandardAirlineITTestSuite.hpp)
===================================================================
--- trunk/stdair/test/stdair/StandardAirlineITTestSuite.hpp (rev 0)
+++ trunk/stdair/test/stdair/StandardAirlineITTestSuite.hpp 2009-12-28 15:33:39 UTC (rev 68)
@@ -0,0 +1,25 @@
+// STL
+#include <sstream>
+// CPPUNIT
+#include <cppunit/extensions/HelperMacros.h>
+
+class StandardAirlineITTestSuite : public CppUnit::TestFixture {
+ CPPUNIT_TEST_SUITE (StandardAirlineITTestSuite);
+ CPPUNIT_TEST (testStandardAirlineIT);
+ // CPPUNIT_TEST (errorCase);
+ CPPUNIT_TEST_SUITE_END ();
+public:
+
+ /** Test the Standard Airline IT base library. */
+ void testStandardAirlineIT ();
+
+ /** Test some error detection functionalities. */
+ // void errorCase ();
+
+ /** Constructor. */
+ StandardAirlineITTestSuite ();
+
+protected:
+ std::stringstream _describeKey;
+};
+CPPUNIT_TEST_SUITE_REGISTRATION (StandardAirlineITTestSuite);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <den...@us...> - 2009-12-23 14:45:26
|
Revision: 67
http://stdair.svn.sourceforge.net/stdair/?rev=67&view=rev
Author: denis_arnaud
Date: 2009-12-23 14:45:19 +0000 (Wed, 23 Dec 2009)
Log Message:
-----------
[Build] Fixed a missing source file name in the basic layer.
Modified Paths:
--------------
trunk/stdair/stdair/basic/sources.mk
Modified: trunk/stdair/stdair/basic/sources.mk
===================================================================
--- trunk/stdair/stdair/basic/sources.mk 2009-11-20 10:56:57 UTC (rev 66)
+++ trunk/stdair/stdair/basic/sources.mk 2009-12-23 14:45:19 UTC (rev 67)
@@ -1,6 +1,6 @@
bas_h_sources = \
$(top_srcdir)/stdair/basic/BasTypes.hpp \
- $(top_srcdir)/stdair/basic/BasConst_WorldSchedule.hpp \
+ $(top_srcdir)/stdair/basic/BasConst_General.hpp \
$(top_srcdir)/stdair/basic/BasConst_Inventory.hpp \
$(top_srcdir)/stdair/basic/BasConst_BookingClass.hpp \
$(top_srcdir)/stdair/basic/BasConst_Yield.hpp \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qua...@us...> - 2009-11-20 10:57:04
|
Revision: 66
http://stdair.svn.sourceforge.net/stdair/?rev=66&view=rev
Author: quannaus
Date: 2009-11-20 10:56:57 +0000 (Fri, 20 Nov 2009)
Log Message:
-----------
[dev] Some small changes.
Modified Paths:
--------------
trunk/stdair/stdair/basic/BasConst.cpp
trunk/stdair/stdair/bom/BomList.hpp
trunk/stdair/stdair/bom/BomMap.hpp
trunk/stdair/stdair/bom/FlightDateContent.cpp
trunk/stdair/stdair/bom/LegDateContent.cpp
trunk/stdair/stdair/bom/SegmentDateContent.hpp
Added Paths:
-----------
trunk/stdair/stdair/basic/BasConst_General.hpp
Removed Paths:
-------------
trunk/stdair/stdair/basic/BasConst_WorldSchedule.hpp
Modified: trunk/stdair/stdair/basic/BasConst.cpp
===================================================================
--- trunk/stdair/stdair/basic/BasConst.cpp 2009-11-16 15:53:21 UTC (rev 65)
+++ trunk/stdair/stdair/basic/BasConst.cpp 2009-11-20 10:56:57 UTC (rev 66)
@@ -5,7 +5,7 @@
#include <string>
// STDAIR
#include <stdair/STDAIR_Types.hpp>
-#include <stdair/basic/BasConst_WorldSchedule.hpp>
+#include <stdair/basic/BasConst_General.hpp>
#include <stdair/basic/BasConst_Inventory.hpp>
#include <stdair/basic/BasConst_BookingClass.hpp>
#include <stdair/basic/BasConst_Yield.hpp>
@@ -127,8 +127,8 @@
/** Default Date OffSet (e.g., 0). */
const DateOffSet_T DEFAULT_DATE_OFFSET (0);
- // // //////// WorldSchedule ///////
- // /** Default update date for the WorldSchedule. */
+ // // //////// General ///////
+ // /** Default update date for the General. */
// const Date_T DEFAULT_WORLD_SCHEDULE_UPDATE_DATE (2007,
// boost::gregorian::Jan,
// 1);
Copied: trunk/stdair/stdair/basic/BasConst_General.hpp (from rev 63, trunk/stdair/stdair/basic/BasConst_WorldSchedule.hpp)
===================================================================
--- trunk/stdair/stdair/basic/BasConst_General.hpp (rev 0)
+++ trunk/stdair/stdair/basic/BasConst_General.hpp 2009-11-20 10:56:57 UTC (rev 66)
@@ -0,0 +1,40 @@
+#ifndef __STDAIR_BAS_BASCONST_GENERAL_HPP
+#define __STDAIR_BAS_BASCONST_GENERAL_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// LATUS Common
+#include <stdair/STDAIR_Types.hpp>
+
+namespace stdair {
+
+ /** Default epsilon value. */
+ extern const double DEFAULT_EPSILON_VALUE;
+
+ /** Default flight speed (number of kilometers per hour). */
+ extern const unsigned int DEFAULT_FLIGHT_SPEED;
+
+ /** Default cabin capacity for Leg cabins. */
+ extern const CabinCapacity_T DEFAULT_CABIN_CAPACITY;
+
+ /** Default number of generated flight dates . */
+ extern const NbOfFlightDates_T DEFAULT_NB_OF_FLIGHTDATES;
+
+ /** Default number of bookings for BookingClass. */
+ extern const NbOfBookings_T DEFAULT_CLASS_NB_OF_BOOKINGS;
+
+ /** Default distance value (kilometers). */
+ extern const Distance_T DEFAULT_DISTANCE_VALUE;
+
+ /** Default value of Fare. */
+ extern const Fare_T DEFAULT_CLASS_FARE_VALUE;
+
+ /** Default revenue value. */
+ extern const Revenue_T DEFAULT_REVENUE_VALUE;
+
+ /** Default booking rate for OnD bookings over overall class bookings. */
+ extern const BookingRatio_T DEFAULT_OND_BOOKING_RATE;
+
+}
+#endif // __STDAIR_BAS_BASCONST_GENERAL_HPP
Deleted: trunk/stdair/stdair/basic/BasConst_WorldSchedule.hpp
===================================================================
--- trunk/stdair/stdair/basic/BasConst_WorldSchedule.hpp 2009-11-16 15:53:21 UTC (rev 65)
+++ trunk/stdair/stdair/basic/BasConst_WorldSchedule.hpp 2009-11-20 10:56:57 UTC (rev 66)
@@ -1,40 +0,0 @@
-#ifndef __STDAIR_BAS_BASCONST_WORLDSCHEDULE_HPP
-#define __STDAIR_BAS_BASCONST_WORLDSCHEDULE_HPP
-
-// //////////////////////////////////////////////////////////////////////
-// Import section
-// //////////////////////////////////////////////////////////////////////
-// LATUS Common
-#include <stdair/STDAIR_Types.hpp>
-
-namespace stdair {
-
- /** Default epsilon value. */
- extern const double DEFAULT_EPSILON_VALUE;
-
- /** Default flight speed (number of kilometers per hour). */
- extern const unsigned int DEFAULT_FLIGHT_SPEED;
-
- /** Default cabin capacity for Leg cabins. */
- extern const CabinCapacity_T DEFAULT_CABIN_CAPACITY;
-
- /** Default number of generated flight dates . */
- extern const NbOfFlightDates_T DEFAULT_NB_OF_FLIGHTDATES;
-
- /** Default number of bookings for BookingClass. */
- extern const NbOfBookings_T DEFAULT_CLASS_NB_OF_BOOKINGS;
-
- /** Default distance value (kilometers). */
- extern const Distance_T DEFAULT_DISTANCE_VALUE;
-
- /** Default value of Fare. */
- extern const Fare_T DEFAULT_CLASS_FARE_VALUE;
-
- /** Default revenue value. */
- extern const Revenue_T DEFAULT_REVENUE_VALUE;
-
- /** Default booking rate for OnD bookings over overall class bookings. */
- extern const BookingRatio_T DEFAULT_OND_BOOKING_RATE;
-
-}
-#endif // __STDAIR_BAS_BASCONST_WORLDSCHEDULE_HPP
Modified: trunk/stdair/stdair/bom/BomList.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomList.hpp 2009-11-16 15:53:21 UTC (rev 65)
+++ trunk/stdair/stdair/bom/BomList.hpp 2009-11-20 10:56:57 UTC (rev 66)
@@ -4,6 +4,8 @@
// //////////////////////////////////////////////////////////////////////
// Import section
// //////////////////////////////////////////////////////////////////////
+// STL
+#include <vector>
namespace stdair {
Modified: trunk/stdair/stdair/bom/BomMap.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomMap.hpp 2009-11-16 15:53:21 UTC (rev 65)
+++ trunk/stdair/stdair/bom/BomMap.hpp 2009-11-20 10:56:57 UTC (rev 66)
@@ -4,6 +4,8 @@
// //////////////////////////////////////////////////////////////////////
// Import section
// //////////////////////////////////////////////////////////////////////
+// STL
+#include <map>
namespace stdair {
Modified: trunk/stdair/stdair/bom/FlightDateContent.cpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDateContent.cpp 2009-11-16 15:53:21 UTC (rev 65)
+++ trunk/stdair/stdair/bom/FlightDateContent.cpp 2009-11-20 10:56:57 UTC (rev 66)
@@ -4,7 +4,7 @@
// STL
#include <cassert>
// STDAIR
-#include <stdair/basic/BasConst_WorldSchedule.hpp>
+#include <stdair/basic/BasConst_General.hpp>
#include <stdair/bom/FlightDateContent.hpp>
namespace stdair {
Modified: trunk/stdair/stdair/bom/LegDateContent.cpp
===================================================================
--- trunk/stdair/stdair/bom/LegDateContent.cpp 2009-11-16 15:53:21 UTC (rev 65)
+++ trunk/stdair/stdair/bom/LegDateContent.cpp 2009-11-20 10:56:57 UTC (rev 66)
@@ -4,7 +4,7 @@
// STL
#include <cassert>
// STDAIR
-#include <stdair/basic/BasConst_WorldSchedule.hpp>
+#include <stdair/basic/BasConst_General.hpp>
#include <stdair/bom/LegDateContent.hpp>
namespace stdair {
Modified: trunk/stdair/stdair/bom/SegmentDateContent.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDateContent.hpp 2009-11-16 15:53:21 UTC (rev 65)
+++ trunk/stdair/stdair/bom/SegmentDateContent.hpp 2009-11-20 10:56:57 UTC (rev 66)
@@ -152,6 +152,11 @@
_segmentUnitRevenue = iSegmentURevenue;
}
+ /** Set the distance. */
+ void setDistance (const Distance_T& iDistance) {
+ _distance = iDistance;
+ }
+
public:
// /////////// Display support methods /////////
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qua...@us...> - 2009-11-16 15:53:31
|
Revision: 65
http://stdair.svn.sourceforge.net/stdair/?rev=65&view=rev
Author: quannaus
Date: 2009-11-16 15:53:21 +0000 (Mon, 16 Nov 2009)
Log Message:
-----------
[Dev] Build the routing.
Modified Paths:
--------------
trunk/stdair/stdair/bom/AirlineFeatureSet.cpp
trunk/stdair/stdair/bom/AirlineFeatureSetStructure.hpp
trunk/stdair/stdair/bom/AirlineFeatureStructure.hpp
trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp
trunk/stdair/stdair/bom/BomRoot.cpp
trunk/stdair/stdair/bom/BomRootStructure.hpp
trunk/stdair/stdair/bom/BookingClassStructure.hpp
trunk/stdair/stdair/bom/FlightDate.cpp
trunk/stdair/stdair/bom/FlightDateStructure.hpp
trunk/stdair/stdair/bom/Inventory.cpp
trunk/stdair/stdair/bom/Inventory.hpp
trunk/stdair/stdair/bom/InventoryStructure.hpp
trunk/stdair/stdair/bom/LegCabinStructure.hpp
trunk/stdair/stdair/bom/LegDate.cpp
trunk/stdair/stdair/bom/LegDate.hpp
trunk/stdair/stdair/bom/LegDateStructure.hpp
trunk/stdair/stdair/bom/SegmentCabin.cpp
trunk/stdair/stdair/bom/SegmentCabinStructure.hpp
trunk/stdair/stdair/bom/SegmentDate.cpp
trunk/stdair/stdair/bom/SegmentDateStructure.hpp
trunk/stdair/stdair/bom/sources.mk
trunk/stdair/stdair/factory/FacBomContent.hpp
trunk/stdair/stdair/factory/FacBomStructure.hpp
Added Paths:
-----------
trunk/stdair/stdair/bom/BomStopContent.hpp
trunk/stdair/stdair/bom/BomStopStructure.hpp
Removed Paths:
-------------
trunk/stdair/stdair/bom/BomContentDummy.hpp
trunk/stdair/stdair/bom/BomStructureDummy.hpp
Modified: trunk/stdair/stdair/bom/AirlineFeatureSet.cpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureSet.cpp 2009-11-13 08:52:41 UTC (rev 64)
+++ trunk/stdair/stdair/bom/AirlineFeatureSet.cpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -48,12 +48,12 @@
// //////////////////////////////////////////////////////////////////////
AirlineFeatureList_T AirlineFeatureSet::getAirlineFeatureList () const {
- return _bomStructure.getChildrenList();
+ return _bomStructure.getChildrenHolder();
}
// //////////////////////////////////////////////////////////////////////
AirlineFeatureMap_T AirlineFeatureSet::getAirlineFeatureMap () const {
- return _bomStructure.getChildrenList();
+ return _bomStructure.getChildrenHolder();
}
// //////////////////////////////////////////////////////////////////////
Modified: trunk/stdair/stdair/bom/AirlineFeatureSetStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureSetStructure.hpp 2009-11-13 08:52:41 UTC (rev 64)
+++ trunk/stdair/stdair/bom/AirlineFeatureSetStructure.hpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -9,8 +9,8 @@
// MPL
#include <boost/mpl/vector.hpp>
// STDAIR
-#include <stdair/bom/BomStructureDummy.hpp>
-#include <stdair/bom/BomContentDummy.hpp>
+#include <stdair/bom/BomStopStructure.hpp>
+#include <stdair/bom/BomStopContent.hpp>
#include <stdair/bom/AirlineFeatureStructure.hpp>
#include <stdair/bom/AirlineFeatureKey.hpp>
@@ -48,10 +48,10 @@
typedef typename BOM_CONTENT::BomKey_T BomKey_T;
/** Definition allowing to retrieve the associated children type. */
- typedef boost::mpl::vector<AirlineFeatureStructure<ContentChild_T>, BomStructureDummy> ChildrenBomTypeList_T;
+ typedef boost::mpl::vector<AirlineFeatureStructure<ContentChild_T>, BomStopStructure> ChildrenBomTypeList_T;
/** Definition allowing to retrive the default children bom holder type. */
- typedef BomChildrenHolderImp<BomContentDummy> DefaultChildrenBomHolder_T;
+ typedef BomChildrenHolderImp<BomStopContent> DefaultChildrenBomHolder_T;
/** Definition allowing to retrive the children bom holder type. */
typedef BomChildrenHolderImp<ContentChild_T> ChildrenBomHolder_T;
@@ -64,15 +64,15 @@
return _content->getKey ();
}
- /** Get the list of airline features. */
- const ChildrenBomHolder_T& getChildrenList() const {
- assert (_childrenList != NULL);
- return *_childrenList;
+ /** Get the holder of airline features. */
+ const ChildrenBomHolder_T& getChildrenHolder() const {
+ assert (_childrenHolder != NULL);
+ return *_childrenHolder;
}
- /** Get the list of airline features. */
- void getChildrenList (ChildrenBomHolder_T*& ioChildrenList) {
- ioChildrenList = _childrenList;
+ /** Get the holder of airline features. */
+ void getChildrenHolder (ChildrenBomHolder_T*& ioChildrenHolder) {
+ ioChildrenHolder = _childrenHolder;
}
/** Retrieve, if existing, the airline feature corresponding to the
@@ -81,7 +81,7 @@
ContentChild_T* getContentChild (const ChildKey_T& iKey) const {
ContentChild_T* oContentChild_ptr = NULL;
- ChildrenMap_T lChildrenMap (getChildrenList());
+ ChildrenMap_T lChildrenMap (getChildrenHolder());
const MapKey_T lMapKey = iKey.toString();
typename ChildrenMap_T::iterator itContentChild =
@@ -97,12 +97,12 @@
private:
/////////////// Setters ////////////////
- /** Default children list setter. */
- void setChildrenList (DefaultChildrenBomHolder_T&) { }
+ /** Default children holder setter. */
+ void setChildrenHolder (DefaultChildrenBomHolder_T&) { }
- /** Set the children list. */
- void setChildrenList (ChildrenBomHolder_T& ioChildrenList) {
- _childrenList = &ioChildrenList;
+ /** Set the children holder. */
+ void setChildrenHolder (ChildrenBomHolder_T& ioChildrenHolder) {
+ _childrenHolder = &ioChildrenHolder;
}
public:
@@ -132,7 +132,7 @@
/** Constructors are private so as to force the usage of the Factory
layer. */
/** Default constructors. */
- AirlineFeatureSetStructure () : _content (NULL), _childrenList (NULL) { };
+ AirlineFeatureSetStructure () : _content (NULL), _childrenHolder (NULL) { };
AirlineFeatureSetStructure (const AirlineFeatureSetStructure&);
/** Destructor. */
@@ -143,8 +143,8 @@
/** The actual functional (Business Object) content. */
BOM_CONTENT* _content;
- /** List of inventories. */
- ChildrenBomHolder_T* _childrenList;
+ /** Holder of inventories. */
+ ChildrenBomHolder_T* _childrenHolder;
};
}
Modified: trunk/stdair/stdair/bom/AirlineFeatureStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureStructure.hpp 2009-11-13 08:52:41 UTC (rev 64)
+++ trunk/stdair/stdair/bom/AirlineFeatureStructure.hpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -7,8 +7,8 @@
// MPL
#include <boost/mpl/vector.hpp>
// STDAIR
-#include <stdair/bom/BomStructureDummy.hpp>
-#include <stdair/bom/BomContentDummy.hpp>
+#include <stdair/bom/BomStopStructure.hpp>
+#include <stdair/bom/BomStopContent.hpp>
namespace stdair {
/** Wrapper class aimed at holding the actual content, modeled
@@ -33,11 +33,11 @@
typedef typename BOM_CONTENT::Parent_T::BomStructure_T ParentBomStructure_T;
/** Definition allowing to retrieve the associated children type. */
- typedef boost::mpl::vector <BomStructureDummy,
- BomStructureDummy> ChildrenBomTypeList_T;
+ typedef boost::mpl::vector <BomStopStructure,
+ BomStopStructure> ChildrenBomTypeList_T;
/** Definition allowing to retrieve the default children bom holder type. */
- typedef BomChildrenHolderImp<BomContentDummy> DefaultChildrenBomHolder_T;
+ typedef BomChildrenHolderImp<BomStopContent> DefaultChildrenBomHolder_T;
public:
// /////////// Getters /////////////
@@ -62,8 +62,8 @@
_parent = &ioAirlineFeatureSetStructure;
}
- /** Default children list setter. */
- void setChildrenList (DefaultChildrenBomHolder_T&) { }
+ /** Default children holder setter. */
+ void setChildrenHolder (DefaultChildrenBomHolder_T&) { }
public:
// /////////// Display support methods /////////
Modified: trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2009-11-13 08:52:41 UTC (rev 64)
+++ trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -27,18 +27,18 @@
public:
/** Define lists of children BOM structures. */
- typedef std::vector<BomStructure_T*> BomChildrenOrderedList_T;
- typedef std::map<const std::string, BomStructure_T*> BomChildrenList_T;
+ typedef std::vector<BomStructure_T*> BomChildrenList_T;
+ typedef std::map<const std::string, BomStructure_T*> BomChildrenMap_T;
/** Define the different types of iterators. */
typedef BomIterator_T<BOM_CONTENT_CHILD,
- typename BomChildrenOrderedList_T::const_iterator> ListIterator_T;
+ typename BomChildrenList_T::const_iterator> ListIterator_T;
typedef BomIterator_T<BOM_CONTENT_CHILD,
- typename BomChildrenOrderedList_T::const_reverse_iterator> ListReverseIterator_T;
+ typename BomChildrenList_T::const_reverse_iterator> ListReverseIterator_T;
typedef BomIterator_T<BOM_CONTENT_CHILD,
- typename BomChildrenList_T::const_iterator> MapIterator_T;
+ typename BomChildrenMap_T::const_iterator> MapIterator_T;
typedef BomIterator_T<BOM_CONTENT_CHILD,
- typename BomChildrenList_T::const_reverse_iterator> MapReverseIterator_T;
+ typename BomChildrenMap_T::const_reverse_iterator> MapReverseIterator_T;
public:
// /////////// Display support methods /////////
@@ -65,61 +65,61 @@
/** Initialise the internal iterators on bom objects:
return the iterator at the begining of the list. */
ListIterator_T listBegin () const {
- return ListIterator_T(_bomChildrenOrderedList.begin());
+ return ListIterator_T(_bomChildrenList.begin());
}
/** Initialise the internal iterators on bom objects:
return the iterator past the end of the list. */
ListIterator_T listEnd () const {
- return _bomChildrenOrderedList.end();
+ return _bomChildrenList.end();
}
/** Initialise the internal reverse iterators on bom objects:
return the reverse iterator at the rbegining of the list. */
ListReverseIterator_T listRBegin () const {
- return _bomChildrenOrderedList.rbegin();
+ return _bomChildrenList.rbegin();
}
/** Initialise the internal reverse iterators on bom objects:
return the reverse iterator past the rend of the list. */
ListReverseIterator_T listREnd () const {
- return _bomChildrenOrderedList.rend();
+ return _bomChildrenList.rend();
}
/** Initialise the internal iterators on bom objects:
return the iterator at the begining of the map. */
MapIterator_T mapBegin () const {
- return _bomChildrenList.begin();
+ return _bomChildrenMap.begin();
}
/** Initialise the internal iterators on bom objects:
return the iterator past the end of the map. */
MapIterator_T mapEnd () const {
- return _bomChildrenList.end();
+ return _bomChildrenMap.end();
}
/** Initialise the internal reverse iterators on bom objects:
return the reverse iterator at the rbegining of the map. */
MapReverseIterator_T mapRBegin () const {
- return _bomChildrenList.rbegin();
+ return _bomChildrenMap.rbegin();
}
/** Initialise the internal reverse iterators on bom objects:
return the reverse iterator past the rend of the map. */
MapReverseIterator_T mapREnd () const {
- return _bomChildrenList.rend();
+ return _bomChildrenMap.rend();
}
// /////////// Other operators /////////////
/** Get the size of the list. */
const unsigned int size () const {
- return _bomChildrenOrderedList.size();
+ return _bomChildrenList.size();
}
/** Retrieve, if existing, the bom corresponding to the given key. */
MapIterator_T find (const MapKey_T& iKey) const {
- return _bomChildrenList.find (iKey);
+ return _bomChildrenMap.find (iKey);
}
private:
@@ -135,10 +135,10 @@
private:
///////////// Attributes //////////////
/** List of children BOM structures. */
- BomChildrenList_T _bomChildrenList;
+ BomChildrenMap_T _bomChildrenMap;
/** Map of children BOM structures with their key. */
- BomChildrenOrderedList_T _bomChildrenOrderedList;
+ BomChildrenList_T _bomChildrenList;
};
}
Deleted: trunk/stdair/stdair/bom/BomContentDummy.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomContentDummy.hpp 2009-11-13 08:52:41 UTC (rev 64)
+++ trunk/stdair/stdair/bom/BomContentDummy.hpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -1,70 +0,0 @@
-#ifndef __STDAIR_BOM_BOMCONTENTDUMMY_HPP
-#define __STDAIR_BOM_BOMCONTENTDUMMY_HPP
-
-// //////////////////////////////////////////////////////////////////////
-// Import section
-// //////////////////////////////////////////////////////////////////////
-// STDAIR
-#include <stdair/bom/BomContent.hpp>
-
-namespace stdair {
- // Forward declarations.
- class BomStructureDummy;
- class BomKey;
-
- /** Class representing the actual functional/business content
- for the Bom dummy.
- <br>That class is just an utility tool to mark the dummy
- of the Bom tree. */
- class BomContentDummy : public BomContent {
- friend class FacBomContent;
-
- public:
- // Type definitions
- /** Definition allowing to retrieve the associated BOM structure type. */
- typedef BomStructureDummy BomStructure_T;
-
- /** Definition allowing to retrieve the associated BOM key type. */
- typedef BomKey BomKey_T;
-
- public:
- // /////////// Display support methods /////////
- /** Dump a Business Object into an output stream.
- @param ostream& the output stream. */
- void toStream (std::ostream& ioOut) const { ioOut << toString(); }
-
- /** Read a Business Object from an input stream.
- @param istream& the input stream. */
- void fromStream (std::istream& ioIn) { }
-
- /** Get the serialised version of the Business Object. */
- std::string toString() const { return describeKey(); }
-
- /** Get a string describing the whole key (differentiating two objects
- at any level). */
- const std::string describeKey() const { return std::string (""); }
-
- /** Get a string describing the short key (differentiating two objects
- at the same level). */
- const std::string describeShortKey() const { return std::string (""); }
-
- private:
- /** Constructors are private so as to force the usage of the Factory
- layer. */
- /** Default constructors. */
- BomContentDummy ();
- BomContentDummy (const BomContentDummy&);
- BomContentDummy (const BomStructure_T& iBomStructure)
- : _bomStructure (iBomStructure) { }
-
- /** Destructor. */
- virtual ~BomContentDummy() { }
-
- private:
- // Attributes
- /** Reference structure. */
- const BomStructure_T& _bomStructure;
- };
-
-}
-#endif // __STDAIR_BOM_BOMCONTENTDUMMY_HPP
Modified: trunk/stdair/stdair/bom/BomRoot.cpp
===================================================================
--- trunk/stdair/stdair/bom/BomRoot.cpp 2009-11-13 08:52:41 UTC (rev 64)
+++ trunk/stdair/stdair/bom/BomRoot.cpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -23,12 +23,12 @@
// ////////////////////////////////////////////////////////////////////
InventoryList_T BomRoot::getInventoryList () const {
- return _bomRootStructure.getChildrenList();
+ return _bomRootStructure.getChildrenHolder();
}
// ////////////////////////////////////////////////////////////////////
InventoryMap_T BomRoot::getInventoryMap () const {
- return _bomRootStructure.getChildrenList();
+ return _bomRootStructure.getChildrenHolder();
}
Inventory* BomRoot::getInventory (const AirlineCode_T& iAirlineCode) const {
Modified: trunk/stdair/stdair/bom/BomRootStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomRootStructure.hpp 2009-11-13 08:52:41 UTC (rev 64)
+++ trunk/stdair/stdair/bom/BomRootStructure.hpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -9,8 +9,8 @@
// MPL
#include <boost/mpl/vector.hpp>
// STDAIR
-#include <stdair/bom/BomStructureDummy.hpp>
-#include <stdair/bom/BomContentDummy.hpp>
+#include <stdair/bom/BomStopStructure.hpp>
+#include <stdair/bom/BomStopContent.hpp>
#include <stdair/bom/InventoryStructure.hpp>
namespace stdair {
@@ -37,10 +37,10 @@
typedef typename BOM_CONTENT::BomKey_T BomKey_T;
/** Definition allowing to retrieve the associated children type. */
- typedef boost::mpl::vector<InventoryStructure<ContentChild_T>, BomStructureDummy> ChildrenBomTypeList_T;
+ typedef boost::mpl::vector<InventoryStructure<ContentChild_T>, BomStopStructure> ChildrenBomTypeList_T;
/** Definition allowing to retrive the default children bom holder type. */
- typedef BomChildrenHolderImp<BomContentDummy> DefaultChildrenBomHolder_T;
+ typedef BomChildrenHolderImp<BomStopContent> DefaultChildrenBomHolder_T;
/** Definition allowing to retrive the children bom holder type. */
typedef BomChildrenHolderImp<ContentChild_T> ChildrenBomHolder_T;
@@ -53,25 +53,25 @@
return _content->getKey ();
}
- /** Get the list of inventories. */
- const ChildrenBomHolder_T& getChildrenList() const {
- assert (_childrenList != NULL);
- return *_childrenList;
+ /** Get the holder of inventories. */
+ const ChildrenBomHolder_T& getChildrenHolder() const {
+ assert (_childrenHolder != NULL);
+ return *_childrenHolder;
}
- /** Get the list of inventories. */
- void getChildrenList (ChildrenBomHolder_T*& ioChildrenList) {
- ioChildrenList = _childrenList;
+ /** Get the holder of inventories. */
+ void getChildrenHolder (ChildrenBomHolder_T*& ioChildrenHolder) {
+ ioChildrenHolder = _childrenHolder;
}
private:
/////////////// Setters ////////////////
- /** Default children list setter. */
- void setChildrenList (DefaultChildrenBomHolder_T&) { }
+ /** Default children holder setter. */
+ void setChildrenHolder (DefaultChildrenBomHolder_T&) { }
- /** Set the children list. */
- void setChildrenList (ChildrenBomHolder_T& ioChildrenList) {
- _childrenList = &ioChildrenList;
+ /** Set the children holder. */
+ void setChildrenHolder (ChildrenBomHolder_T& ioChildrenHolder) {
+ _childrenHolder = &ioChildrenHolder;
}
public:
@@ -101,7 +101,7 @@
/** Constructors are private so as to force the usage of the Factory
layer. */
/** Default constructors. */
- BomRootStructure () : _content (NULL), _childrenList (NULL) { };
+ BomRootStructure () : _content (NULL), _childrenHolder (NULL) { };
BomRootStructure (const BomRootStructure&);
/** Destructor. */
@@ -112,8 +112,8 @@
/** The actual functional (Business Object) content. */
BOM_CONTENT* _content;
- /** List of inventories. */
- ChildrenBomHolder_T* _childrenList;
+ /** Holder of inventories. */
+ ChildrenBomHolder_T* _childrenHolder;
};
}
Copied: trunk/stdair/stdair/bom/BomStopContent.hpp (from rev 63, trunk/stdair/stdair/bom/BomContentDummy.hpp)
===================================================================
--- trunk/stdair/stdair/bom/BomStopContent.hpp (rev 0)
+++ trunk/stdair/stdair/bom/BomStopContent.hpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -0,0 +1,70 @@
+#ifndef __STDAIR_BOM_BOMSTOPCONTENT_HPP
+#define __STDAIR_BOM_BOMSTOPCONTENT_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/BomContent.hpp>
+
+namespace stdair {
+ // Forward declarations.
+ class BomStopStructure;
+ class BomKey;
+
+ /** Class representing the actual functional/business content
+ for the Bom stop.
+ <br>That class is just an utility tool to mark the stop
+ of the Bom tree. */
+ class BomStopContent : public BomContent {
+ friend class FacBomContent;
+
+ public:
+ // Type definitions
+ /** Definition allowing to retrieve the associated BOM structure type. */
+ typedef BomStopStructure BomStructure_T;
+
+ /** Definition allowing to retrieve the associated BOM key type. */
+ typedef BomKey BomKey_T;
+
+ public:
+ // /////////// Display support methods /////////
+ /** Dump a Business Object into an output stream.
+ @param ostream& the output stream. */
+ void toStream (std::ostream& ioOut) const { ioOut << toString(); }
+
+ /** Read a Business Object from an input stream.
+ @param istream& the input stream. */
+ void fromStream (std::istream& ioIn) { }
+
+ /** Get the serialised version of the Business Object. */
+ std::string toString() const { return describeKey(); }
+
+ /** Get a string describing the whole key (differentiating two objects
+ at any level). */
+ const std::string describeKey() const { return std::string (""); }
+
+ /** Get a string describing the short key (differentiating two objects
+ at the same level). */
+ const std::string describeShortKey() const { return std::string (""); }
+
+ private:
+ /** Constructors are private so as to force the usage of the Factory
+ layer. */
+ /** Default constructors. */
+ BomStopContent ();
+ BomStopContent (const BomStopContent&);
+ BomStopContent (const BomStructure_T& iBomStructure)
+ : _bomStructure (iBomStructure) { }
+
+ /** Destructor. */
+ virtual ~BomStopContent() { }
+
+ private:
+ // Attributes
+ /** Reference structure. */
+ const BomStructure_T& _bomStructure;
+ };
+
+}
+#endif // __STDAIR_BOM_BOMSTOPCONTENT_HPP
Copied: trunk/stdair/stdair/bom/BomStopStructure.hpp (from rev 63, trunk/stdair/stdair/bom/BomStructureDummy.hpp)
===================================================================
--- trunk/stdair/stdair/bom/BomStopStructure.hpp (rev 0)
+++ trunk/stdair/stdair/bom/BomStopStructure.hpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -0,0 +1,94 @@
+#ifndef __STDAIR_BOM_BOMSTOPSTRUCTURE_HPP
+#define __STDAIR_BOM_BOMSTOPSTRUCTURE_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/BomStructure.hpp>
+#include <stdair/bom/BomKey.hpp>
+#include <stdair/bom/BomChildrenHolderImp.hpp>
+// MPL
+#include <boost/mpl/vector.hpp>
+
+namespace stdair {
+ // Forward declarations.
+ class BomStopContent;
+
+ /** Wrapper class aimed at holding the actual content, modeled
+ by a specific BomStopContent class. */
+ class BomStopStructure : public BomStructure {
+ friend class FacBomStructure;
+ friend class FacBomContent;
+
+ private:
+ // Type definitions
+ /** Definition allowing to retrieve the associated BOM content type. */
+ typedef BomStopContent Content_T;
+
+ /** Definition allowing to retrieve the associated children type. */
+ typedef boost::mpl::vector<> ChildrenBomTypeList_T;
+
+ /** Definition allowing to retrive the default children bom holder type. */
+ typedef BomChildrenHolderImp<mpl_::void_> DefaultChildrenBomHolder_T;
+
+ public:
+
+ // /////////// Getters /////////////
+ /** Get the BomStopStructure key. */
+ const BomKey_T& getKey() const {
+ return _key;
+ }
+
+ private:
+ /////////////// Setters ////////////////
+ /** Default children list setter. */
+ void setChildrenList (DefaultChildrenBomHolder_T&) { }
+
+ public:
+ // /////////// Display support methods /////////
+ /** Dump a Business Object into an output stream.
+ @param ostream& the output stream. */
+ void toStream (std::ostream& ioOut) const {
+ ioOut << toString() << std::endl;
+ }
+
+ /** Read a Business Object from an input stream.
+ @param istream& the input stream. */
+ void fromStream (std::istream& ioIn) { }
+
+ /** Get the serialised version of the Business Object. */
+ std::string toString() const { return describeKey(); }
+
+ /** Get a string describing the whole key (differentiating two objects
+ at any level). */
+ const std::string describeKey() const { return _key.toString(); }
+
+ /** Get a string describing the short key (differentiating two objects
+ at the same level). */
+ const std::string describeShortKey() const { return _key.toString(); }
+
+
+ private:
+ /** Constructors are private so as to force the usage of the Factory
+ layer. */
+ /** Default constructors. */
+ BomStopStructure ();
+ BomStopStructure (const BomStopStructure&);
+ BomStopStructure (const BomKey_T& iKey) { _key = iKey; }
+
+ /** Destructor. */
+ ~BomStopStructure () { }
+
+ private:
+ // Attributes
+ /** The key of both the structure and content objects. */
+ BomKey_T _key;
+
+ /** The actual functional (Business Object) content. */
+ Content_T* _content;
+ };
+
+}
+#endif // __STDAIR_BOM_BOMSTOPSTRUCTURE_HPP
+
Deleted: trunk/stdair/stdair/bom/BomStructureDummy.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomStructureDummy.hpp 2009-11-13 08:52:41 UTC (rev 64)
+++ trunk/stdair/stdair/bom/BomStructureDummy.hpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -1,94 +0,0 @@
-#ifndef __STDAIR_BOM_BOMSTRUCTUREDUMMY_HPP
-#define __STDAIR_BOM_BOMSTRUCTUREDUMMY_HPP
-
-// //////////////////////////////////////////////////////////////////////
-// Import section
-// //////////////////////////////////////////////////////////////////////
-// STDAIR
-#include <stdair/bom/BomStructure.hpp>
-#include <stdair/bom/BomKey.hpp>
-#include <stdair/bom/BomChildrenHolderImp.hpp>
-// MPL
-#include <boost/mpl/vector.hpp>
-
-namespace stdair {
- // Forward declarations.
- class BomContentDummy;
-
- /** Wrapper class aimed at holding the actual content, modeled
- by a specific BomContentDummy class. */
- class BomStructureDummy : public BomStructure {
- friend class FacBomStructure;
- friend class FacBomContent;
-
- private:
- // Type definitions
- /** Definition allowing to retrieve the associated BOM content type. */
- typedef BomContentDummy Content_T;
-
- /** Definition allowing to retrieve the associated children type. */
- typedef boost::mpl::vector<> ChildrenBomTypeList_T;
-
- /** Definition allowing to retrive the default children bom holder type. */
- typedef BomChildrenHolderImp<mpl_::void_> DefaultChildrenBomHolder_T;
-
- public:
-
- // /////////// Getters /////////////
- /** Get the BomStructureDummy key. */
- const BomKey_T& getKey() const {
- return _key;
- }
-
- private:
- /////////////// Setters ////////////////
- /** Default children list setter. */
- void setChildrenList (DefaultChildrenBomHolder_T&) { }
-
- public:
- // /////////// Display support methods /////////
- /** Dump a Business Object into an output stream.
- @param ostream& the output stream. */
- void toStream (std::ostream& ioOut) const {
- ioOut << toString() << std::endl;
- }
-
- /** Read a Business Object from an input stream.
- @param istream& the input stream. */
- void fromStream (std::istream& ioIn) { }
-
- /** Get the serialised version of the Business Object. */
- std::string toString() const { return describeKey(); }
-
- /** Get a string describing the whole key (differentiating two objects
- at any level). */
- const std::string describeKey() const { return _key.toString(); }
-
- /** Get a string describing the short key (differentiating two objects
- at the same level). */
- const std::string describeShortKey() const { return _key.toString(); }
-
-
- private:
- /** Constructors are private so as to force the usage of the Factory
- layer. */
- /** Default constructors. */
- BomStructureDummy ();
- BomStructureDummy (const BomStructureDummy&);
- BomStructureDummy (const BomKey_T& iKey) { _key = iKey; }
-
- /** Destructor. */
- ~BomStructureDummy () { }
-
- private:
- // Attributes
- /** The key of both the structure and content objects. */
- BomKey_T _key;
-
- /** The actual functional (Business Object) content. */
- Content_T* _content;
- };
-
-}
-#endif // __STDAIR_BOM_BOMSTRUCTUREDUMMY_HPP
-
Modified: trunk/stdair/stdair/bom/BookingClassStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClassStructure.hpp 2009-11-13 08:52:41 UTC (rev 64)
+++ trunk/stdair/stdair/bom/BookingClassStructure.hpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -7,8 +7,8 @@
// MPL
#include <boost/mpl/vector.hpp>
// STDAIR
-#include <stdair/bom/BomStructureDummy.hpp>
-#include <stdair/bom/BomContentDummy.hpp>
+#include <stdair/bom/BomStopStructure.hpp>
+#include <stdair/bom/BomStopContent.hpp>
namespace stdair {
/** Wrapper class aimed at holding the actual content, modeled
@@ -33,11 +33,11 @@
typedef typename BOM_CONTENT::Parent_T::BomStructure_T ParentBomStructure_T;
/** Definition allowing to retrieve the associated children type. */
- typedef boost::mpl::vector <BomStructureDummy,
- BomStructureDummy> ChildrenBomTypeList_T;
+ typedef boost::mpl::vector <BomStopStructure,
+ BomStopStructure> ChildrenBomTypeList_T;
/** Definition allowing to retrieve the default children bom holder type. */
- typedef BomChildrenHolderImp<BomContentDummy> DefaultChildrenBomHolder_T;
+ typedef BomChildrenHolderImp<BomStopContent> DefaultChildrenBomHolder_T;
public:
// /////////// Getters /////////////
@@ -62,8 +62,8 @@
_parent = &ioSegmentCabinStructure;
}
- /** Default children list setter. */
- void setChildrenList (DefaultChildrenBomHolder_T&) { }
+ /** Default children holder setter. */
+ void setChildrenHolder (DefaultChildrenBomHolder_T&) { }
public:
// /////////// Display support methods /////////
Modified: trunk/stdair/stdair/bom/FlightDate.cpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDate.cpp 2009-11-13 08:52:41 UTC (rev 64)
+++ trunk/stdair/stdair/bom/FlightDate.cpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -58,22 +58,22 @@
// //////////////////////////////////////////////////////////////////////
SegmentDateList_T FlightDate::getSegmentDateList () const {
- return _flightDateStructure.getChildrenList();
+ return _flightDateStructure.getChildrenHolder();
}
// //////////////////////////////////////////////////////////////////////
SegmentDateMap_T FlightDate::getSegmentDateMap () const {
- return _flightDateStructure.getChildrenList();
+ return _flightDateStructure.getChildrenHolder();
}
// //////////////////////////////////////////////////////////////////////
LegDateList_T FlightDate::getLegDateList () const {
- return _flightDateStructure.getSecondChildrenList();
+ return _flightDateStructure.getSecondChildrenHolder();
}
// //////////////////////////////////////////////////////////////////////
LegDateMap_T FlightDate::getLegDateMap () const {
- return _flightDateStructure.getSecondChildrenList();
+ return _flightDateStructure.getSecondChildrenHolder();
}
// //////////////////////////////////////////////////////////////////////
Modified: trunk/stdair/stdair/bom/FlightDateStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-11-13 08:52:41 UTC (rev 64)
+++ trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -7,8 +7,8 @@
// MPL
#include <boost/mpl/vector.hpp>
// STDAIR
-#include <stdair/bom/BomStructureDummy.hpp>
-#include <stdair/bom/BomContentDummy.hpp>
+#include <stdair/bom/BomStopStructure.hpp>
+#include <stdair/bom/BomStopContent.hpp>
#include <stdair/bom/SegmentDateStructure.hpp>
#include <stdair/bom/LegDateStructure.hpp>
#include <stdair/bom/SegmentDateKey.hpp>
@@ -67,7 +67,7 @@
LegDateStructure<SecondContentChild_T> > ChildrenBomTypeList_T;
/** Definition allowing to retrive the default children bom holder type. */
- typedef BomChildrenHolderImp<BomContentDummy> DefaultChildrenBomHolder_T;
+ typedef BomChildrenHolderImp<BomStopContent> DefaultChildrenBomHolder_T;
/** Definition allowing to retrive the children bom holder type. */
typedef BomChildrenHolderImp<ContentChild_T> ChildrenBomHolder_T;
@@ -81,7 +81,7 @@
/** Define the children booking class holder type. */
typedef BomChildrenHolderImp<BookingClass_T> BookingClassHolder_T;
- /** Define the map of ContentChild_T. */
+ /** Define the map of booking class. */
typedef BomMap_T<BookingClass_T> BookingClassMap_T;
public:
@@ -103,16 +103,16 @@
return _content->getKey();
}
- /** Get the list of segment-dates. */
- const ChildrenBomHolder_T& getChildrenList() const {
- assert (_childrenList != NULL);
- return *_childrenList;
+ /** Get the holder of segment-dates. */
+ const ChildrenBomHolder_T& getChildrenHolder() const {
+ assert (_childrenHolder != NULL);
+ return *_childrenHolder;
}
- /** Get the list of leg-dates. */
- const SecondChildrenBomHolder_T& getSecondChildrenList() const {
- assert (_secondChildrenList != NULL);
- return *_secondChildrenList;
+ /** Get the holder of leg-dates. */
+ const SecondChildrenBomHolder_T& getSecondChildrenHolder() const {
+ assert (_secondChildrenHolder != NULL);
+ return *_secondChildrenHolder;
}
/** Get the holder of booking classes. */
@@ -121,14 +121,14 @@
return *_bookingClassHolder;
}
- /** Get the list of segment-dates. */
- void getChildrenList (ChildrenBomHolder_T*& ioChildrenList) {
- ioChildrenList = _childrenList;
+ /** Get the holder of segment-dates. */
+ void getChildrenHolder (ChildrenBomHolder_T*& ioChildrenHolder) {
+ ioChildrenHolder = _childrenHolder;
}
- /** Get the list of leg-dates. */
- void getChildrenList (SecondChildrenBomHolder_T*& ioChildrenList) {
- ioChildrenList = _secondChildrenList;
+ /** Get the holder of leg-dates. */
+ void getChildrenHolder (SecondChildrenBomHolder_T*& ioChildrenHolder) {
+ ioChildrenHolder = _secondChildrenHolder;
}
/** Retrieve, if existing, the segment-date corresponding to the
@@ -137,7 +137,7 @@
ContentChild_T* getContentChild (const ChildKey_T& iKey) const {
ContentChild_T* oContentChild_ptr = NULL;
- ChildrenMap_T lChildrenMap (getChildrenList());
+ ChildrenMap_T lChildrenMap (getChildrenHolder());
const MapKey_T lMapKey = iKey.toString();
typename ChildrenMap_T::iterator itContentChild =
@@ -157,7 +157,7 @@
SecondContentChild_T* getSecondContentChild (const SecondChildKey_T& iKey) const {
SecondContentChild_T* oContentChild_ptr = NULL;
- SecondChildrenMap_T lChildrenMap (getSecondChildrenList());
+ SecondChildrenMap_T lChildrenMap (getSecondChildrenHolder());
const MapKey_T lMapKey = iKey.toString();
typename SecondChildrenMap_T::iterator itContentChild =
@@ -198,20 +198,20 @@
_parent = &ioParent;
}
- /** Default children list setter. */
- void setChildrenList (DefaultChildrenBomHolder_T&) { }
+ /** Default children holder setter. */
+ void setChildrenHolder (DefaultChildrenBomHolder_T&) { }
- /** Set the segment-date children list. */
- void setChildrenList (ChildrenBomHolder_T& ioChildrenList) {
- _childrenList = &ioChildrenList;
+ /** Set the segment-date children holder. */
+ void setChildrenHolder (ChildrenBomHolder_T& ioChildrenHolder) {
+ _childrenHolder = &ioChildrenHolder;
}
- /** Set the leg-date children list. */
- void setChildrenList (SecondChildrenBomHolder_T& ioChildrenList) {
- _secondChildrenList = &ioChildrenList;
+ /** Set the leg-date children holder. */
+ void setChildrenHolder (SecondChildrenBomHolder_T& ioChildrenHolder) {
+ _secondChildrenHolder = &ioChildrenHolder;
}
- /** Set the booking class list. */
+ /** Set the booking class holder. */
void setBookingClassHolder (BookingClassHolder_T& ioBookingClassHolder) {
_bookingClassHolder = &ioBookingClassHolder;
}
@@ -244,7 +244,8 @@
layer. */
/** Default constructors. */
FlightDateStructure () : _parent (NULL), _content (NULL),
- _childrenList (NULL), _secondChildrenList (NULL),
+ _childrenHolder (NULL),
+ _secondChildrenHolder (NULL),
_bookingClassHolder (NULL) { }
FlightDateStructure (const FlightDateStructure&);
@@ -259,13 +260,13 @@
/** The actual functional (Business Object) content. */
BOM_CONTENT* _content;
- /** List of segment-dates. */
- ChildrenBomHolder_T* _childrenList;
+ /** Holder of segment-dates. */
+ ChildrenBomHolder_T* _childrenHolder;
- /** List of leg-dates. */
- SecondChildrenBomHolder_T* _secondChildrenList;
+ /** Holder of leg-dates. */
+ SecondChildrenBomHolder_T* _secondChildrenHolder;
- /** List of booking classes. */
+ /** Holder of booking classes. */
BookingClassHolder_T* _bookingClassHolder;
};
Modified: trunk/stdair/stdair/bom/Inventory.cpp
===================================================================
--- trunk/stdair/stdair/bom/Inventory.cpp 2009-11-13 08:52:41 UTC (rev 64)
+++ trunk/stdair/stdair/bom/Inventory.cpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -7,6 +7,7 @@
#include <stdair/bom/InventoryStructure.hpp>
#include <stdair/bom/Inventory.hpp>
#include <stdair/bom/FlightDate.hpp>
+#include <stdair/bom/BookingClass.hpp>
#include <stdair/bom/BomList.hpp>
#include <stdair/bom/BomMap.hpp>
@@ -50,15 +51,25 @@
// //////////////////////////////////////////////////////////////////////
FlightDateList_T Inventory::getFlightDateList () const {
- return _inventoryStructure.getChildrenList();
+ return _inventoryStructure.getChildrenHolder();
}
// //////////////////////////////////////////////////////////////////////
FlightDateMap_T Inventory::getFlightDateMap () const {
- return _inventoryStructure.getChildrenList();
+ return _inventoryStructure.getChildrenHolder();
}
// //////////////////////////////////////////////////////////////////////
+ BookingClassList_T Inventory::getBookingClassList () const {
+ return _inventoryStructure.getBookingClassHolder();
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ BookingClassMap_T Inventory::getBookingClassMap () const {
+ return _inventoryStructure.getBookingClassHolder();
+ }
+
+ // //////////////////////////////////////////////////////////////////////
FlightDate* Inventory::
getFlightDate (const FlightDateKey_T& iKey) const {
return _inventoryStructure.getContentChild (iKey);
Modified: trunk/stdair/stdair/bom/Inventory.hpp
===================================================================
--- trunk/stdair/stdair/bom/Inventory.hpp 2009-11-13 08:52:41 UTC (rev 64)
+++ trunk/stdair/stdair/bom/Inventory.hpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -9,6 +9,7 @@
#include <stdair/bom/InventoryStructure.hpp>
#include <stdair/bom/InventoryTypes.hpp>
#include <stdair/bom/FlightDateTypes.hpp>
+#include <stdair/bom/BookingClassTypes.hpp>
#include <stdair/bom/InventoryContent.hpp>
namespace stdair {
@@ -75,6 +76,12 @@
/** Get a FlightDateMap_T for iteration methods. */
FlightDateMap_T getFlightDateMap () const;
+
+ /** Get a BookingClassList_T for iteration methods. */
+ BookingClassList_T getBookingClassList () const;
+
+ /** Get a BookingClassMap_T for iteration methods. */
+ BookingClassMap_T getBookingClassMap () const;
/** Get the airline feature. */
const AirlineFeature* getAirlineFeature () const {
Modified: trunk/stdair/stdair/bom/InventoryStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-11-13 08:52:41 UTC (rev 64)
+++ trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -9,8 +9,8 @@
// (Boost) MPL
#include <boost/mpl/vector.hpp>
// STDAIR
-#include <stdair/bom/BomStructureDummy.hpp>
-#include <stdair/bom/BomContentDummy.hpp>
+#include <stdair/bom/BomStopStructure.hpp>
+#include <stdair/bom/BomStopContent.hpp>
#include <stdair/bom/FlightDateStructure.hpp>
#include <stdair/bom/FlightDateKey.hpp>
@@ -52,10 +52,10 @@
/** Definition allowing to retrieve the associated children type. */
typedef boost::mpl::vector<FlightDateStructure<ContentChild_T>,
- BomStructureDummy> ChildrenBomTypeList_T;
+ BomStopStructure> ChildrenBomTypeList_T;
/** Define the default children bom holder type. */
- typedef BomChildrenHolderImp<BomContentDummy> DefaultChildrenBomHolder_T;
+ typedef BomChildrenHolderImp<BomStopContent> DefaultChildrenBomHolder_T;
/** Define the children bom holder type. */
typedef BomChildrenHolderImp<ContentChild_T> ChildrenBomHolder_T;
@@ -66,7 +66,7 @@
/** Define the children booking class holder type. */
typedef BomChildrenHolderImp<BookingClass_T> BookingClassHolder_T;
- /** Define the map of ContentChild_T. */
+ /** Define the map of booking class. */
typedef BomMap_T<BookingClass_T> BookingClassMap_T;
public:
@@ -88,15 +88,15 @@
return _content->getKey ();
}
- /** Get the list of flight-dates. */
- const ChildrenBomHolder_T& getChildrenList() const {
- assert (_childrenList != NULL);
- return *_childrenList;
+ /** Get the holder of flight-dates. */
+ const ChildrenBomHolder_T& getChildrenHolder() const {
+ assert (_childrenHolder != NULL);
+ return *_childrenHolder;
}
- /** Get the list of flight-dates. */
- void getChildrenList (ChildrenBomHolder_T*& ioChildrenList) {
- ioChildrenList = _childrenList;
+ /** Get the holder of flight-dates. */
+ void getChildrenHolder (ChildrenBomHolder_T*& ioChildrenHolder) {
+ ioChildrenHolder = _childrenHolder;
}
/** Get the holder of booking classes. */
@@ -111,7 +111,7 @@
ContentChild_T* getContentChild (const ChildKey_T& iKey) const {
ContentChild_T* oContentChild_ptr= NULL;
- ChildrenMap_T lChildrenMap (getChildrenList());
+ ChildrenMap_T lChildrenMap (getChildrenHolder());
const MapKey_T lMapKey = iKey.toString();
typename ChildrenMap_T::iterator itContentChild =
@@ -132,15 +132,15 @@
_parent = &ioParent;
}
- /** Default children list setter. */
- void setChildrenList (DefaultChildrenBomHolder_T&) { }
+ /** Default children holder setter. */
+ void setChildrenHolder (DefaultChildrenBomHolder_T&) { }
- /** Set the children list. */
- void setChildrenList (ChildrenBomHolder_T& ioChildrenList) {
- _childrenList = &ioChildrenList;
+ /** Set the children holder. */
+ void setChildrenHolder (ChildrenBomHolder_T& ioChildrenHolder) {
+ _childrenHolder = &ioChildrenHolder;
}
- /** Set the booking class list. */
+ /** Set the booking class holder. */
void setBookingClassHolder (BookingClassHolder_T& ioBookingClassHolder) {
_bookingClassHolder = &ioBookingClassHolder;
}
@@ -173,7 +173,8 @@
layer. */
/** Default constructors. */
InventoryStructure () : _parent (NULL), _content (NULL),
- _childrenList (NULL), _bookingClassHolder (NULL) { }
+ _childrenHolder (NULL),
+ _bookingClassHolder (NULL) { }
InventoryStructure (const InventoryStructure&);
/** Destructor. */
@@ -187,10 +188,10 @@
/** The actual functional (Business Object) content. */
BOM_CONTENT* _content;
- /** List of flight-dates. */
- ChildrenBomHolder_T* _childrenList;
+ /** Holder of flight-dates. */
+ ChildrenBomHolder_T* _childrenHolder;
- /** List of booking classes. */
+ /** Holder of booking classes. */
BookingClassHolder_T* _bookingClassHolder;
};
Modified: trunk/stdair/stdair/bom/LegCabinStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabinStructure.hpp 2009-11-13 08:52:41 UTC (rev 64)
+++ trunk/stdair/stdair/bom/LegCabinStructure.hpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -7,11 +7,14 @@
// MPL
#include <boost/mpl/vector.hpp>
// STDAIR
-#include <stdair/bom/BomStructureDummy.hpp>
-#include <stdair/bom/BomContentDummy.hpp>
+#include <stdair/bom/BomStopStructure.hpp>
+#include <stdair/bom/BomStopContent.hpp>
#include <stdair/bom/BookingClassStructure.hpp>
namespace stdair {
+ // Forward declarations.
+ template <typename BOM> struct BomMap_T;
+
/** Wrapper class aimed at holding the actual content, modeled
by an external specific LegCabin class (for instance,
in the AIRSCHED library). */
@@ -34,14 +37,20 @@
typedef typename BOM_CONTENT::Parent_T::BomStructure_T ParentBomStructure_T;
/** Definition allowing to retrieve the associated children type. */
- typedef boost::mpl::vector <BomStructureDummy,
- BomStructureDummy> ChildrenBomTypeList_T;
+ typedef boost::mpl::vector <BomStopStructure,
+ BomStopStructure> ChildrenBomTypeList_T;
/** Definition allowing to retrieve the default children bom holder type. */
- typedef BomChildrenHolderImp<BomContentDummy> DefaultChildrenBomHolder_T;
+ typedef BomChildrenHolderImp<BomStopContent> DefaultChildrenBomHolder_T;
+ /** Define the associated segment-cabin type. */
+ typedef typename BOM_CONTENT::SegmentCabinContent_T SegmentCabin_T;
+
/** Define the associated segment-cabin holder type. */
- typedef BomChildrenHolderImp<typename BOM_CONTENT::SegmentCabinContent_T> SegmentCabinHolder_T;
+ typedef BomChildrenHolderImp<SegmentCabin_T> SegmentCabinHolder_T;
+
+ /** Define the map of segment-cabin. */
+ typedef BomMap_T<SegmentCabin_T> SegmentCabinMap_T;
public:
// /////////// Getters /////////////
@@ -66,8 +75,8 @@
_parent = &ioLegDateStructure;
}
- /** Default children list setter. */
- void setChildrenList (DefaultChildrenBomHolder_T&) { }
+ /** Default children holder setter. */
+ void setChildrenHolder (DefaultChildrenBomHolder_T&) { }
/** Set the segment-cabin holder. */
void setSegmentCabinHolder (SegmentCabinHolder_T& ioSegmentCabinHolder) {
Modified: trunk/stdair/stdair/bom/LegDate.cpp
===================================================================
--- trunk/stdair/stdair/bom/LegDate.cpp 2009-11-13 08:52:41 UTC (rev 64)
+++ trunk/stdair/stdair/bom/LegDate.cpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -55,12 +55,12 @@
// ////////////////////////////////////////////////////////////////////
LegCabinList_T LegDate::getLegCabinList () const {
- return _legDateStructure.getChildrenList();
+ return _legDateStructure.getChildrenHolder();
}
// ////////////////////////////////////////////////////////////////////
LegCabinMap_T LegDate::getLegCabinMap () const {
- return _legDateStructure.getChildrenList();
+ return _legDateStructure.getChildrenHolder();
}
// ////////////////////////////////////////////////////////////////////
Modified: trunk/stdair/stdair/bom/LegDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegDate.hpp 2009-11-13 08:52:41 UTC (rev 64)
+++ trunk/stdair/stdair/bom/LegDate.hpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -40,7 +40,7 @@
/** Definition allowing to retrieve the specific SegmentDate type. */
typedef SegmentDate SegmentDateContent_T;
-
+
public:
// /////////// Getters ////////////
// /** Get the airline code (from the parent class). */
Modified: trunk/stdair/stdair/bom/LegDateStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegDateStructure.hpp 2009-11-13 08:52:41 UTC (rev 64)
+++ trunk/stdair/stdair/bom/LegDateStructure.hpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -7,8 +7,8 @@
// MPL
#include <boost/mpl/vector.hpp>
// STDAIR
-#include <stdair/bom/BomStructureDummy.hpp>
-#include <stdair/bom/BomContentDummy.hpp>
+#include <stdair/bom/BomStopStructure.hpp>
+#include <stdair/bom/BomStopContent.hpp>
#include <stdair/bom/LegCabinStructure.hpp>
#include <stdair/bom/LegCabinKey.hpp>
@@ -49,17 +49,23 @@
/** Definition allowing to retrieve the associated children type. */
typedef boost::mpl::vector <LegCabinStructure<ContentChild_T>,
- BomStructureDummy> ChildrenBomTypeList_T;
+ BomStopStructure> ChildrenBomTypeList_T;
/** Definition allowing to retrieve the default children bom holder type. */
- typedef BomChildrenHolderImp<BomContentDummy> DefaultChildrenBomHolder_T;
+ typedef BomChildrenHolderImp<BomStopContent> DefaultChildrenBomHolder_T;
/** Definition allowing to retrive the children bom holder type. */
typedef BomChildrenHolderImp<ContentChild_T> ChildrenBomHolder_T;
+
+ /** Define the associated segment-date type. */
+ typedef typename BOM_CONTENT::SegmentDateContent_T SegmentDate_T;
+
+ /** Define the associated segment-date holder type. */
+ typedef BomChildrenHolderImp<SegmentDate_T> SegmentDateHolder_T;
+
+ /** Define the map of segment-date. */
+ typedef BomMap_T<SegmentDate_T> SegmentDateMap_T;
- /** Define the associated segment-date holder type.*/
- typedef BomChildrenHolderImp<typename BOM_CONTENT::SegmentDateContent_T> SegmentDateHolder_T;
-
public:
// /////////// Getters /////////////
/** Get the (parent) FlightDateStructure object. */
@@ -76,14 +82,14 @@
return _content->getKey();
}
- /** Get the list of leg-cabins. */
- const ChildrenBomHolder_T& getChildrenList() const {
- return *_childrenList;
+ /** Get the holder of leg-cabins. */
+ const ChildrenBomHolder_T& getChildrenHolder() const {
+ return *_childrenHolder;
}
- /** Get the list of leg-cabins. */
- void getChildrenList (ChildrenBomHolder_T*& ioChildrenList) {
- ioChildrenList = _childrenList;
+ /** Get the holder of leg-cabins. */
+ void getChildrenHolder (ChildrenBomHolder_T*& ioChildrenHolder) {
+ ioChildrenHolder = _childrenHolder;
}
/** Retrieve, if existing, the leg-cabin corresponding to the
@@ -92,7 +98,7 @@
ContentChild_T* getContentChild (const ChildKey_T& iKey) const {
ContentChild_T* oContentChild_ptr = NULL;
- ChildrenMap_T lChildrenMap (getChildrenList());
+ ChildrenMap_T lChildrenMap (getChildrenHolder());
const MapKey_T lMapKey = iKey.toString();
typename ChildrenMap_T::iterator itContentChild =
@@ -113,12 +119,12 @@
_parent = &ioFlightDateStructure;
}
- /** Default children list setter. */
- void setChildrenList (DefaultChildrenBomHolder_T&) { }
+ /** Default children holder setter. */
+ void setChildrenHolder (DefaultChildrenBomHolder_T&) { }
- /** Set the leg-cabin children list. */
- void setChildrenList (ChildrenBomHolder_T& ioChildrenList) {
- _childrenList = &ioChildrenList;
+ /** Set the leg-cabin children holder. */
+ void setChildrenHolder (ChildrenBomHolder_T& ioChildrenHolder) {
+ _childrenHolder = &ioChildrenHolder;
}
/** Set the segment-date holder. */
@@ -154,7 +160,7 @@
layer. */
/** Default constructors. */
LegDateStructure () : _parent (NULL), _content (NULL),
- _childrenList (NULL), _segmentDateHolder (NULL) { }
+ _childrenHolder (NULL), _segmentDateHolder (NULL) { }
LegDateStructure (const LegDateStructure&);
/** Destructor. */
@@ -168,8 +174,8 @@
/** The actual functional (Business Object) content. */
BOM_CONTENT* _content;
- /** List of leg-cabins. */
- ChildrenBomHolder_T* _childrenList;
+ /** Holder of leg-cabins. */
+ ChildrenBomHolder_T* _childrenHolder;
/** Holder of associated segment-dates. */
SegmentDateHolder_T* _segmentDateHolder;
Modified: trunk/stdair/stdair/bom/SegmentCabin.cpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabin.cpp 2009-11-13 08:52:41 UTC (rev 64)
+++ trunk/stdair/stdair/bom/SegmentCabin.cpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -56,12 +56,12 @@
// //////////////////////////////////////////////////////////////////////
BookingClassList_T SegmentCabin::getBookingClassList () const {
- return _segmentCabinStructure.getChildrenList();
+ return _segmentCabinStructure.getChildrenHolder();
}
// //////////////////////////////////////////////////////////////////////
BookingClassMap_T SegmentCabin::getBookingClassMap () const {
- return _segmentCabinStructure.getChildrenList();
+ return _segmentCabinStructure.getChildrenHolder();
}
}
Modified: trunk/stdair/stdair/bom/SegmentCabinStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabinStructure.hpp 2009-11-13 08:52:41 UTC (rev 64)
+++ trunk/stdair/stdair/bom/SegmentCabinStructure.hpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -7,11 +7,14 @@
// MPL
#include <boost/mpl/vector.hpp>
// STDAIR
-#include <stdair/bom/BomStructureDummy.hpp>
-#include <stdair/bom/BomContentDummy.hpp>
+#include <stdair/bom/BomStopStructure.hpp>
+#include <stdair/bom/BomStopContent.hpp>
#include <stdair/bom/BookingClassStructure.hpp>
namespace stdair {
+ // Forward declarations.
+ template <typename BOM> struct BomMap_T;
+
/** Wrapper class aimed at holding the actual content, modeled
by an external specific SegmentCabin class (for instance,
in the AIRSCHED library). */
@@ -39,16 +42,22 @@
/** Definition allowing to retrieve the associated children type. */
typedef boost::mpl::vector <BookingClassStructure<ContentChild_T>,
- BomStructureDummy> ChildrenBomTypeList_T;
+ BomStopStructure> ChildrenBomTypeList_T;
/** Definition allowing to retrieve the default children bom holder type. */
- typedef BomChildrenHolderImp<BomContentDummy> DefaultChildrenBomHolder_T;
+ typedef BomChildrenHolderImp<BomStopContent> DefaultChildrenBomHolder_T;
/** Definition allowing to retrive the children bom holder type. */
typedef BomChildrenHolderImp<ContentChild_T> ChildrenBomHolder_T;
+ /** Define the associated leg-cabin type. */
+ typedef typename BOM_CONTENT::LegCabinContent_T LegCabin_T;
+
/** Define the associated leg-cabin holder type. */
- typedef BomChildrenHolderImp<typename BOM_CONTENT::LegCabinContent_T> LegCabinHolder_T;
+ typedef BomChildrenHolderImp<LegCabin_T> LegCabinHolder_T;
+
+ /** Define the map of leg-cabin. */
+ typedef BomMap_T<LegCabin_T> LegCabinMap_T;
public:
// /////////// Getters /////////////
@@ -69,14 +78,14 @@
return _content->getKey();
}
- /** Get the list of segment-cabins. */
- const ChildrenBomHolder_T& getChildrenList() const {
- return *_childrenList;
+ /** Get the holder of segment-cabins. */
+ const ChildrenBomHolder_T& getChildrenHolder() const {
+ return *_childrenHolder;
}
- /** Get the list of segment-cabins. */
- void getChildrenList (ChildrenBomHolder_T*& ioChildrenList) {
- ioChildrenList = _childrenList;
+ /** Get the holder of segment-cabins. */
+ void getChildrenHolder (ChildrenBomHolder_T*& ioChildrenHolder) {
+ ioChildrenHolder = _childrenHolder;
}
private:
@@ -86,12 +95,12 @@
_parent = &ioSegmentDateStructure;
}
- /** Default children list setter. */
- void setChildrenList (DefaultChildrenBomHolder_T&) { }
+ /** Default children holder setter. */
+ void setChildrenHolder (DefaultChildrenBomHolder_T&) { }
- /** Set the segment-cabin children list. */
- void setChildrenList (ChildrenBomHolder_T& ioChildrenList) {
- _childrenList = &ioChildrenList;
+ /** Set the segment-cabin children holder. */
+ void setChildrenHolder (ChildrenBomHolder_T& ioChildrenHolder) {
+ _childrenHolder = &ioChildrenHolder;
}
/** Set the leg-cabin holder. */
@@ -127,7 +136,7 @@
layer. */
/** Default constructors. */
SegmentCabinStructure () : _parent (NULL), _content (NULL),
- _childrenList (NULL), _legCabinHolder (NULL) { }
+ _childrenHolder (NULL), _legCabinHolder (NULL) { }
SegmentCabinStructure (const SegmentCabinStructure&);
/** Destructor. */
@@ -141,8 +150,8 @@
/** The actual functional (Business Object) content. */
BOM_CONTENT* _content;
- /** List of segment-cabins. */
- ChildrenBomHolder_T* _childrenList;
+ /** Holder of segment-cabins. */
+ ChildrenBomHolder_T* _childrenHolder;
/** Holder of associated leg-cabins. */
LegCabinHolder_T* _legCabinHolder;
Modified: trunk/stdair/stdair/bom/SegmentDate.cpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDate.cpp 2009-11-13 08:52:41 UTC (rev 64)
+++ trunk/stdair/stdair/bom/SegmentDate.cpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -57,12 +57,12 @@
// //////////////////////////////////////////////////////////////////////
SegmentCabinList_T SegmentDate::getSegmentCabinList () const {
- return _segmentDateStructure.getChildrenList();
+ return _segmentDateStructure.getChildrenHolder();
}
// //////////////////////////////////////////////////////////////////////
SegmentCabinMap_T SegmentDate::getSegmentCabinMap () const {
- return _segmentDateStructure.getChildrenList();
+ return _segmentDateStructure.getChildrenHolder();
}
// //////////////////////////////////////////////////////////////////////
Modified: trunk/stdair/stdair/bom/SegmentDateStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDateStructure.hpp 2009-11-13 08:52:41 UTC (rev 64)
+++ trunk/stdair/stdair/bom/SegmentDateStructure.hpp 2009-11-16 15:53:21 UTC (rev 65)
@@ -7,11 +7,14 @@
// MPL
#include <boost/mpl/vector.hpp>
// STDAIR
-#include <stdair/bom/BomStructureDummy.hpp>
-#include <stdair/bom/BomContentDummy.hpp>
+#include <stdair/bom/BomStopStructure.hpp>
+#include <stdair/bom/BomStopContent.hpp>
#include <stdair/bom/SegmentCabinStructure.hpp>
namespace stdair {
+ // Forward declarations.
+ template <typename BOM> struct BomMap_T;
+
/** Wrapper class aimed at holding the actual content, modeled
by an external specific SegmentDate class (for instance,
in the AIRSCHED library). */
@@ -39,16 +42,22 @@
/** Definition allowing to retrieve the associated children type. */
typedef boost::mpl::vector <SegmentCabinStructure<ContentChild_T>,
- BomStructureDummy> ChildrenBomTypeList_T;
+ BomStopStructure> ChildrenBomTypeList_T;
/** Definition allowing to retrieve the default children bom holder type. */
- ...
[truncated message content] |
|
From: <qua...@us...> - 2009-11-13 08:52:49
|
Revision: 64
http://stdair.svn.sourceforge.net/stdair/?rev=64&view=rev
Author: quannaus
Date: 2009-11-13 08:52:41 +0000 (Fri, 13 Nov 2009)
Log Message:
-----------
[Dev] implemented the creation of direct accesses. Still have one uncomphensible bug.
Modified Paths:
--------------
trunk/stdair/stdair/basic/BasConst.cpp
trunk/stdair/stdair/basic/BasConst_Inventory.hpp
trunk/stdair/stdair/bom/FlightDate.cpp
trunk/stdair/stdair/bom/FlightDate.hpp
trunk/stdair/stdair/bom/FlightDateStructure.hpp
trunk/stdair/stdair/bom/InventoryStructure.hpp
trunk/stdair/stdair/bom/LegCabin.hpp
trunk/stdair/stdair/bom/LegCabinStructure.hpp
trunk/stdair/stdair/bom/LegDate.cpp
trunk/stdair/stdair/bom/LegDate.hpp
trunk/stdair/stdair/bom/LegDateStructure.hpp
trunk/stdair/stdair/bom/SegmentCabin.hpp
trunk/stdair/stdair/bom/SegmentCabinStructure.hpp
trunk/stdair/stdair/bom/SegmentDate.cpp
trunk/stdair/stdair/bom/SegmentDate.hpp
trunk/stdair/stdair/bom/SegmentDateStructure.hpp
trunk/stdair/stdair/factory/FacBomContent.hpp
trunk/stdair/stdair/factory/FacBomStructure.hpp
Modified: trunk/stdair/stdair/basic/BasConst.cpp
===================================================================
--- trunk/stdair/stdair/basic/BasConst.cpp 2009-11-12 18:11:55 UTC (rev 63)
+++ trunk/stdair/stdair/basic/BasConst.cpp 2009-11-13 08:52:41 UTC (rev 64)
@@ -479,4 +479,13 @@
/** Default Bid-Price Vector. */
const BidPriceVector_T DEFAULT_BID_PRICE_VECTOR = std::vector<BidPrice_T>();
+ /** Maximum number of legs linked to a single flight-date.
+ <br>Note that the number of derived segments is n*(n+1)/2 if n
+ is the number of legs. */
+ const unsigned short MAXIMUM_NUMBER_OF_LEGS_IN_FLIGHT = 7;
+
+ /** Maximum number of segments linked to a single O&D
+ (Origin & Destination). */
+ const unsigned short MAXIMUM_NUMBER_OF_SEGMENTS_IN_OND = 3;
+
}
Modified: trunk/stdair/stdair/basic/BasConst_Inventory.hpp
===================================================================
--- trunk/stdair/stdair/basic/BasConst_Inventory.hpp 2009-11-12 18:11:55 UTC (rev 63)
+++ trunk/stdair/stdair/basic/BasConst_Inventory.hpp 2009-11-13 08:52:41 UTC (rev 64)
@@ -15,6 +15,15 @@
/** Default Bid-Price Vector. */
extern const BidPriceVector_T DEFAULT_BID_PRICE_VECTOR;
+
+ /** Maximum number of legs linked to a single flight-date.
+ <br>Note that the number of derived segments is n*(n+1)/2 if n
+ is the number of legs. */
+ extern const unsigned short MAXIMUM_NUMBER_OF_LEGS_IN_FLIGHT;
+
+ /** Maximum number of segments linked to a single O&D
+ (Origin & Destination). */
+ extern const unsigned short MAXIMUM_NUMBER_OF_SEGMENTS_IN_OND;
}
#endif // __STDAIR_BAS_BASCONST_INVENTORY_HPP
Modified: trunk/stdair/stdair/bom/FlightDate.cpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDate.cpp 2009-11-12 18:11:55 UTC (rev 63)
+++ trunk/stdair/stdair/bom/FlightDate.cpp 2009-11-13 08:52:41 UTC (rev 64)
@@ -11,6 +11,7 @@
#include <stdair/bom/FlightDate.hpp>
#include <stdair/bom/SegmentDate.hpp>
#include <stdair/bom/LegDate.hpp>
+#include <stdair/bom/BookingClass.hpp>
#include <stdair/bom/BomList.hpp>
#include <stdair/bom/BomMap.hpp>
@@ -74,6 +75,21 @@
LegDateMap_T FlightDate::getLegDateMap () const {
return _flightDateStructure.getSecondChildrenList();
}
-
+
+ // //////////////////////////////////////////////////////////////////////
+ LegDate* FlightDate::getLegDate (const LegDateKey_T& iKey) const {
+ return _flightDateStructure.getSecondContentChild (iKey);
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ SegmentDate* FlightDate::getSegmentDate (const SegmentDateKey_T& iKey) const {
+ return _flightDateStructure.getContentChild (iKey);
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ BookingClass* FlightDate::
+ getBookingClass (const BookingClassKey_T& iKey) const {
+ return _flightDateStructure.getBookingClass (iKey);
+ }
}
Modified: trunk/stdair/stdair/bom/FlightDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDate.hpp 2009-11-12 18:11:55 UTC (rev 63)
+++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-11-13 08:52:41 UTC (rev 64)
@@ -62,31 +62,25 @@
/** Get a LegDateMap_T for iteration methods. */
LegDateMap_T getLegDateMap () const;
-
- /** Get the list of class structures */
- // BookingClassMap_T getClassList() const {
-// return _bookingClassList;
-// }
-
+
/** Get the airline code (from the parent class). */
// const AirlineCode_T& getAirlineCode() const;
-// /** Retrieve, if existing, the LegDate corresponding to the
-// given board point (LegDate key).
-// <br>If not existing, return the NULL pointer. */
-// LegDate* getLegDate (const AirportCode_T& iBoardPoint) const;
+ /** Retrieve, if existing, the LegDate corresponding to the
+ given LegDate key.
+ <br>If not existing, return the NULL pointer. */
+ LegDate* getLegDate (const LegDateKey_T&) const;
-// /** Retrieve, if existing, the SegmentDate corresponding to the
-// given (board point, off point) pair (SegmentDate key).
-// <br>If not existing, return the NULL pointer. */
-// SegmentDate* getSegmentDate (const AirportCode_T& iBoardPoint,
-// const AirportCode_T& iOffPoint) const;
+ /** Retrieve, if existing, the SegmentDate corresponding to the
+ given SegmentDate key.
+ <br>If not existing, return the NULL pointer. */
+ SegmentDate* getSegmentDate (const SegmentDateKey_T&) const;
-// /** Return the BookingClass corresponding to a given key.
-// <br>When no BookingClass, matching the given key, can be found,
-// the NULL pointer is returned.
-// <br>Otherwise, a pointer is returned on the BookingClass object. */
-// BookingClass* getBookingClass (const std::string&) const;
+ /** Return the BookingClass corresponding to a given key.
+ <br>When no BookingClass, matching the given key, can be found,
+ the NULL pointer is returned.
+ <br>Otherwise, a pointer is returned on the BookingClass object. */
+ BookingClass* getBookingClass (const BookingClassKey_T&) const;
// /** Retrieve, if existing, theOnD corresponding to the
// given OnDKey.
Modified: trunk/stdair/stdair/bom/FlightDateStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-11-12 18:11:55 UTC (rev 63)
+++ trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-11-13 08:52:41 UTC (rev 64)
@@ -11,8 +11,14 @@
#include <stdair/bom/BomContentDummy.hpp>
#include <stdair/bom/SegmentDateStructure.hpp>
#include <stdair/bom/LegDateStructure.hpp>
+#include <stdair/bom/SegmentDateKey.hpp>
+#include <stdair/bom/LegDateKey.hpp>
+#include <stdair/bom/BookingClassKey.hpp>
namespace stdair {
+ // Forward declarations.
+ template <typename BOM> struct BomMap_T;
+
/** Wrapper class aimed at holding the actual content, modeled
by an external specific FlightDate class (for instance,
in the AIRSCHED library). */
@@ -30,6 +36,14 @@
/** Definition allowing to retrieve the associated BOM key type. */
typedef typename BOM_CONTENT::BomKey_T BomKey_T;
+ /** Definition allowing to retrieve the key type of the
+ ContentChild_T. */
+ typedef SegmentDateKey_T ChildKey_T;
+
+ /** Definition allowing to retrieve the key type of the
+ SecondContentChild_T. */
+ typedef LegDateKey_T SecondChildKey_T;
+
/** Definition allowing to retrieve the associated parent
BOM structure type. */
typedef typename BOM_CONTENT::Parent_T::BomStructure_T ParentBomStructure_T;
@@ -38,9 +52,15 @@
BOM_CONTENT. */
typedef typename BOM_CONTENT::ContentChild_T ContentChild_T;
+ /** Define the map of ContentChild_T. */
+ typedef BomMap_T<ContentChild_T> ChildrenMap_T;
+
/** Definition allowing to retrieve the second children type of the
BOM_CONTENT. */
typedef typename BOM_CONTENT::SecondContentChild_T SecondContentChild_T;
+
+ /** Define the map of SecondContentChild_T. */
+ typedef BomMap_T<SecondContentChild_T> SecondChildrenMap_T;
/** Definition allowing to retrieve the associated children type. */
typedef boost::mpl::vector<SegmentDateStructure<ContentChild_T>,
@@ -55,8 +75,14 @@
/** Definition allowing to retrive the second children bom holder type. */
typedef BomChildrenHolderImp<SecondContentChild_T> SecondChildrenBomHolder_T;
- /** Define the children booking class holder type. */
- typedef BomChildrenHolderImp<typename BOM_CONTENT::BookingClassContent_T> BookingClassHolder_T;
+ /** Define the children booking class type. */
+ typedef typename BOM_CONTENT::BookingClassContent_T BookingClass_T;
+
+ /** Define the children booking class holder type. */
+ typedef BomChildrenHolderImp<BookingClass_T> BookingClassHolder_T;
+
+ /** Define the map of ContentChild_T. */
+ typedef BomMap_T<BookingClass_T> BookingClassMap_T;
public:
// /////////// Getters /////////////
@@ -79,14 +105,22 @@
/** Get the list of segment-dates. */
const ChildrenBomHolder_T& getChildrenList() const {
+ assert (_childrenList != NULL);
return *_childrenList;
}
/** Get the list of leg-dates. */
const SecondChildrenBomHolder_T& getSecondChildrenList() const {
+ assert (_secondChildrenList != NULL);
return *_secondChildrenList;
}
+ /** Get the holder of booking classes. */
+ BookingClassHolder_T& getBookingClassHolder() const {
+ assert (_bookingClassHolder);
+ return *_bookingClassHolder;
+ }
+
/** Get the list of segment-dates. */
void getChildrenList (ChildrenBomHolder_T*& ioChildrenList) {
ioChildrenList = _childrenList;
@@ -96,7 +130,67 @@
void getChildrenList (SecondChildrenBomHolder_T*& ioChildrenList) {
ioChildrenList = _secondChildrenList;
}
+
+ /** Retrieve, if existing, the segment-date corresponding to the
+ given key.
+ <br>If not exissting, return the NULL pointer. */
+ ContentChild_T* getContentChild (const ChildKey_T& iKey) const {
+ ContentChild_T* oContentChild_ptr = NULL;
+
+ ChildrenMap_T lChildrenMap (getChildrenList());
+ const MapKey_T lMapKey = iKey.toString();
+
+ typename ChildrenMap_T::iterator itContentChild =
+ lChildrenMap.find (lMapKey);
+
+ if (itContentChild != lChildrenMap.end()) {
+ oContentChild_ptr = itContentChild->second;
+ assert (oContentChild_ptr != NULL);
+ }
+
+ return oContentChild_ptr;
+ }
+ /** Retrieve, if existing, the leg-date corresponding to the
+ given key.
+ <br>If not exissting, return the NULL pointer. */
+ SecondContentChild_T* getSecondContentChild (const SecondChildKey_T& iKey) const {
+ SecondContentChild_T* oContentChild_ptr = NULL;
+
+ SecondChildrenMap_T lChildrenMap (getSecondChildrenList());
+ const MapKey_T lMapKey = iKey.toString();
+
+ typename SecondChildrenMap_T::iterator itContentChild =
+ lChildrenMap.find (lMapKey);
+
+ if (itContentChild != lChildrenMap.end()) {
+ oContentChild_ptr = itContentChild->second;
+ assert (oContentChild_ptr != NULL);
+ }
+
+ return oContentChild_ptr;
+ }
+
+ /** Retrieve, if existing, the booking class corresponding to the
+ given key.
+ <br>If not exissting, return the NULL pointer. */
+ BookingClass_T* getBookingClass (const BookingClassKey_T& iKey) const {
+ BookingClass_T* oBookingClass_ptr = NULL;
+
+ BookingClassMap_T lBookingClassMap (getBookingClassHolder());
+ const MapKey_T lMapKey = iKey.toString();
+
+ typename BookingClassMap_T::iterator itBookingClass =
+ lBookingClassMap.find (lMapKey);
+
+ if (itBookingClass != lBookingClassMap.end()) {
+ oBookingClass_ptr = itBookingClass->second;
+ assert (oBookingClass_ptr != NULL);
+ }
+
+ return oBookingClass_ptr;
+ }
+
private:
// /////////// Setters /////////////
/** Set the (parent) FlightDate object. */
Modified: trunk/stdair/stdair/bom/InventoryStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-11-12 18:11:55 UTC (rev 63)
+++ trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-11-13 08:52:41 UTC (rev 64)
@@ -60,8 +60,14 @@
/** Define the children bom holder type. */
typedef BomChildrenHolderImp<ContentChild_T> ChildrenBomHolder_T;
- /** Define the children booking class holder type. */
- typedef BomChildrenHolderImp<typename BOM_CONTENT::BookingClassContent_T> BookingClassHolder_T;
+ /** Define the children booking class type. */
+ typedef typename BOM_CONTENT::BookingClassContent_T BookingClass_T;
+
+ /** Define the children booking class holder type. */
+ typedef BomChildrenHolderImp<BookingClass_T> BookingClassHolder_T;
+
+ /** Define the map of ContentChild_T. */
+ typedef BomMap_T<BookingClass_T> BookingClassMap_T;
public:
// /////////// Getters /////////////
@@ -93,6 +99,12 @@
ioChildrenList = _childrenList;
}
+ /** Get the holder of booking classes. */
+ BookingClassHolder_T& getBookingClassHolder() const {
+ assert (_bookingClassHolder);
+ return *_bookingClassHolder;
+ }
+
/** Retrieve, if existing, the flight-date corresponding to the
given key.
<br>If not exissting, return the NULL pointer. */
Modified: trunk/stdair/stdair/bom/LegCabin.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabin.hpp 2009-11-12 18:11:55 UTC (rev 63)
+++ trunk/stdair/stdair/bom/LegCabin.hpp 2009-11-13 08:52:41 UTC (rev 64)
@@ -13,6 +13,7 @@
namespace stdair {
// Forward declarations
class FacBomContent;
+ class SegmentCabin;
struct LegCabinKey_T;
/** Class representing the actual functional/business content for a
@@ -31,6 +32,9 @@
/** Definition allowing to retrieve the associated BOM key type. */
typedef LegCabinKey_T BomKey_T;
+
+ /** Definition allowing to retrieve the specific SegmentCabin type. */
+ typedef SegmentCabin SegmentCabinContent_T;
public:
// // ////// Getters from the parent class ///////
Modified: trunk/stdair/stdair/bom/LegCabinStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabinStructure.hpp 2009-11-12 18:11:55 UTC (rev 63)
+++ trunk/stdair/stdair/bom/LegCabinStructure.hpp 2009-11-13 08:52:41 UTC (rev 64)
@@ -40,6 +40,9 @@
/** Definition allowing to retrieve the default children bom holder type. */
typedef BomChildrenHolderImp<BomContentDummy> DefaultChildrenBomHolder_T;
+ /** Define the associated segment-cabin holder type. */
+ typedef BomChildrenHolderImp<typename BOM_CONTENT::SegmentCabinContent_T> SegmentCabinHolder_T;
+
public:
// /////////// Getters /////////////
/** Get the (parent) LegDateStructure object. */
@@ -66,6 +69,11 @@
/** Default children list setter. */
void setChildrenList (DefaultChildrenBomHolder_T&) { }
+ /** Set the segment-cabin holder. */
+ void setSegmentCabinHolder (SegmentCabinHolder_T& ioSegmentCabinHolder) {
+ _segmentCabinHolder = &ioSegmentCabinHolder;
+ }
+
public:
// /////////// Display support methods /////////
/** Dump a Business Object into an output stream.
@@ -93,7 +101,8 @@
/** Constructors are private so as to force the usage of the Factory
layer. */
/** Default constructors. */
- LegCabinStructure () : _parent (NULL), _content (NULL) { }
+ LegCabinStructure () : _parent (NULL), _content (NULL),
+ _segmentCabinHolder (NULL) { }
LegCabinStructure (const LegCabinStructure&);
/** Destructor. */
@@ -106,6 +115,9 @@
/** The actual functional (Business Object) content. */
BOM_CONTENT* _content;
+
+ /** Holder of the associated segment-cabins. */
+ SegmentCabinHolder_T* _segmentCabinHolder;
};
}
Modified: trunk/stdair/stdair/bom/LegDate.cpp
===================================================================
--- trunk/stdair/stdair/bom/LegDate.cpp 2009-11-12 18:11:55 UTC (rev 63)
+++ trunk/stdair/stdair/bom/LegDate.cpp 2009-11-13 08:52:41 UTC (rev 64)
@@ -21,16 +21,16 @@
LegDate::~LegDate () {
}
- // //////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
void LegDate::toStream (std::ostream& ioOut) const {
ioOut << toString() << std::endl;
}
- // //////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
void LegDate::fromStream (std::istream& ioIn) {
}
- // //////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
std::string LegDate::toString() const {
std::ostringstream oStr;
@@ -43,25 +43,30 @@
return oStr.str();
}
- // //////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
const std::string LegDate::describeKey() const {
return _legDateStructure.describeKey();
}
- // //////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
const std::string LegDate::describeShortKey() const {
return _legDateStructure.describeShortKey();
}
- // //////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
LegCabinList_T LegDate::getLegCabinList () const {
return _legDateStructure.getChildrenList();
}
- // //////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
LegCabinMap_T LegDate::getLegCabinMap () const {
return _legDateStructure.getChildrenList();
}
+
+ // ////////////////////////////////////////////////////////////////////
+ LegCabin* LegDate::getLegCabin (const LegCabinKey_T& iKey) const {
+ return _legDateStructure.getContentChild (iKey);
+ }
}
Modified: trunk/stdair/stdair/bom/LegDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegDate.hpp 2009-11-12 18:11:55 UTC (rev 63)
+++ trunk/stdair/stdair/bom/LegDate.hpp 2009-11-13 08:52:41 UTC (rev 64)
@@ -15,6 +15,7 @@
// Forward declarations
class FacBomContent;
struct LegDateKey_T;
+ struct LegCabinKey_T;
/** Class representing the actual functional/business content for a
leg-date. */
@@ -36,25 +37,28 @@
/** Definition allowing to retrieve the associated
BOM content child type. */
typedef LegCabin ContentChild_T;
+
+ /** Definition allowing to retrieve the specific SegmentDate type. */
+ typedef SegmentDate SegmentDateContent_T;
public:
// /////////// Getters ////////////
-// /** Get the airline code (from the parent class). */
-// const AirlineCode_T& getAirlineCode() const;
-
-// /** Get the flight number (from the parent class). */
-// const FlightNumber_T& getFlightNumber() const;
-
-// /** Get the flight-date (from the parent class). */
-// const Date_T& getFlightDateDate() const;
-
-// /** Retrieve, if existing, the LegCabin corresponding to the
-// given cabin code (LegCabin key).
-// <br>If not existing, return the NULL pointer. */
-// LegCabin* getLegCabin (const CabinCode_T& iCabinCode) const;
+ // /** Get the airline code (from the parent class). */
+ // const AirlineCode_T& getAirlineCode() const;
- // // ///////// Counting methods //////////
-// /** Update the counters of booked seats. */
+ // /** Get the flight number (from the parent class). */
+ // const FlightNumber_T& getFlightNumber() const;
+
+ // /** Get the flight-date (from the parent class). */
+ // const Date_T& getFlightDateDate() const;
+
+ /** Retrieve, if existing, the LegCabin corresponding to the
+ given LegCabin key.
+ <br>If not existing, return the NULL pointer. */
+ LegCabin* getLegCabin (const LegCabinKey_T&) const;
+
+ // // ///////// Counting methods //////////
+ // /** Update the counters of booked seats. */
// void updateBookingsAndSeatCounters();
// /** Update the values of commited spaces. */
Modified: trunk/stdair/stdair/bom/LegDateStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegDateStructure.hpp 2009-11-12 18:11:55 UTC (rev 63)
+++ trunk/stdair/stdair/bom/LegDateStructure.hpp 2009-11-13 08:52:41 UTC (rev 64)
@@ -10,8 +10,12 @@
#include <stdair/bom/BomStructureDummy.hpp>
#include <stdair/bom/BomContentDummy.hpp>
#include <stdair/bom/LegCabinStructure.hpp>
+#include <stdair/bom/LegCabinKey.hpp>
namespace stdair {
+ // Forward declarations.
+ template <typename BOM> struct BomMap_T;
+
/** Wrapper class aimed at holding the actual content, modeled
by an external specific LegDate class (for instance,
in the AIRSCHED library). */
@@ -36,6 +40,12 @@
/** Definition allowing to retrieve the children type of the
BOM_CONTENT. */
typedef typename BOM_CONTENT::ContentChild_T ContentChild_T;
+
+ /** Definition allowing to retrieve the child key type. */
+ typedef LegCabinKey_T ChildKey_T;
+
+ /** Define the map of ContentChild_T. */
+ typedef BomMap_T<ContentChild_T> ChildrenMap_T;
/** Definition allowing to retrieve the associated children type. */
typedef boost::mpl::vector <LegCabinStructure<ContentChild_T>,
@@ -47,6 +57,9 @@
/** Definition allowing to retrive the children bom holder type. */
typedef BomChildrenHolderImp<ContentChild_T> ChildrenBomHolder_T;
+ /** Define the associated segment-date holder type.*/
+ typedef BomChildrenHolderImp<typename BOM_CONTENT::SegmentDateContent_T> SegmentDateHolder_T;
+
public:
// /////////// Getters /////////////
/** Get the (parent) FlightDateStructure object. */
@@ -72,6 +85,26 @@
void getChildrenList (ChildrenBomHolder_T*& ioChildrenList) {
ioChildrenList = _childrenList;
}
+
+ /** Retrieve, if existing, the leg-cabin corresponding to the
+ given key.
+ <br>If not exissting, return the NULL pointer. */
+ ContentChild_T* getContentChild (const ChildKey_T& iKey) const {
+ ContentChild_T* oContentChild_ptr = NULL;
+
+ ChildrenMap_T lChildrenMap (getChildrenList());
+ const MapKey_T lMapKey = iKey.toString();
+
+ typename ChildrenMap_T::iterator itContentChild =
+ lChildrenMap.find (lMapKey);
+
+ if (itContentChild != lChildrenMap.end()) {
+ oContentChild_ptr = itContentChild->second;
+ assert (oContentChild_ptr != NULL);
+ }
+
+ return oContentChild_ptr;
+ }
private:
// /////////// Setters /////////////
@@ -87,6 +120,11 @@
void setChildrenList (ChildrenBomHolder_T& ioChildrenList) {
_childrenList = &ioChildrenList;
}
+
+ /** Set the segment-date holder. */
+ void setSegmentDateHolder (SegmentDateHolder_T& ioSegmentDateHolder) {
+ _segmentDateHolder = &ioSegmentDateHolder;
+ }
public:
// /////////// Display support methods /////////
@@ -116,7 +154,7 @@
layer. */
/** Default constructors. */
LegDateStructure () : _parent (NULL), _content (NULL),
- _childrenList (NULL) { }
+ _childrenList (NULL), _segmentDateHolder (NULL) { }
LegDateStructure (const LegDateStructure&);
/** Destructor. */
@@ -132,6 +170,9 @@
/** List of leg-cabins. */
ChildrenBomHolder_T* _childrenList;
+
+ /** Holder of associated segment-dates. */
+ SegmentDateHolder_T* _segmentDateHolder;
};
}
Modified: trunk/stdair/stdair/bom/SegmentCabin.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-11-12 18:11:55 UTC (rev 63)
+++ trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-11-13 08:52:41 UTC (rev 64)
@@ -14,6 +14,7 @@
namespace stdair {
// Forward declarations
class FacBomContent;
+ class LegCabin;
struct SegmentCabinKey_T;
/** Class representing the actual functional/business content for a
@@ -36,6 +37,9 @@
/** Definition allowing to retrieve the associated
BOM content child type. */
typedef BookingClass ContentChild_T;
+
+ /** Definition allowing to retrieve the specific LegCabin type. */
+ typedef LegCabin LegCabinContent_T;
public:
// /////////// Getters /////////////
Modified: trunk/stdair/stdair/bom/SegmentCabinStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabinStructure.hpp 2009-11-12 18:11:55 UTC (rev 63)
+++ trunk/stdair/stdair/bom/SegmentCabinStructure.hpp 2009-11-13 08:52:41 UTC (rev 64)
@@ -47,6 +47,9 @@
/** Definition allowing to retrive the children bom holder type. */
typedef BomChildrenHolderImp<ContentChild_T> ChildrenBomHolder_T;
+ /** Define the associated leg-cabin holder type. */
+ typedef BomChildrenHolderImp<typename BOM_CONTENT::LegCabinContent_T> LegCabinHolder_T;
+
public:
// /////////// Getters /////////////
/** Get the (parent) SegmentDateStructure object. */
@@ -55,7 +58,10 @@
}
/** Get the (parent) SegmentDateStructure object. */
- ParentBomStructure_T& getSegmentDateStructure() const;
+ ParentBomStructure_T& getSegmentDateStructure() const {
+ assert (_parent != NULL);
+ return *_parent;
+ }
/** Get the segment-date key. */
const BomKey_T& getKey() const {
@@ -87,6 +93,11 @@
void setChildrenList (ChildrenBomHolder_T& ioChildrenList) {
_childrenList = &ioChildrenList;
}
+
+ /** Set the leg-cabin holder. */
+ void setLegCabinHolder (LegCabinHolder_T& ioLegCabinHolder) {
+ _legCabinHolder = &ioLegCabinHolder;
+ }
public:
// /////////// Display support methods /////////
@@ -116,7 +127,7 @@
layer. */
/** Default constructors. */
SegmentCabinStructure () : _parent (NULL), _content (NULL),
- _childrenList (NULL) { }
+ _childrenList (NULL), _legCabinHolder (NULL) { }
SegmentCabinStructure (const SegmentCabinStructure&);
/** Destructor. */
@@ -132,6 +143,9 @@
/** List of segment-cabins. */
ChildrenBomHolder_T* _childrenList;
+
+ /** Holder of associated leg-cabins. */
+ LegCabinHolder_T* _legCabinHolder;
};
}
Modified: trunk/stdair/stdair/bom/SegmentDate.cpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDate.cpp 2009-11-12 18:11:55 UTC (rev 63)
+++ trunk/stdair/stdair/bom/SegmentDate.cpp 2009-11-13 08:52:41 UTC (rev 64)
@@ -7,6 +7,7 @@
#include <stdair/bom/SegmentDateStructure.hpp>
#include <stdair/bom/SegmentDate.hpp>
#include <stdair/bom/SegmentCabin.hpp>
+#include <stdair/bom/LegDate.hpp>
#include <stdair/bom/BomList.hpp>
#include <stdair/bom/BomMap.hpp>
@@ -63,6 +64,11 @@
SegmentCabinMap_T SegmentDate::getSegmentCabinMap () const {
return _segmentDateStructure.getChildrenList();
}
+
+ // //////////////////////////////////////////////////////////////////////
+ LegDateList_T SegmentDate::getLegDateList () const {
+ return _segmentDateStructure.getLegDateHolder();
+ }
// ///////// ///////////////////////////////////////////////////////////////
// bool SegmentDate::
Modified: trunk/stdair/stdair/bom/SegmentDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDate.hpp 2009-11-12 18:11:55 UTC (rev 63)
+++ trunk/stdair/stdair/bom/SegmentDate.hpp 2009-11-13 08:52:41 UTC (rev 64)
@@ -8,6 +8,7 @@
#include <stdair/bom/FlightDate.hpp>
#include <stdair/bom/SegmentDateStructure.hpp>
#include <stdair/bom/SegmentDateTypes.hpp>
+#include <stdair/bom/LegDateTypes.hpp>
#include <stdair/bom/SegmentCabinTypes.hpp>
#include <stdair/bom/SegmentDateContent.hpp>
@@ -36,6 +37,9 @@
/** Definition allowing to retrieve the associated
BOM content child type. */
typedef SegmentCabin ContentChild_T;
+
+ /** Definition allowing to retrieve the specific LegDate type. */
+ typedef LegDate LegDateContent_T;
public:
// /////////// Getters /////////////
@@ -45,6 +49,9 @@
/** Get a SegmentCabinMap_T for iteration methods. */
SegmentCabinMap_T getSegmentCabinMap () const;
+ /** Get a LegDateList_T for iteration methods. */
+ LegDateList_T getLegDateList () const;
+
// /** Get the airline code (from the parent class). */
// const AirlineCode_T& getAirlineCode() const;
Modified: trunk/stdair/stdair/bom/SegmentDateStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDateStructure.hpp 2009-11-12 18:11:55 UTC (rev 63)
+++ trunk/stdair/stdair/bom/SegmentDateStructure.hpp 2009-11-13 08:52:41 UTC (rev 64)
@@ -47,6 +47,9 @@
/** Definition allowing to retrive the children bom holder type. */
typedef BomChildrenHolderImp<ContentChild_T> ChildrenBomHolder_T;
+ /** Define the associated leg-date holder type. */
+ typedef BomChildrenHolderImp<typename BOM_CONTENT::LegDateContent_T> LegDateHolder_T;
+
public:
// /////////// Getters /////////////
/** Get the (parent) FlightDateStructure object. */
@@ -55,7 +58,10 @@
}
/** Get the (parent) FlightDateStructure object. */
- ParentBomStructure_T& getFlightDateStructure() const;
+ ParentBomStructure_T& getFlightDateStructure() const {
+ assert (_parent != NULL);
+ return *_parent;
+ }
/** Get the segment-date key. */
const BomKey_T& getKey() const {
@@ -65,9 +71,16 @@
/** Get the list of segment-cabins. */
const ChildrenBomHolder_T& getChildrenList() const {
+ assert (_childrenList != NULL);
return *_childrenList;
}
+ /** Get the list of leg-dates. */
+ const LegDateHolder_T& getLegDateHolder() const {
+ assert (_legDateHolder != NULL);
+ return *_legDateHolder;
+ }
+
/** Get the list of segment-cabins. */
void getChildrenList (ChildrenBomHolder_T*& ioChildrenList) {
ioChildrenList = _childrenList;
@@ -87,6 +100,11 @@
void setChildrenList (ChildrenBomHolder_T& ioChildrenList) {
_childrenList = &ioChildrenList;
}
+
+ /** Set the leg-date holder.*/
+ void setLegDateHolder (LegDateHolder_T& ioLegDateHolder) {
+ _legDateHolder = &ioLegDateHolder;
+ }
public:
// /////////// Display support methods /////////
@@ -116,7 +134,7 @@
layer. */
/** Default constructors. */
SegmentDateStructure () : _parent (NULL), _content (NULL),
- _childrenList (NULL) { }
+ _childrenList (NULL), _legDateHolder (NULL) { }
SegmentDateStructure (const SegmentDateStructure&);
/** Destructor. */
@@ -132,6 +150,9 @@
/** List of segment-cabins. */
ChildrenBomHolder_T* _childrenList;
+
+ /** Holder of associated leg-dates. */
+ LegDateHolder_T* _legDateHolder;
};
}
Modified: trunk/stdair/stdair/factory/FacBomContent.hpp
===================================================================
--- trunk/stdair/stdair/factory/FacBomContent.hpp 2009-11-12 18:11:55 UTC (rev 63)
+++ trunk/stdair/stdair/factory/FacBomContent.hpp 2009-11-13 08:52:41 UTC (rev 64)
@@ -10,6 +10,7 @@
#include <boost/mpl/vector.hpp>
// STDAIR
#include <stdair/STDAIR_Types.hpp>
+#include <stdair/basic/BasConst_Inventory.hpp>
#include <stdair/bom/BomStructure.hpp>
#include <stdair/factory/FacBomStructure.hpp>
@@ -137,7 +138,7 @@
private:
/** Create a holder of all booking classes within the given inventory. */
template <typename INVENTORY>
- static void createDirectAccessesWithinInventory (INVENTORY& ioInventory){
+ static void createDirectAccessesWithinInventory(const INVENTORY& iInventory){
// Retrieve the flight-date type.
typedef typename INVENTORY::ContentChild_T FLIGHT_DATE_T;
// Define the list of flight-dates.
@@ -150,12 +151,12 @@
// Initialize the booking class holder within the inventory.
BOOKING_CLASS_HOLDER_T& lBookingClassHolder =
FacBomStructure::instance().createBomHolder<BOOKING_CLASS_T> ();
- ioInventory._inventoryStructure.setBookingClassHolder(lBookingClassHolder);
+ iInventory._inventoryStructure.setBookingClassHolder(lBookingClassHolder);
// Browse the inventory and build direct accesses within each
// flight-date, then build the booking class holder within the
// inventory.
- const FLIGHT_DATE_LIST_T lFlightDateList = ioInventory.getFlightDateList();
+ const FLIGHT_DATE_LIST_T lFlightDateList = iInventory.getFlightDateList();
for (typename FLIGHT_DATE_LIST_T::iterator itFlightDate =
lFlightDateList.begin(); itFlightDate != lFlightDateList.end();
++itFlightDate) {
@@ -167,27 +168,251 @@
/** Create the direct acceeses within the given flight-date, and, at the
same time, build the class holder for the parent inventory. */
template <typename FLIGHT_DATE>
- static void createDirectAccessesWithinFlightDate (const FLIGHT_DATE& ioFlightDate) {
+ static void createDirectAccessesWithinFlightDate (const FLIGHT_DATE& iFlightDate) {
// Retrieve the booking class type.
typedef typename FLIGHT_DATE::BookingClassContent_T BOOKING_CLASS_T;
// Define the bom holder of booking classes.
typedef BomChildrenHolderImp<BOOKING_CLASS_T> BOOKING_CLASS_HOLDER_T;
-
- typename FLIGHT_DATE::BomStructure_T::ParentBomStructure_T& lInvStructure =
- ioFlightDate._flightDateStructure.getInventoryStructure();
-
- BOOKING_CLASS_HOLDER_T* lInvBookingClassHolder_ptr =
- lInvStructure._bookingClassHolder;
- assert (lInvBookingClassHolder_ptr != NULL);
-
+
+ // Initialize the booking class holder within the flight-date.
+ BOOKING_CLASS_HOLDER_T& lBookingClassHolder =
+ FacBomStructure::instance().createBomHolder<BOOKING_CLASS_T> ();
+ iFlightDate._flightDateStructure.setBookingClassHolder(lBookingClassHolder);
+ // Retrieve the leg-date type.
+ typedef typename FLIGHT_DATE::SecondContentChild_T LEG_DATE_T;
+ // Define the holder of leg-dates.
+ typedef BomChildrenHolderImp<LEG_DATE_T> LEG_DATE_HOLDER_T;
+ // Retrieve the leg-date key type.
+ typedef typename LEG_DATE_T::BomKey_T LEG_DATE_KEY_T;
// Retrieve the segment-date type.
typedef typename FLIGHT_DATE::ContentChild_T SEGMENT_DATE_T;
// Define the list of segment-dates.
typedef BomList_T<SEGMENT_DATE_T> SEGMENT_DATE_LIST_T;
+ SEGMENT_DATE_LIST_T lSegmentDateList = iFlightDate.getSegmentDateList();
+ for (typename SEGMENT_DATE_LIST_T::iterator itSegmentDate =
+ lSegmentDateList.begin();
+ itSegmentDate != lSegmentDateList.end(); ++itSegmentDate) {
+ SEGMENT_DATE_T& lCurrentSegmentDate = *itSegmentDate;
-
+ // Initialize the leg-date holder within the segment-date.
+ LEG_DATE_HOLDER_T& lLegDateHolder =
+ FacBomStructure::instance().createBomHolder<LEG_DATE_T> ();
+ lCurrentSegmentDate._segmentDateStructure.setLegDateHolder(lLegDateHolder);
+
+ const AirportCode_T& lBoardPoint =
+ lCurrentSegmentDate.getBoardPoint();
+ AirportCode_T currentBoardPoint = lBoardPoint;
+ const AirportCode_T& lOffPoint = lCurrentSegmentDate.getOffPoint();
+ AirportCode_T currentOffPoint = lBoardPoint;
+
+ // Add a sanity check so as to ensure that the loop stops. If
+ // there are more than MAXIMUM_NUMBER_OF_LEGS legs, there is
+ // an issue somewhere in the code (not in the parser, as the
+ // segments are derived from the legs thanks to the
+ // FlightPeriodStruct::buildSegments() method).
+ unsigned short i = 1;
+ while (currentOffPoint != lOffPoint
+ && i <= MAXIMUM_NUMBER_OF_LEGS_IN_FLIGHT) {
+ // Retrieve the (unique) LegDate getting that Board Point
+ const LEG_DATE_KEY_T lLegDateKey (currentOffPoint);
+ LEG_DATE_T* lLegDate_ptr = iFlightDate.getLegDate (lLegDateKey);
+ assert (lLegDate_ptr != NULL);
+
+ // Link the SegmentDate and LegDate together
+ initLinkSegmentDateWithLegDate<SEGMENT_DATE_T> (lCurrentSegmentDate, *lLegDate_ptr);
+
+ // Prepare the next iteration
+ currentBoardPoint = lLegDate_ptr->getOffPoint();
+ currentOffPoint = lLegDate_ptr->getOffPoint();
+ ++i;
+ }
+ assert (i <= MAXIMUM_NUMBER_OF_LEGS_IN_FLIGHT);
+
+ // Create the routing for the leg- and segment-cabins.
+ // At the same time, set the SegmentDate attributes derived from
+ // its routing legs (e.g., board and off dates).
+ createDirectAccessesWithinSegmentDate (lCurrentSegmentDate);
+ }
}
+
+ /** Create the direct acceeses within the given segment-date, and, at the
+ same time, build the class holder for the corresponding flight-date
+ and inventory. */
+ template <typename SEGMENT_DATE>
+ static void createDirectAccessesWithinSegmentDate (const SEGMENT_DATE& iSegmentDate) {
+ // Retrieve the segment-cabin type.
+ typedef typename SEGMENT_DATE::ContentChild_T SEGMENT_CABIN_T;
+ // Define the list of sement-cabin.
+ typedef BomList_T<SEGMENT_CABIN_T> SEGMENT_CABIN_LIST_T;
+ // Retrieve the leg-date type.
+ typedef typename SEGMENT_DATE::LegDateContent_T LEG_DATE_T;
+ // Define the list of leg-date.
+ typedef BomList_T<LEG_DATE_T> LEG_DATE_LIST_T;
+ // Retrieve the leg-cabin type.
+ typedef typename LEG_DATE_T::ContentChild_T LEG_CABIN_T;
+ // Define the leg-cabin holder.
+ typedef BomChildrenHolderImp<LEG_CABIN_T> LEG_CABIN_HOLDER_T;
+ // Retrieve the type of leg-cabin key.
+ typedef typename LEG_CABIN_T::BomKey_T LEG_CABIN_KEY_T;
+
+ // Browse the segment-cabin list.
+ const SEGMENT_CABIN_LIST_T lSegmentCabinList =
+ iSegmentDate.getSegmentCabinList();
+ for (typename SEGMENT_CABIN_LIST_T::iterator itSegmentCabin =
+ lSegmentCabinList.begin();
+ itSegmentCabin != lSegmentCabinList.end(); ++itSegmentCabin) {
+ SEGMENT_CABIN_T& lSegmentCabin = *itSegmentCabin;
+
+ // Initialize the leg-cabin holder for the current segment-cabin.
+ LEG_CABIN_HOLDER_T& lLegCabinHolder = FacBomStructure::
+ instance().createBomHolder<LEG_CABIN_T> ();
+ lSegmentCabin._segmentCabinStructure.setLegCabinHolder (lLegCabinHolder);
+
+ // Iterate on the routing legs
+ const LEG_DATE_LIST_T& lLegDateList = iSegmentDate.getLegDateList();
+ for (typename LEG_DATE_LIST_T::iterator itLegDate =
+ lLegDateList.begin();
+ itLegDate != lLegDateList.end(); ++itLegDate) {
+ const LEG_DATE_T& lLegDate = *itLegDate;
+
+ // Retrieve the LegCabin getting the same class of service
+ // (cabin code) as the SegmentCabin.
+ const CabinCode_T& lCabinCode = lSegmentCabin.getCabinCode();
+ const LEG_CABIN_KEY_T lLegCabinKey (lCabinCode);
+
+ LEG_CABIN_T* lLegCabin_ptr = lLegDate.getLegCabin (lLegCabinKey);
+
+ // In fact, the following assertion corresponds to the assumption
+ // that the cabins are the same on the segments AND on their routing
+ // legs. For some actual airline, that is not always true. If needed,
+ // we may implement the cabin mapping feature.
+ /*
+ if (lLegCabin_ptr == NULL) {
+ STDAIR_LOG_ERROR ("The cabin of the Segment: "
+ << lSegmentCabin._key.describe()
+ << " can not be found on the routing Legs."
+ << " The mapping of Segment-Cabins onto "
+ << "distinct Leg-Cabins is a feature not "
+ << "supported by LATUS.");
+ }
+ */
+ assert (lLegCabin_ptr != NULL);
+
+ // Link the SegmentCabin and LegCabin together
+ initLinkSegmentCabinWithLegCabin<SEGMENT_CABIN_T> (lSegmentCabin, *lLegCabin_ptr);
+
+ // Build the class holders for the corresponding flight-date and
+ // inventory.
+ buildBookingClassHolders (lSegmentCabin);
+ }
+ }
+ }
+
+ /** Build the booking class holders of the corresponding inventory
+ and flight-date of the given segment-cabin. */
+ template <typename SEGMENT_CABIN>
+ static void buildBookingClassHolders (const SEGMENT_CABIN& iSegmentCabin) {
+ // Retrieve the flight-date structure type.
+ typedef typename SEGMENT_CABIN::Parent_T::Parent_T::BomStructure_T FLIGHT_DATE_STRUCTURE_T;
+ // Retrieve the booking class type.
+ typedef typename SEGMENT_CABIN::ContentChild_T BOOKING_CLASS_T;
+
+ FLIGHT_DATE_STRUCTURE_T& lFDStructure =
+ iSegmentCabin._segmentCabinStructure.getSegmentDateStructure().
+ getFlightDateStructure();
+
+ // Define the holder of booking classes.
+ typedef BomChildrenHolderImp<BOOKING_CLASS_T> BOOKING_CLASS_HOLDER_T;
+
+ // Retrieve the booking class holders of the flight-date and the
+ // inventory.
+ BOOKING_CLASS_HOLDER_T& lFDBookingClassHolder =
+ lFDStructure.getBookingClassHolder();
+ BOOKING_CLASS_HOLDER_T& lInvBookingClassHolder =
+ lFDStructure.getInventoryStructure().getBookingClassHolder();
+
+ // Define the list of booking classes.
+ typedef BomList_T<BOOKING_CLASS_T> BOOKING_CLASS_LIST_T;
+ BOOKING_CLASS_LIST_T lBookingClassList=iSegmentCabin.getBookingClassList();
+ for (typename BOOKING_CLASS_LIST_T::iterator itBookingClass =
+ lBookingClassList.begin();
+ itBookingClass != lBookingClassList.end(); ++itBookingClass) {
+ BOOKING_CLASS_T& lBookingClass = *itBookingClass;
+
+ // bool addingSucceeded = FacBomStructure::
+// addFullBomObjecdToBomHolder<BOOKING_CLASS_T> (lFDBookingClassHolder,
+// lBookingClass);
+// assert (addingSucceeded == true);
+// addingSucceeded = FacBomStructure::
+// addFullBomObjecdToBomHolder<BOOKING_CLASS_T> (lInvBookingClassHolder,
+// lBookingClass);
+// assert (addingSucceeded == true);
+ }
+ }
+ /** Build the link between the given segment-date and the given leg-date. */
+ template <typename SEGMENT_DATE>
+ static void initLinkSegmentDateWithLegDate (SEGMENT_DATE& ioSegmentDate,
+ typename SEGMENT_DATE::LegDateContent_T& ioLegDate) {
+ // Retrieve the leg-date type.
+ typedef typename SEGMENT_DATE::LegDateContent_T LEG_DATE_T;
+ // Define the segment-date holder type.
+ typedef BomChildrenHolderImp<SEGMENT_DATE> SEGMENT_DATE_HOLDER_T;
+ // Define the leg-date holder type.
+ typedef BomChildrenHolderImp<LEG_DATE_T> LEG_DATE_HOLDER_T;
+
+ LEG_DATE_HOLDER_T* lLegDateHolder_ptr =
+ ioSegmentDate._segmentDateStructure._legDateHolder;
+ assert (lLegDateHolder_ptr != NULL);
+
+ // bool addingSucceeded = FacBomStructure::
+// addBomObjecdToBomHolder<LEG_DATE_T> (*lLegDateHolder_ptr, ioLegDate);
+// assert (addingSucceeded == true);
+
+ SEGMENT_DATE_HOLDER_T* lSegmentDateHolder_ptr =
+ ioLegDate._legDateStructure._segmentDateHolder;
+ if (lSegmentDateHolder_ptr == NULL) {
+ lSegmentDateHolder_ptr = &FacBomStructure::
+ instance().createBomHolder<SEGMENT_DATE> ();
+ }
+ // addingSucceeded = FacBomStructure::
+// addBomObjecdToBomHolder<SEGMENT_DATE> (*lSegmentDateHolder_ptr,
+// ioSegmentDate);
+// assert (addingSucceeded == true);
+ }
+
+ /** Build the link between the given segment-cabin and the given
+ leg-cabin. */
+ template <typename SEGMENT_CABIN>
+ static void initLinkSegmentCabinWithLegCabin (SEGMENT_CABIN& ioSegmentCabin,
+ typename SEGMENT_CABIN::LegCabinContent_T& ioLegCabin) {
+ // Retrieve the leg-cabin type.
+ typedef typename SEGMENT_CABIN::LegCabinContent_T LEG_CABIN_T;
+ // Define the segment-cabin holder type.
+ typedef BomChildrenHolderImp<SEGMENT_CABIN> SEGMENT_CABIN_HOLDER_T;
+ // Define the leg-cabin holder type.
+ typedef BomChildrenHolderImp<LEG_CABIN_T> LEG_CABIN_HOLDER_T;
+
+ LEG_CABIN_HOLDER_T* lLegCabinHolder_ptr =
+ ioSegmentCabin._segmentCabinStructure._legCabinHolder;
+ assert (lLegCabinHolder_ptr != NULL);
+
+ // bool addingSucceeded = FacBomStructure::
+// addBomObjecdToBomHolder<LEG_CABIN_T>(*lLegCabinHolder_ptr, ioLegCabin);
+// assert (addingSucceeded == true);
+
+ SEGMENT_CABIN_HOLDER_T* lSegmentCabinHolder_ptr =
+ ioLegCabin._legCabinStructure._segmentCabinHolder;
+ if (lSegmentCabinHolder_ptr == NULL) {
+ lSegmentCabinHolder_ptr = &FacBomStructure::
+ instance().createBomHolder<SEGMENT_CABIN> ();
+ }
+ // addingSucceeded = FacBomStructure::
+// addBomObjecdToBomHolder<SEGMENT_CABIN> (*lSegmentCabinHolder_ptr,
+// ioSegmentCabin);
+// assert (addingSucceeded == true);
+ }
+
public:
/** Provide the unique instance.
<br>The singleton is instantiated when first used.
Modified: trunk/stdair/stdair/factory/FacBomStructure.hpp
===================================================================
--- trunk/stdair/stdair/factory/FacBomStructure.hpp 2009-11-12 18:11:55 UTC (rev 63)
+++ trunk/stdair/stdair/factory/FacBomStructure.hpp 2009-11-13 08:52:41 UTC (rev 64)
@@ -127,7 +127,7 @@
/** Add a BOM object into a dedicated BOM holder by using the
full key of the object. */
template <typename BOM_CONTENT>
- static bool addFullBomObjecdToBomHolder (BomChildrenHolderImp<BOM_CONTENT> ioBomHolder, typename BOM_CONTENT::BomStructure_T& ioBomStructure) {
+ static bool addFullBomObjecdToBomHolder (BomChildrenHolderImp<BOM_CONTENT>& ioBomHolder, typename BOM_CONTENT::BomStructure_T& ioBomStructure) {
// Retrieve the bom structure type.
typedef typename BOM_CONTENT::BomStructure_T BOM_STRUCTURE_T;
// Define the bom holder type.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <den...@us...> - 2009-11-12 18:12:03
|
Revision: 63
http://stdair.svn.sourceforge.net/stdair/?rev=63&view=rev
Author: denis_arnaud
Date: 2009-11-12 18:11:55 +0000 (Thu, 12 Nov 2009)
Log Message:
-----------
[Dev] Fixed a small bug in the getContentChild() method.
Modified Paths:
--------------
trunk/stdair/stdair/bom/AirlineFeatureSetStructure.hpp
Modified: trunk/stdair/stdair/bom/AirlineFeatureSetStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureSetStructure.hpp 2009-11-12 16:44:45 UTC (rev 62)
+++ trunk/stdair/stdair/bom/AirlineFeatureSetStructure.hpp 2009-11-12 18:11:55 UTC (rev 63)
@@ -89,10 +89,10 @@
if (itContentChild != lChildrenMap.end()) {
oContentChild_ptr = itContentChild->second;
- return oContentChild_ptr;
+ assert (oContentChild_ptr != NULL);
}
- assert (oContentChild_ptr != NULL);
+ return oContentChild_ptr;
}
private:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qua...@us...> - 2009-11-12 16:44:56
|
Revision: 62
http://stdair.svn.sourceforge.net/stdair/?rev=62&view=rev
Author: quannaus
Date: 2009-11-12 16:44:45 +0000 (Thu, 12 Nov 2009)
Log Message:
-----------
[Dev] Migrated some more functions from LATUS_COM.
Modified Paths:
--------------
trunk/stdair/stdair/bom/AirlineFeatureKey.cpp
trunk/stdair/stdair/bom/AirlineFeatureKey.hpp
trunk/stdair/stdair/bom/AirlineFeatureSet.cpp
trunk/stdair/stdair/bom/AirlineFeatureSet.hpp
trunk/stdair/stdair/bom/AirlineFeatureSetKey.cpp
trunk/stdair/stdair/bom/AirlineFeatureSetKey.hpp
trunk/stdair/stdair/bom/AirlineFeatureSetStructure.hpp
trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp
trunk/stdair/stdair/bom/BomKey.hpp
trunk/stdair/stdair/bom/BomList.hpp
trunk/stdair/stdair/bom/BomRoot.cpp
trunk/stdair/stdair/bom/BomRoot.hpp
trunk/stdair/stdair/bom/BomRootContent.hpp
trunk/stdair/stdair/bom/BomRootKey.cpp
trunk/stdair/stdair/bom/BomRootKey.hpp
trunk/stdair/stdair/bom/BookingClassKey.cpp
trunk/stdair/stdair/bom/BookingClassKey.hpp
trunk/stdair/stdair/bom/FlightDate.hpp
trunk/stdair/stdair/bom/FlightDateKey.cpp
trunk/stdair/stdair/bom/FlightDateKey.hpp
trunk/stdair/stdair/bom/FlightDateStructure.hpp
trunk/stdair/stdair/bom/Inventory.cpp
trunk/stdair/stdair/bom/Inventory.hpp
trunk/stdair/stdair/bom/InventoryKey.cpp
trunk/stdair/stdair/bom/InventoryKey.hpp
trunk/stdair/stdair/bom/InventoryStructure.hpp
trunk/stdair/stdair/bom/LegCabinKey.cpp
trunk/stdair/stdair/bom/LegCabinKey.hpp
trunk/stdair/stdair/bom/LegDateKey.cpp
trunk/stdair/stdair/bom/LegDateKey.hpp
trunk/stdair/stdair/bom/SegmentCabinKey.cpp
trunk/stdair/stdair/bom/SegmentCabinKey.hpp
trunk/stdair/stdair/bom/SegmentDateKey.cpp
trunk/stdair/stdair/bom/SegmentDateKey.hpp
trunk/stdair/stdair/factory/FacBomContent.hpp
trunk/stdair/stdair/factory/FacBomStructure.hpp
Modified: trunk/stdair/stdair/bom/AirlineFeatureKey.cpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureKey.cpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/AirlineFeatureKey.cpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -25,10 +25,15 @@
}
// ////////////////////////////////////////////////////////////////////
- std::string AirlineFeatureKey_T::toString() const {
+ const std::string AirlineFeatureKey_T::toString() const {
std::ostringstream oStr;
oStr << _airlineCode;
return oStr.str();
}
+ // ////////////////////////////////////////////////////////////////////
+ const std::string AirlineFeatureKey_T::describe() const {
+ return toString();
+ }
+
}
Modified: trunk/stdair/stdair/bom/AirlineFeatureKey.hpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureKey.hpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/AirlineFeatureKey.hpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -7,12 +7,18 @@
// STDAIR
#include <stdair/STDAIR_Types.hpp>
#include <stdair/bom/BomKey.hpp>
+#include <stdair/bom/AirlineFeatureSetKey.hpp>
namespace stdair {
/** Key of AirlineFeature. */
struct AirlineFeatureKey_T : public BomKey_T {
-
+
public:
+ // /////////// Typedefs ////////////
+ /** Definition allowing to retrieve the parent key type. */
+ typedef AirlineFeatureSetKey_T ParentKey_T;
+
+ public:
// /////////// Construction ///////////
/** Constructor. */
AirlineFeatureKey_T (const AirlineCode_T& iAirlineCode);
@@ -22,8 +28,11 @@
// /////////// Getters //////////
/** Get the airline code. */
- const AirlineCode_T& getAirlineCode() const;
+ const AirlineCode_T& getAirlineCode() const { return _airlineCode; }
+ // /////////// Setters /////////////
+ void setParentKey (const ParentKey_T& iParentKey) { }
+
// /////////// Display support methods /////////
/** Dump a Business Object Key into an output stream.
@param ostream& the output stream. */
@@ -38,8 +47,11 @@
when among children of a given parent Business Object.
<br>For instance, "H" and "K" allow to differentiate among two
marketing classes for the same segment-date. */
- std::string toString() const;
+ const std::string toString() const;
+ /** Display of the key. */
+ const std::string describe() const;
+
private:
// Attributes
/** Airline code. */
Modified: trunk/stdair/stdair/bom/AirlineFeatureSet.cpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureSet.cpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/AirlineFeatureSet.cpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -17,7 +17,7 @@
AirlineFeatureSet (const BomKey_T& iKey,
BomStructure_T& ioAirlineFeatureSetStructure)
: AirlineFeatureSetContent (iKey),
- _bomRootStructure (ioAirlineFeatureSetStructure) {
+ _bomStructure (ioAirlineFeatureSetStructure) {
}
// ////////////////////////////////////////////////////////////////////
@@ -48,29 +48,18 @@
// //////////////////////////////////////////////////////////////////////
AirlineFeatureList_T AirlineFeatureSet::getAirlineFeatureList () const {
- return _bomRootStructure.getChildrenList();
+ return _bomStructure.getChildrenList();
}
// //////////////////////////////////////////////////////////////////////
AirlineFeatureMap_T AirlineFeatureSet::getAirlineFeatureMap () const {
- return _bomRootStructure.getChildrenList();
+ return _bomStructure.getChildrenList();
}
// //////////////////////////////////////////////////////////////////////
- const AirlineFeature* AirlineFeatureSet::
- getAirlineFeature (const AirlineCode_T& iAirlineCode) const {
-
- AirlineFeatureMap_T lAirlineFeatureMap = getAirlineFeatureMap ();
- AirlineFeatureMap_T::iterator itAirlineFeature =
- lAirlineFeatureMap.find (iAirlineCode);
-
- if (itAirlineFeature != lAirlineFeatureMap.end()) {
- const AirlineFeature* oAirlineFeature_ptr = itAirlineFeature->second;
- assert (oAirlineFeature_ptr != NULL);
- return oAirlineFeature_ptr;
- }
-
- return NULL;
+ AirlineFeature* AirlineFeatureSet::
+ getAirlineFeature (const AirlineFeatureKey_T& iKey) const {
+ return _bomStructure.getContentChild (iKey);
}
}
Modified: trunk/stdair/stdair/bom/AirlineFeatureSet.hpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureSet.hpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/AirlineFeatureSet.hpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -14,6 +14,7 @@
// Forward declarations.
class FacBomContent;
class AirlineFeature;
+ struct AirlineFeatureKey_T;
struct AirlineFeatureSetKey_T;
/** Class representing the actual functional/business content
@@ -63,7 +64,7 @@
/** Retrieve, if existing, the Airline features corresponding to the
given airline code.
<br>If not existing, return the NULL pointer. */
- const AirlineFeature* getAirlineFeature (const AirlineCode_T&) const;
+ AirlineFeature* getAirlineFeature (const AirlineFeatureKey_T&) const;
/** Get a AirlineFeatureList_T for iteration methods. */
AirlineFeatureList_T getAirlineFeatureList () const;
@@ -74,7 +75,7 @@
private:
/** Retrieve the BOM structure object. */
BomStructure_T& getBomStructure () {
- return _bomRootStructure;
+ return _bomStructure;
}
protected:
@@ -90,7 +91,7 @@
private:
// Attributes
/** Reference structure. */
- BomStructure_T& _bomRootStructure;
+ BomStructure_T& _bomStructure;
};
}
Modified: trunk/stdair/stdair/bom/AirlineFeatureSetKey.cpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureSetKey.cpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/AirlineFeatureSetKey.cpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -24,10 +24,15 @@
}
// ////////////////////////////////////////////////////////////////////
- std::string AirlineFeatureSetKey_T::toString() const {
+ const std::string AirlineFeatureSetKey_T::toString() const {
std::ostringstream oStr;
oStr << " -- AIRLINE FEATURE SET -- ";
return oStr.str();
}
+ // ////////////////////////////////////////////////////////////////////
+ const std::string AirlineFeatureSetKey_T::describe() const {
+ return toString();
+ }
+
}
Modified: trunk/stdair/stdair/bom/AirlineFeatureSetKey.hpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureSetKey.hpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/AirlineFeatureSetKey.hpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -35,8 +35,11 @@
when among children of a given parent Business Object.
<br>For instance, "H" and "K" allow to differentiate among two
marketing classes for the same segment-date. */
- std::string toString() const;
+ const std::string toString() const;
+ /** Display of the key. */
+ const std::string describe() const;
+
private:
// Attributes
// No attributes, as that class corresponds to the root of Bom structure.
Modified: trunk/stdair/stdair/bom/AirlineFeatureSetStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureSetStructure.hpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/AirlineFeatureSetStructure.hpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -12,8 +12,12 @@
#include <stdair/bom/BomStructureDummy.hpp>
#include <stdair/bom/BomContentDummy.hpp>
#include <stdair/bom/AirlineFeatureStructure.hpp>
+#include <stdair/bom/AirlineFeatureKey.hpp>
namespace stdair {
+ // Forward declarations.
+ template <typename BOM> struct BomMap_T;
+
/** Wrapper class aimed at holding the actual content, modeled
by a specific AirlineFeatureSet class. */
template <typename BOM_CONTENT>
@@ -31,6 +35,13 @@
BOM_CONTENT. */
typedef typename BOM_CONTENT::ContentChild_T ContentChild_T;
+ /** Definition allowing to retrieve the key type of the
+ ContentChild_T. */
+ typedef AirlineFeatureKey_T ChildKey_T;
+
+ /** Define the map of ContentChild_T. */
+ typedef BomMap_T<ContentChild_T> ChildrenMap_T;
+
private:
// Type definitions
/** Definition allowing to retrieve the associated BOM key type. */
@@ -63,7 +74,27 @@
void getChildrenList (ChildrenBomHolder_T*& ioChildrenList) {
ioChildrenList = _childrenList;
}
-
+
+ /** Retrieve, if existing, the airline feature corresponding to the
+ given key.
+ <br>If not exissting, return the NULL pointer. */
+ ContentChild_T* getContentChild (const ChildKey_T& iKey) const {
+ ContentChild_T* oContentChild_ptr = NULL;
+
+ ChildrenMap_T lChildrenMap (getChildrenList());
+ const MapKey_T lMapKey = iKey.toString();
+
+ typename ChildrenMap_T::iterator itContentChild =
+ lChildrenMap.find (lMapKey);
+
+ if (itContentChild != lChildrenMap.end()) {
+ oContentChild_ptr = itContentChild->second;
+ return oContentChild_ptr;
+ }
+
+ assert (oContentChild_ptr != NULL);
+ }
+
private:
/////////////// Setters ////////////////
/** Default children list setter. */
Modified: trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -109,7 +109,14 @@
MapReverseIterator_T mapREnd () const {
return _bomChildrenList.rend();
}
+
+ // /////////// Other operators /////////////
+ /** Get the size of the list. */
+ const unsigned int size () const {
+ return _bomChildrenOrderedList.size();
+ }
+
/** Retrieve, if existing, the bom corresponding to the given key. */
MapIterator_T find (const MapKey_T& iKey) const {
return _bomChildrenList.find (iKey);
Modified: trunk/stdair/stdair/bom/BomKey.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomKey.hpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/BomKey.hpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -34,7 +34,12 @@
when among children of a given parent Business Object.
<br>For instance, "H" and "K" allow to differentiate among two
marketing classes for the same segment-date. */
- virtual std::string toString() const { return std::string("Hello!"); }
+ virtual const std::string toString() const { return std::string("Hello!"); }
+
+ /** Display of the key.
+ <br>That string is unique at all levels.
+ */
+ virtual const std::string describe() const { return toString(); }
};
}
Modified: trunk/stdair/stdair/bom/BomList.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomList.hpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/BomList.hpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -50,6 +50,10 @@
return the reverse iterator at the end of the list. */
reverse_iterator rend () const { return _bomHolder.listREnd(); }
+ // /////////// Other operators /////////////
+ /** Get the size of the list. */
+ const unsigned int size () const { return _bomHolder.size(); }
+
public:
/** Default constructors. */
BomList_T ();
Modified: trunk/stdair/stdair/bom/BomRoot.cpp
===================================================================
--- trunk/stdair/stdair/bom/BomRoot.cpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/BomRoot.cpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -21,13 +21,27 @@
BomRoot::~BomRoot () {
}
- // //////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
InventoryList_T BomRoot::getInventoryList () const {
return _bomRootStructure.getChildrenList();
}
- // //////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
InventoryMap_T BomRoot::getInventoryMap () const {
return _bomRootStructure.getChildrenList();
}
+
+ Inventory* BomRoot::getInventory (const AirlineCode_T& iAirlineCode) const {
+ Inventory* oInventory_ptr = NULL;
+
+ InventoryMap_T lInventoryMap = getInventoryMap ();
+ InventoryMap_T::iterator itInv = lInventoryMap.find (iAirlineCode);
+
+ if (itInv != lInventoryMap.end()) {
+ oInventory_ptr = itInv->second;
+ }
+
+ return oInventory_ptr;
+ }
+
}
Modified: trunk/stdair/stdair/bom/BomRoot.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomRoot.hpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/BomRoot.hpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -109,6 +109,11 @@
return *_airlineFeatureSet;
}
+ /** Retrieve, if existing, the Inventory corresponding to the
+ given airline code (Inventory key).
+ <br>If not existing, return the NULL pointer. */
+ Inventory* getInventory (const AirlineCode_T&) const;
+
public:
// //////////// Setters //////////////
/** Set the reference to the AirlineFeatureSet object. */
Modified: trunk/stdair/stdair/bom/BomRootContent.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomRootContent.hpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/BomRootContent.hpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -101,6 +101,13 @@
void setLoadFactor (const Revenue_T& iWSLF) {
_wScheduleLoadFactor = iWSLF;
}
+
+ public:
+ // /////////// Business methods ///////////
+ /** Update the counter of flight-dates. */
+ void updateFlightDateCounter() {
+ _flightDateCounter++;
+ }
public:
// /////////// Display support methods /////////
Modified: trunk/stdair/stdair/bom/BomRootKey.cpp
===================================================================
--- trunk/stdair/stdair/bom/BomRootKey.cpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/BomRootKey.cpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -24,10 +24,15 @@
}
// ////////////////////////////////////////////////////////////////////
- std::string BomRootKey_T::toString() const {
+ const std::string BomRootKey_T::toString() const {
std::ostringstream oStr;
oStr << " -- ROOT -- ";
return oStr.str();
}
+
+ // ////////////////////////////////////////////////////////////////////
+ const std::string BomRootKey_T::describe() const {
+ return toString();
+ }
}
Modified: trunk/stdair/stdair/bom/BomRootKey.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomRootKey.hpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/BomRootKey.hpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -33,8 +33,11 @@
when among children of a given parent Business Object.
<br>For instance, "H" and "K" allow to differentiate among two
marketing classes for the same segment-date. */
- std::string toString() const;
+ const std::string toString() const;
+ /** Display of the key. */
+ const std::string describe() const;
+
private:
// Attributes
};
Modified: trunk/stdair/stdair/bom/BookingClassKey.cpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClassKey.cpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/BookingClassKey.cpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -25,10 +25,17 @@
}
// ////////////////////////////////////////////////////////////////////
- std::string BookingClassKey_T::toString() const {
+ const std::string BookingClassKey_T::toString() const {
std::ostringstream oStr;
oStr << _classCode;
return oStr.str();
}
+ // ////////////////////////////////////////////////////////////////////
+ const std::string BookingClassKey_T::describe() const {
+ std::ostringstream oStr;
+ oStr << _parentKey.describe() << ", " << toString();
+ return oStr.str();
+ }
+
}
Modified: trunk/stdair/stdair/bom/BookingClassKey.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClassKey.hpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/BookingClassKey.hpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -7,12 +7,18 @@
// STDAIR
#include <stdair/STDAIR_Types.hpp>
#include <stdair/bom/BomKey.hpp>
+#include <stdair/bom/SegmentCabinKey.hpp>
namespace stdair {
/** Key of segment-cabin. */
struct BookingClassKey_T : public BomKey_T {
-
+
public:
+ // /////////// Typedefs ////////////
+ /** Definition allowing to retrieve the parent key type. */
+ typedef SegmentCabinKey_T ParentKey_T;
+
+ public:
// /////////// Construction ///////////
/** Constructor. */
BookingClassKey_T (const ClassCode_T& iClassCode);
@@ -24,6 +30,11 @@
/** Get the cabin code. */
const ClassCode_T& getClassCode () const;
+ // /////////// Setters /////////////
+ void setParentKey (const ParentKey_T& iParentKey) {
+ _parentKey = iParentKey;
+ }
+
// /////////// Display support methods /////////
/** Dump a Business Object Key into an output stream.
@param ostream& the output stream. */
@@ -38,10 +49,16 @@
when among children of a given parent Business Object.
<br>For instance, "H" and "K" allow to differentiate among two
marketing classes for the same segment-cabin. */
- std::string toString() const;
+ const std::string toString() const;
+ /** Display of the key. */
+ const std::string describe() const;
+
private:
// Attributes
+ /** Segment-cabin key.*/
+ ParentKey_T _parentKey;
+
/** Cabin code. */
ClassCode_T _classCode;
};
Modified: trunk/stdair/stdair/bom/FlightDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDate.hpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -46,6 +46,9 @@
BOM content child type. */
typedef LegDate SecondContentChild_T;
+ /** Definition allowing to retrieve the specific BookingClass type. */
+ typedef BookingClass BookingClassContent_T;
+
public:
// /////////// Getters /////////////
/** Get a SegmentDateList_T for iteration methods. */
Modified: trunk/stdair/stdair/bom/FlightDateKey.cpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDateKey.cpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/FlightDateKey.cpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -13,6 +13,12 @@
}
// ////////////////////////////////////////////////////////////////////
+ FlightDateKey_T::FlightDateKey_T (const FlightDateKey_T& iKey)
+ : _parentKey (iKey._parentKey),
+ _flightNumber (iKey._flightNumber), _flightDate (iKey._flightDate) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
FlightDateKey_T::~FlightDateKey_T () {
}
@@ -26,10 +32,17 @@
}
// ////////////////////////////////////////////////////////////////////
- std::string FlightDateKey_T::toString() const {
+ const std::string FlightDateKey_T::toString() const {
std::ostringstream oStr;
oStr << _flightNumber << ", " << _flightDate;
return oStr.str();
}
+
+ // ////////////////////////////////////////////////////////////////////
+ const std::string FlightDateKey_T::describe() const {
+ std::ostringstream oStr;
+ oStr << _parentKey.describe() << ", " << toString();
+ return oStr.str();
+ }
}
Modified: trunk/stdair/stdair/bom/FlightDateKey.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDateKey.hpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/FlightDateKey.hpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -7,15 +7,28 @@
// STDAIR
#include <stdair/STDAIR_Types.hpp>
#include <stdair/bom/BomKey.hpp>
+#include <stdair/bom/InventoryKey.hpp>
namespace stdair {
/** Key of flight-date. */
struct FlightDateKey_T : public BomKey_T {
+ friend struct SegmentDateKey_T;
+ friend struct LegDateKey_T;
public:
+ // /////////// Typedefs ////////////
+ /** Definition allowing to retrieve the parent key type. */
+ typedef InventoryKey_T ParentKey_T;
+
+ private:
+ // /////////// Default constructor //////////
+ FlightDateKey_T () { };
+
+ public:
// /////////// Construction ///////////
- /** Constructor. */
+ /** Constructors. */
FlightDateKey_T (const FlightNumber_T&, const Date_T&);
+ FlightDateKey_T (const FlightDateKey_T&);
/** Destructor. */
~FlightDateKey_T ();
@@ -31,6 +44,12 @@
return _flightDate;
}
+ // /////////// Setters /////////////
+ /** Set the parent key. */
+ void setParentKey (const ParentKey_T& iParentKey) {
+ _parentKey = iParentKey;
+ }
+
// /////////// Display support methods /////////
/** Dump a Business Object Key into an output stream.
@param ostream& the output stream. */
@@ -45,10 +64,16 @@
when among children of a given parent Business Object.
<br>For instance, "H" and "K" allow to differentiate among two
marketing classes for the same segment-date. */
- std::string toString() const;
+ const std::string toString() const;
+ /** Display of the key. */
+ const std::string describe() const;
+
private:
// Attributes
+ /** Inventory Key.*/
+ ParentKey_T _parentKey;
+
/** Flight number. */
FlightNumber_T _flightNumber;
Modified: trunk/stdair/stdair/bom/FlightDateStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -55,6 +55,9 @@
/** Definition allowing to retrive the second children bom holder type. */
typedef BomChildrenHolderImp<SecondContentChild_T> SecondChildrenBomHolder_T;
+ /** Define the children booking class holder type. */
+ typedef BomChildrenHolderImp<typename BOM_CONTENT::BookingClassContent_T> BookingClassHolder_T;
+
public:
// /////////// Getters /////////////
/** Get the (parent) InventoryStructure object. */
@@ -113,6 +116,11 @@
void setChildrenList (SecondChildrenBomHolder_T& ioChildrenList) {
_secondChildrenList = &ioChildrenList;
}
+
+ /** Set the booking class list. */
+ void setBookingClassHolder (BookingClassHolder_T& ioBookingClassHolder) {
+ _bookingClassHolder = &ioBookingClassHolder;
+ }
public:
// /////////// Display support methods /////////
@@ -142,8 +150,8 @@
layer. */
/** Default constructors. */
FlightDateStructure () : _parent (NULL), _content (NULL),
- _childrenList (NULL),
- _secondChildrenList (NULL) { }
+ _childrenList (NULL), _secondChildrenList (NULL),
+ _bookingClassHolder (NULL) { }
FlightDateStructure (const FlightDateStructure&);
/** Destructor. */
@@ -163,6 +171,9 @@
/** List of leg-dates. */
SecondChildrenBomHolder_T* _secondChildrenList;
+ /** List of booking classes. */
+ BookingClassHolder_T* _bookingClassHolder;
+
};
}
Modified: trunk/stdair/stdair/bom/Inventory.cpp
===================================================================
--- trunk/stdair/stdair/bom/Inventory.cpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/Inventory.cpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -58,10 +58,12 @@
return _inventoryStructure.getChildrenList();
}
+ // //////////////////////////////////////////////////////////////////////
+ FlightDate* Inventory::
+ getFlightDate (const FlightDateKey_T& iKey) const {
+ return _inventoryStructure.getContentChild (iKey);
+ }
-// FlightDate* getFlightDate (const FlightNumber_T& iFlightNumber,
-// const Date_T& iFlightDate) const;
-
// BookingClass* getBookingClass (const std::string&) const;
// /** Clean the list of classes. */
Modified: trunk/stdair/stdair/bom/Inventory.hpp
===================================================================
--- trunk/stdair/stdair/bom/Inventory.hpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/Inventory.hpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -16,6 +16,7 @@
class FacBomContent;
class AirlineFeature;
class BookingClass;
+ struct FlightDateKey_T;
struct InventoryKey_T;
/** Class representing the actual functional/business content for
@@ -83,8 +84,7 @@
/** Retrieve, if existing, the FlightDate corresponding to the
given flight number and flight date (FlightDate key).
<br>If not existing, return the NULL pointer. */
- // FlightDate* getFlightDate (const FlightNumber_T& iFlightNumber,
-// const Date_T& iFlightDate) const;
+ FlightDate* getFlightDate (const FlightDateKey_T&) const;
public:
// /////////// Setters ////////////
@@ -137,9 +137,6 @@
/** The feature set of the correspondent airline. */
const AirlineFeature* _airlineFeature;
-
- /** List of booking classes. */
- //BookingClassHolder_T _bookingClassList;
};
}
Modified: trunk/stdair/stdair/bom/InventoryKey.cpp
===================================================================
--- trunk/stdair/stdair/bom/InventoryKey.cpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/InventoryKey.cpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -10,6 +10,10 @@
InventoryKey_T::InventoryKey_T (const AirlineCode_T& iAirlineCode)
: _airlineCode (iAirlineCode) {
}
+ // ////////////////////////////////////////////////////////////////////
+ InventoryKey_T::InventoryKey_T (const InventoryKey_T& iKey)
+ : _airlineCode (iKey._airlineCode) {
+ }
// ////////////////////////////////////////////////////////////////////
InventoryKey_T::~InventoryKey_T () {
@@ -25,10 +29,15 @@
}
// ////////////////////////////////////////////////////////////////////
- std::string InventoryKey_T::toString() const {
+ const std::string InventoryKey_T::toString() const {
std::ostringstream oStr;
oStr << _airlineCode;
return oStr.str();
}
+ // ////////////////////////////////////////////////////////////////////
+ const std::string InventoryKey_T::describe() const {
+ return toString();
+ }
+
}
Modified: trunk/stdair/stdair/bom/InventoryKey.hpp
===================================================================
--- trunk/stdair/stdair/bom/InventoryKey.hpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/InventoryKey.hpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -7,15 +7,27 @@
// STDAIR
#include <stdair/STDAIR_Types.hpp>
#include <stdair/bom/BomKey.hpp>
+#include <stdair/bom/BomRootKey.hpp>
namespace stdair {
/** Key of inventory. */
struct InventoryKey_T : public BomKey_T {
+ friend struct FlightDateKey_T;
public:
+ // /////////// Typedefs ////////////
+ /** Definition allowing to retrieve the parent key type. */
+ typedef BomRootKey_T ParentKey_T;
+
+ private:
+ // /////////// Default constructor //////////
+ InventoryKey_T () { };
+
+ public:
// /////////// Construction ///////////
- /** Constructor. */
+ /** Constructors. */
InventoryKey_T (const AirlineCode_T& iAirlineCode);
+ InventoryKey_T (const InventoryKey_T&);
/** Destructor. */
~InventoryKey_T ();
@@ -38,8 +50,15 @@
when among children of a given parent Business Object.
<br>For instance, "H" and "K" allow to differentiate among two
marketing classes for the same segment-date. */
- std::string toString() const;
-
+ const std::string toString() const;
+
+ /** Display of the key. */
+ const std::string describe() const;
+
+ // /////////// Setters /////////////
+ /** Set the parent key. */
+ void setParentKey (const ParentKey_T& iParentKey) const { }
+
private:
// Attributes
/** Airline code. */
Modified: trunk/stdair/stdair/bom/InventoryStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -12,8 +12,12 @@
#include <stdair/bom/BomStructureDummy.hpp>
#include <stdair/bom/BomContentDummy.hpp>
#include <stdair/bom/FlightDateStructure.hpp>
+#include <stdair/bom/FlightDateKey.hpp>
namespace stdair {
+ // Forward declarations.
+ template <typename BOM> struct BomMap_T;
+
/** Wrapper class aimed at holding the actual content, modeled
by an external specific Inventory class (for instance,
in the AIRSCHED library). */
@@ -34,7 +38,14 @@
/** Definition allowing to retrieve the children type of the
BOM_CONTENT. */
typedef typename BOM_CONTENT::ContentChild_T ContentChild_T;
+
+ /** Definition allowing to retrieve the key type of the
+ ContentChild_T. */
+ typedef FlightDateKey_T ChildKey_T;
+ /** Define the map of ContentChild_T. */
+ typedef BomMap_T<ContentChild_T> ChildrenMap_T;
+
/** Definition allowing to retrieve the associated parent
BOM structure type. */
typedef typename BOM_CONTENT::Parent_T::BomStructure_T ParentBomStructure_T;
@@ -76,11 +87,31 @@
assert (_childrenList != NULL);
return *_childrenList;
}
-
- /** Get the list of flight-dates. */
+
+ /** Get the list of flight-dates. */
void getChildrenList (ChildrenBomHolder_T*& ioChildrenList) {
ioChildrenList = _childrenList;
}
+
+ /** Retrieve, if existing, the flight-date corresponding to the
+ given key.
+ <br>If not exissting, return the NULL pointer. */
+ ContentChild_T* getContentChild (const ChildKey_T& iKey) const {
+ ContentChild_T* oContentChild_ptr= NULL;
+
+ ChildrenMap_T lChildrenMap (getChildrenList());
+ const MapKey_T lMapKey = iKey.toString();
+
+ typename ChildrenMap_T::iterator itContentChild =
+ lChildrenMap.find (lMapKey);
+
+ if (itContentChild != lChildrenMap.end()) {
+ oContentChild_ptr = itContentChild->second;
+ assert (oContentChild_ptr != NULL);
+ }
+
+ return oContentChild_ptr;
+ }
private:
// /////////// Setters /////////////
@@ -96,6 +127,11 @@
void setChildrenList (ChildrenBomHolder_T& ioChildrenList) {
_childrenList = &ioChildrenList;
}
+
+ /** Set the booking class list. */
+ void setBookingClassHolder (BookingClassHolder_T& ioBookingClassHolder) {
+ _bookingClassHolder = &ioBookingClassHolder;
+ }
public:
// /////////// Display support methods /////////
@@ -125,7 +161,7 @@
layer. */
/** Default constructors. */
InventoryStructure () : _parent (NULL), _content (NULL),
- _childrenList (NULL) { }
+ _childrenList (NULL), _bookingClassHolder (NULL) { }
InventoryStructure (const InventoryStructure&);
/** Destructor. */
Modified: trunk/stdair/stdair/bom/LegCabinKey.cpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabinKey.cpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/LegCabinKey.cpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -12,6 +12,11 @@
}
// ////////////////////////////////////////////////////////////////////
+ LegCabinKey_T::LegCabinKey_T (const LegCabinKey_T& iKey)
+ : _parentKey (iKey._parentKey), _cabinCode (iKey._cabinCode) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
LegCabinKey_T::~LegCabinKey_T () {
}
@@ -25,10 +30,17 @@
}
// ////////////////////////////////////////////////////////////////////
- std::string LegCabinKey_T::toString() const {
+ const std::string LegCabinKey_T::toString() const {
std::ostringstream oStr;
oStr << _cabinCode;
return oStr.str();
}
+
+ // ////////////////////////////////////////////////////////////////////
+ const std::string LegCabinKey_T::describe() const {
+ std::ostringstream oStr;
+ oStr << _parentKey.describe() << ", " << toString();
+ return oStr.str();
+ }
}
Modified: trunk/stdair/stdair/bom/LegCabinKey.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabinKey.hpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/LegCabinKey.hpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -7,15 +7,27 @@
// STDAIR
#include <stdair/STDAIR_Types.hpp>
#include <stdair/bom/BomKey.hpp>
+#include <stdair/bom/LegDateKey.hpp>
namespace stdair {
/** Key of leg-cabin. */
struct LegCabinKey_T : public BomKey_T {
+ friend struct BookingClassKey_T;
public:
+ // /////////// Typedefs ////////////
+ /** Definition allowing to retrieve the parent key type. */
+ typedef LegDateKey_T ParentKey_T;
+
+ private:
+ // /////////// Default constructor //////////
+ LegCabinKey_T () { };
+
+ public:
// /////////// Construction ///////////
- /** Constructor. */
+ /** Constructors. */
LegCabinKey_T (const CabinCode_T& iCabinCode);
+ LegCabinKey_T (const LegCabinKey_T&);
/** Destructor. */
~LegCabinKey_T ();
@@ -25,6 +37,11 @@
const CabinCode_T& getCabinCode () const {
return _cabinCode;
}
+
+ // /////////// Setters /////////////
+ void setParentKey (const ParentKey_T& iParentKey) {
+ _parentKey = iParentKey;
+ }
// /////////// Display support methods /////////
/** Dump a Business Object Key into an output stream.
@@ -40,10 +57,16 @@
when among children of a given parent Business Object.
<br>For instance, "H" and "K" allow to differentiate among two
marketing classes for the same leg-cabin. */
- std::string toString() const;
+ const std::string toString() const;
+ /** Display of the key. */
+ const std::string describe() const;
+
private:
// Attributes
+ /** Leg-date Key.*/
+ ParentKey_T _parentKey;
+
/** Cabin code. */
CabinCode_T _cabinCode;
};
Modified: trunk/stdair/stdair/bom/LegDateKey.cpp
===================================================================
--- trunk/stdair/stdair/bom/LegDateKey.cpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/LegDateKey.cpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -10,6 +10,10 @@
LegDateKey_T::LegDateKey_T (const AirportCode_T& iBoardPoint)
: _boardPoint (iBoardPoint) {
}
+ // ////////////////////////////////////////////////////////////////////
+ LegDateKey_T::LegDateKey_T (const LegDateKey_T& iKey)
+ : _parentKey (iKey._parentKey), _boardPoint (iKey._boardPoint) {
+ }
// ////////////////////////////////////////////////////////////////////
LegDateKey_T::~LegDateKey_T () {
@@ -25,10 +29,17 @@
}
// ////////////////////////////////////////////////////////////////////
- std::string LegDateKey_T::toString() const {
+ const std::string LegDateKey_T::toString() const {
std::ostringstream oStr;
oStr << _boardPoint;
return oStr.str();
}
+ // ////////////////////////////////////////////////////////////////////
+ const std::string LegDateKey_T::describe() const {
+ std::ostringstream oStr;
+ oStr << _parentKey.describe() << ", " << toString();
+ return oStr.str();
+ }
+
}
Modified: trunk/stdair/stdair/bom/LegDateKey.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegDateKey.hpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/LegDateKey.hpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -7,15 +7,27 @@
// STDAIR
#include <stdair/STDAIR_Types.hpp>
#include <stdair/bom/BomKey.hpp>
+#include <stdair/bom/FlightDateKey.hpp>
namespace stdair {
/** Key of leg-date. */
struct LegDateKey_T : public BomKey_T {
-
+ friend struct LegCabinKey_T;
+
public:
+ // /////////// Typedefs ////////////
+ /** Definition allowing to retrieve the parent key type. */
+ typedef FlightDateKey_T ParentKey_T;
+
+ private:
+ // /////////// Default constructor //////////
+ LegDateKey_T () { };
+
+ public:
// /////////// Construction ///////////
- /** Constructor. */
+ /** Constructors. */
LegDateKey_T (const AirportCode_T& iBoardPoint);
+ LegDateKey_T (const LegDateKey_T&);
/** Destructor. */
~LegDateKey_T ();
@@ -26,6 +38,11 @@
return _boardPoint;
}
+ // /////////// Setters /////////////
+ void setParentKey (const ParentKey_T& iParentKey) {
+ _parentKey = iParentKey;
+ }
+
// /////////// Display support methods /////////
/** Dump a Business Object Key into an output stream.
@param ostream& the output stream. */
@@ -40,10 +57,16 @@
when among children of a given parent Business Object.
<br>For instance, "H" and "K" allow to differentiate among two
marketing classes for the same leg-date. */
- std::string toString() const;
+ const std::string toString() const;
+ /** Display of the key. */
+ const std::string describe() const;
+
private:
// Attributes
+ /** Flight-date Key.*/
+ ParentKey_T _parentKey;
+
/** Boarding airport. */
AirportCode_T _boardPoint;
};
Modified: trunk/stdair/stdair/bom/SegmentCabinKey.cpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabinKey.cpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/SegmentCabinKey.cpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -12,6 +12,11 @@
}
// ////////////////////////////////////////////////////////////////////
+ SegmentCabinKey_T::SegmentCabinKey_T (const SegmentCabinKey_T& iKey)
+ : _parentKey (iKey._parentKey), _cabinCode (iKey._cabinCode) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
SegmentCabinKey_T::~SegmentCabinKey_T () {
}
@@ -25,10 +30,17 @@
}
// ////////////////////////////////////////////////////////////////////
- std::string SegmentCabinKey_T::toString() const {
+ const std::string SegmentCabinKey_T::toString() const {
std::ostringstream oStr;
oStr << _cabinCode;
return oStr.str();
}
+ // ////////////////////////////////////////////////////////////////////
+ const std::string SegmentCabinKey_T::describe() const {
+ std::ostringstream oStr;
+ oStr << _parentKey.describe() << ", " << toString();
+ return oStr.str();
+ }
+
}
Modified: trunk/stdair/stdair/bom/SegmentCabinKey.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabinKey.hpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/SegmentCabinKey.hpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -7,15 +7,27 @@
// STDAIR
#include <stdair/STDAIR_Types.hpp>
#include <stdair/bom/BomKey.hpp>
+#include <stdair/bom/SegmentDateKey.hpp>
namespace stdair {
/** Key of segment-cabin. */
struct SegmentCabinKey_T : public BomKey_T {
+ friend struct BookingClassKey_T;
public:
+ // /////////// Typedefs ////////////
+ /** Definition allowing to retrieve the parent key type. */
+ typedef SegmentDateKey_T ParentKey_T;
+
+ private:
+ // /////////// Default constructor //////////
+ SegmentCabinKey_T () { };
+
+ public:
// /////////// Construction ///////////
/** Constructor. */
SegmentCabinKey_T (const CabinCode_T& iCabinCode);
+ SegmentCabinKey_T (const SegmentCabinKey_T&);
/** Destructor. */
~SegmentCabinKey_T ();
@@ -25,6 +37,11 @@
const CabinCode_T& getCabinCode () const {
return _cabinCode;
}
+
+ // /////////// Setters /////////////
+ void setParentKey (const ParentKey_T& iParentKey) {
+ _parentKey = iParentKey;
+ }
// /////////// Display support methods /////////
/** Dump a Business Object Key into an output stream.
@@ -40,10 +57,16 @@
when among children of a given parent Business Object.
<br>For instance, "H" and "K" allow to differentiate among two
marketing classes for the same segment-cabin. */
- std::string toString() const;
+ const std::string toString() const;
+ /** Display of the key. */
+ const std::string describe() const;
+
private:
// Attributes
+ /** Segment-date Key.*/
+ ParentKey_T _parentKey;
+
/** Cabin code. */
CabinCode_T _cabinCode;
};
Modified: trunk/stdair/stdair/bom/SegmentDateKey.cpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDateKey.cpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/SegmentDateKey.cpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -13,6 +13,12 @@
}
// ////////////////////////////////////////////////////////////////////
+ SegmentDateKey_T::SegmentDateKey_T (const SegmentDateKey_T& iKey)
+ : _parentKey (iKey._parentKey),
+ _boardPoint (iKey._boardPoint), _offPoint (iKey._offPoint) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
SegmentDateKey_T::~SegmentDateKey_T () {
}
@@ -26,10 +32,17 @@
}
// ////////////////////////////////////////////////////////////////////
- std::string SegmentDateKey_T::toString() const {
+ const std::string SegmentDateKey_T::toString() const {
std::ostringstream oStr;
oStr << _boardPoint << "-" << _offPoint;
return oStr.str();
}
+ // ////////////////////////////////////////////////////////////////////
+ const std::string SegmentDateKey_T::describe() const {
+ std::ostringstream oStr;
+ oStr << _parentKey.describe() << ", " << toString();
+ return oStr.str();
+ }
+
}
Modified: trunk/stdair/stdair/bom/SegmentDateKey.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDateKey.hpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/bom/SegmentDateKey.hpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -7,15 +7,27 @@
// STDAIR
#include <stdair/STDAIR_Types.hpp>
#include <stdair/bom/BomKey.hpp>
+#include <stdair/bom/FlightDateKey.hpp>
namespace stdair {
/** Key of segment-date. */
struct SegmentDateKey_T : public BomKey_T {
+ friend struct SegmentCabinKey_T;
+
+ public:
+ // /////////// Typedefs ////////////
+ /** Definition allowing to retrieve the parent key type. */
+ typedef FlightDateKey_T ParentKey_T;
+ private:
+ // /////////// Default constructor //////////
+ SegmentDateKey_T () { };
+
public:
// /////////// Construction ///////////
- /** Constructor. */
+ /** Constructors. */
SegmentDateKey_T (const AirportCode_T&, const AirportCode_T&);
+ SegmentDateKey_T (const SegmentDateKey_T&);
/** Destructor. */
~SegmentDateKey_T ();
@@ -30,6 +42,11 @@
const AirportCode_T& getOffPoint() const {
return _offPoint;
}
+
+ // /////////// Setters /////////////
+ void setParentKey (const ParentKey_T& iParentKey) {
+ _parentKey = iParentKey;
+ }
// /////////// Display support methods /////////
/** Dump a Business Object Key into an output stream.
@@ -45,10 +62,16 @@
when among children of a given parent Business Object.
<br>For instance, "H" and "K" allow to differentiate among two
marketing classes for the same segment-date. */
- std::string toString() const;
+ const std::string toString() const;
+ /** Display of the key. */
+ const std::string describe() const;
+
private:
// Attributes
+ /** Flight-date Key.*/
+ ParentKey_T _parentKey;
+
/** Boarding airport. */
AirportCode_T _boardPoint;
Modified: trunk/stdair/stdair/factory/FacBomContent.hpp
===================================================================
--- trunk/stdair/stdair/factory/FacBomContent.hpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/factory/FacBomContent.hpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -16,6 +16,7 @@
namespace stdair {
// Forward declarations
+ template<typename BOM> struct BomList_T;
class BomStructure;
class BomContent;
struct OptimizerStruct_T;
@@ -43,11 +44,18 @@
<br>A structure object is created, under the hood, with the given key.
That structure object then gets a pointer on the content object. */
template <typename BOM_CONTENT_CHILD>
- BOM_CONTENT_CHILD& create (typename BOM_CONTENT_CHILD::Parent_T& ioContentParent, const typename BOM_CONTENT_CHILD::BomKey_T& iKey) {
+ BOM_CONTENT_CHILD& create (typename BOM_CONTENT_CHILD::Parent_T& ioContentParent, typename BOM_CONTENT_CHILD::BomKey_T& ioKey) {
+
+ // Define the parent key type.
+ typedef typename BOM_CONTENT_CHILD::Parent_T::BomKey_T ParentKey_T;
+
+ // Finish the construction of the child key by setting its parent.
+ const ParentKey_T& lParentKey = ioContentParent.getKey();
+ ioKey.setParentKey (lParentKey);
// Create the child structure object for the given key
BOM_CONTENT_CHILD& lBomContentChild =
- createInternal<BOM_CONTENT_CHILD> (iKey);
+ createInternal<BOM_CONTENT_CHILD> (ioKey);
// Retrieve the child structure object
typename BOM_CONTENT_CHILD::BomStructure_T& lBomStructureChild =
@@ -104,7 +112,83 @@
return *aBomContent_ptr;
}
+ // //////////////////////////////////////////////////////////////////
+ // Section reserved for the building the direct accesses such as
+ // booking class holder directly in inventory or flight-date, ect.
+ // //////////////////////////////////////////////////////////////////
public:
+ template <typename BOM_ROOT>
+ static void createDirectAccesses (const BOM_ROOT& iBomRoot) {
+ // Retrieve the inventory type.
+ typedef typename BOM_ROOT::ContentChild_T INVENTORY_T;
+ // Define the list of inventories.
+ typedef BomList_T<INVENTORY_T> INVENTORY_LIST_T;
+
+ // Browse the BomRoot and build direct accesses within each inventory.
+ const INVENTORY_LIST_T lInventoryList = iBomRoot.getInventoryList();
+ for (typename INVENTORY_LIST_T::iterator itInv = lInventoryList.begin();
+ itInv != lInventoryList.end(); ++itInv) {
+ INVENTORY_T& lCurrentInv = *itInv;
+
+ createDirectAccessesWithinInventory (lCurrentInv);
+ }
+ }
+
+ private:
+ /** Create a holder of all booking classes within the given inventory. */
+ template <typename INVENTORY>
+ static void createDirectAccessesWithinInventory (INVENTORY& ioInventory){
+ // Retrieve the flight-date type.
+ typedef typename INVENTORY::ContentChild_T FLIGHT_DATE_T;
+ // Define the list of flight-dates.
+ typedef BomList_T<FLIGHT_DATE_T> FLIGHT_DATE_LIST_T;
+ // Retrieve the booking class type.
+ typedef typename INVENTORY::BookingClassContent_T BOOKING_CLASS_T;
+ // Define the bom holder of booking classes.
+ typedef BomChildrenHolderImp<BOOKING_CLASS_T> BOOKING_CLASS_HOLDER_T;
+
+ // Initialize the booking class holder within the inventory.
+ BOOKING_CLASS_HOLDER_T& lBookingClassHolder =
+ FacBomStructure::instance().createBomHolder<BOOKING_CLASS_T> ();
+ ioInventory._inventoryStructure.setBookingClassHolder(lBookingClassHolder);
+
+ // Browse the inventory and build direct accesses within each
+ // flight-date, then build the booking class holder within the
+ // inventory.
+ const FLIGHT_DATE_LIST_T lFlightDateList = ioInventory.getFlightDateList();
+ for (typename FLIGHT_DATE_LIST_T::iterator itFlightDate =
+ lFlightDateList.begin(); itFlightDate != lFlightDateList.end();
+ ++itFlightDate) {
+ FLIGHT_DATE_T& lCurrentFlightDate = *itFlightDate;
+ createDirectAccessesWithinFlightDate (lCurrentFlightDate);
+ }
+ }
+
+ /** Create the direct acceeses within the given flight-date, and, at the
+ same time, build the class holder for the parent inventory. */
+ template <typename FLIGHT_DATE>
+ static void createDirectAccessesWithinFlightDate (const FLIGHT_DATE& ioFlightDate) {
+ // Retrieve the booking class type.
+ typedef typename FLIGHT_DATE::BookingClassContent_T BOOKING_CLASS_T;
+ // Define the bom holder of booking classes.
+ typedef BomChildrenHolderImp<BOOKING_CLASS_T> BOOKING_CLASS_HOLDER_T;
+
+ typename FLIGHT_DATE::BomStructure_T::ParentBomStructure_T& lInvStructure =
+ ioFlightDate._flightDateStructure.getInventoryStructure();
+
+ BOOKING_CLASS_HOLDER_T* lInvBookingClassHolder_ptr =
+ lInvStructure._bookingClassHolder;
+ assert (lInvBookingClassHolder_ptr != NULL);
+
+ // Retrieve the segment-date type.
+ typedef typename FLIGHT_DATE::ContentChild_T SEGMENT_DATE_T;
+ // Define the list of segment-dates.
+ typedef BomList_T<SEGMENT_DATE_T> SEGMENT_DATE_LIST_T;
+
+
+ }
+
+ public:
/** Provide the unique instance.
<br>The singleton is instantiated when first used.
@return FacBomContent& */
Modified: trunk/stdair/stdair/factory/FacBomStructure.hpp
===================================================================
--- trunk/stdair/stdair/factory/FacBomStructure.hpp 2009-11-06 23:55:05 UTC (rev 61)
+++ trunk/stdair/stdair/factory/FacBomStructure.hpp 2009-11-12 16:44:45 UTC (rev 62)
@@ -89,25 +89,68 @@
ioBomParent.getChildrenList (lBomChildrenHolder_ptr);
assert (lBomChildrenHolder_ptr != NULL);
+ bool hasInsertBeenSuccessful =
+ addBomObjecdToBomHolder <typename BOM_STRUCTURE_CHILD::Content_T>
+ (*lBomChildrenHolder_ptr, ioBomChild);
+
+ return hasInsertBeenSuccessful;
+ }
+
+ /** Add a BOM object into a dedicated BOM holder by using the
+ short key of the object. */
+ template <typename BOM_CONTENT>
+ static bool addBomObjecdToBomHolder (BomChildrenHolderImp<BOM_CONTENT>& ioBomHolder, typename BOM_CONTENT::BomStructure_T& ioBomStructure) {
+ // Retrieve the bom structure type.
+ typedef typename BOM_CONTENT::BomStructure_T BOM_STRUCTURE_T;
+ // Define the bom holder type.
+ typedef BomChildrenHolderImp<BOM_CONTENT> BOM_HOLDER_T;
+
// Retrieve the short key
- const typename BOM_STRUCTURE_CHILD::BomKey_T& lBomChildKey =
- ioBomChild.getKey();
- const std::string& lBomChildKeyStr = lBomChildKey.toString();
+ const typename BOM_STRUCTURE_T::BomKey_T& lBomKey = ioBomStructure.getKey();
+ const std::string& lBomKeyStr = lBomKey.toString();
- // Insert the child structure object in the dedicated lists
- typedef typename BOM_CHILDREN_HOLDER_T::BomChildrenList_T BOM_CHILDREN_LIST_T;
+ // Insert the structure object in the dedicated lists
+ typedef typename BOM_HOLDER_T::BomChildrenList_T BOM_LIST_T;
const bool hasInsertBeenSuccessful =
- lBomChildrenHolder_ptr->_bomChildrenList.
- insert (typename BOM_CHILDREN_LIST_T::value_type (lBomChildKeyStr,
- &ioBomChild)).second;
+ ioBomHolder._bomChildrenList.
+ insert (typename BOM_LIST_T::value_type (lBomKeyStr,
+ &ioBomStructure)).second;
if (hasInsertBeenSuccessful == false) {
return hasInsertBeenSuccessful;
}
-
- lBomChildrenHolder_ptr->_bomChildrenOrderedList.push_back (&ioBomChild);
+ ioBomHolder._bomChildrenOrderedList.push_back (&ioBomStructure);
+
return true;
}
+
+ /** Add a BOM object into a dedicated BOM holder by using the
+ full key of the object. */
+ template <typename BOM_CONTENT>
+ static bool addFullBomObjecdToBomHolder (BomChildrenHolderImp<BOM_CONTENT> ioBomHolder, typename BOM_CONTENT::BomStructure_T& ioBomStructure) {
+ // Retrieve the bom structure type.
+ typedef typename BOM_CONTENT::BomStructure_T BOM_STRUCTURE_T;
+ // Define the bom holder type.
+ typedef BomChildrenHolderImp<BOM_CONTENT> BOM_HOLDER_T;
+
+ // Retrieve the short key
+ const typename BOM_STRUCTURE_T::BomKey_T& lBomKey = ioBomStructure.getKey();
+ const std::string& lBomKeyStr = lBomKey.describe();
+
+ // Insert the structure object in the dedicated lists
+ typedef typename BOM_HOLDER_T::BomChildrenList_T BOM_LIST_T;
+ const bool hasInsertBeenSuccessful =
+ ioBomHolder._bomChildrenList.
+ insert (typename BOM_LIST_T::value_type (lBomKeyStr,
+ &ioBomStructure)).second;
+ if (hasInsertBeenSuccessful == false) {
+ return hasInsertBeenSuccessful;
+ }
+
+ ioBomHolder._bomChildrenOrderedList.push_back (&ioBomStructure);
+
+ return true;
+ }
private:
/** Create a bom children holder object with the given children type. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <den...@us...> - 2009-11-06 23:55:13
|
Revision: 61
http://stdair.svn.sourceforge.net/stdair/?rev=61&view=rev
Author: denis_arnaud
Date: 2009-11-06 23:55:05 +0000 (Fri, 06 Nov 2009)
Log Message:
-----------
[Bom] Fixed a compilation bug in the Bom Makefile.
Modified Paths:
--------------
trunk/stdair/stdair/bom/sources.mk
Modified: trunk/stdair/stdair/bom/sources.mk
===================================================================
--- trunk/stdair/stdair/bom/sources.mk 2009-11-05 10:54:06 UTC (rev 60)
+++ trunk/stdair/stdair/bom/sources.mk 2009-11-06 23:55:05 UTC (rev 61)
@@ -52,7 +52,7 @@
$(top_srcdir)/stdair/bom/AirlineFeatureSet.hpp \
$(top_srcdir)/stdair/bom/AirlineFeatureSetContent.hpp \
$(top_srcdir)/stdair/bom/AirlineFeatureSetTypes.hpp \
- $(top_srcdir)/stdair/bom/AirlineFeatureSetStructure.hpp \
+ $(top_srcdir)/stdair/bom/AirlineFeatureSetStructure.hpp \
$(top_srcdir)/stdair/bom/AirlineFeature.hpp \
$(top_srcdir)/stdair/bom/AirlineFeatureContent.hpp \
$(top_srcdir)/stdair/bom/AirlineFeatureTypes.hpp \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qua...@us...> - 2009-11-05 10:54:17
|
Revision: 60
http://stdair.svn.sourceforge.net/stdair/?rev=60&view=rev
Author: quannaus
Date: 2009-11-05 10:54:06 +0000 (Thu, 05 Nov 2009)
Log Message:
-----------
[Dev] Replaced the list and map structure with templates.
Modified Paths:
--------------
trunk/stdair/stdair/bom/AirlineFeature.hpp
trunk/stdair/stdair/bom/AirlineFeatureSet.cpp
trunk/stdair/stdair/bom/AirlineFeatureSet.hpp
trunk/stdair/stdair/bom/AirlineFeatureTypes.hpp
trunk/stdair/stdair/bom/BomRoot.cpp
trunk/stdair/stdair/bom/BomRoot.hpp
trunk/stdair/stdair/bom/BookingClass.hpp
trunk/stdair/stdair/bom/BookingClassTypes.hpp
trunk/stdair/stdair/bom/FlightDate.cpp
trunk/stdair/stdair/bom/FlightDate.hpp
trunk/stdair/stdair/bom/FlightDateTypes.hpp
trunk/stdair/stdair/bom/Inventory.cpp
trunk/stdair/stdair/bom/Inventory.hpp
trunk/stdair/stdair/bom/InventoryStructure.hpp
trunk/stdair/stdair/bom/InventoryTypes.hpp
trunk/stdair/stdair/bom/LegCabin.hpp
trunk/stdair/stdair/bom/LegCabinTypes.hpp
trunk/stdair/stdair/bom/LegDate.cpp
trunk/stdair/stdair/bom/LegDate.hpp
trunk/stdair/stdair/bom/LegDateTypes.hpp
trunk/stdair/stdair/bom/SegmentCabin.cpp
trunk/stdair/stdair/bom/SegmentCabin.hpp
trunk/stdair/stdair/bom/SegmentCabinTypes.hpp
trunk/stdair/stdair/bom/SegmentDate.cpp
trunk/stdair/stdair/bom/SegmentDate.hpp
trunk/stdair/stdair/bom/SegmentDateTypes.hpp
trunk/stdair/stdair/bom/sources.mk
Added Paths:
-----------
trunk/stdair/stdair/bom/BomList.hpp
trunk/stdair/stdair/bom/BomMap.hpp
Removed Paths:
-------------
trunk/stdair/stdair/bom/AirlineFeatureList.cpp
trunk/stdair/stdair/bom/AirlineFeatureList.hpp
trunk/stdair/stdair/bom/AirlineFeatureMap.cpp
trunk/stdair/stdair/bom/AirlineFeatureMap.hpp
trunk/stdair/stdair/bom/BookingClassList.cpp
trunk/stdair/stdair/bom/BookingClassList.hpp
trunk/stdair/stdair/bom/BookingClassMap.cpp
trunk/stdair/stdair/bom/BookingClassMap.hpp
trunk/stdair/stdair/bom/FlightDateList.cpp
trunk/stdair/stdair/bom/FlightDateList.hpp
trunk/stdair/stdair/bom/FlightDateMap.cpp
trunk/stdair/stdair/bom/FlightDateMap.hpp
trunk/stdair/stdair/bom/InventoryList.cpp
trunk/stdair/stdair/bom/InventoryList.hpp
trunk/stdair/stdair/bom/InventoryMap.cpp
trunk/stdair/stdair/bom/InventoryMap.hpp
trunk/stdair/stdair/bom/LegCabinList.cpp
trunk/stdair/stdair/bom/LegCabinList.hpp
trunk/stdair/stdair/bom/LegCabinMap.cpp
trunk/stdair/stdair/bom/LegCabinMap.hpp
trunk/stdair/stdair/bom/LegDateList.cpp
trunk/stdair/stdair/bom/LegDateList.hpp
trunk/stdair/stdair/bom/LegDateMap.cpp
trunk/stdair/stdair/bom/LegDateMap.hpp
trunk/stdair/stdair/bom/SegmentCabinList.cpp
trunk/stdair/stdair/bom/SegmentCabinList.hpp
trunk/stdair/stdair/bom/SegmentCabinMap.cpp
trunk/stdair/stdair/bom/SegmentCabinMap.hpp
trunk/stdair/stdair/bom/SegmentDateList.cpp
trunk/stdair/stdair/bom/SegmentDateList.hpp
trunk/stdair/stdair/bom/SegmentDateMap.cpp
trunk/stdair/stdair/bom/SegmentDateMap.hpp
Modified: trunk/stdair/stdair/bom/AirlineFeature.hpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeature.hpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/AirlineFeature.hpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -15,8 +15,6 @@
// Forward declarations
class FacBomContent;
struct AirlineFeatureKey_T;
- struct AirlineFeatureList_T;
- struct AirlineFeatureMap_T;
/** Class representing the actual functional/business content for a
segment-cabin. */
Deleted: trunk/stdair/stdair/bom/AirlineFeatureList.cpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureList.cpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/AirlineFeatureList.cpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -1,50 +0,0 @@
-// //////////////////////////////////////////////////////////////////////
-// Import section
-// //////////////////////////////////////////////////////////////////////
-// STL
-#include <cassert>
-// STDAIR
-#include <stdair/bom/BomChildrenHolderImp.hpp>
-#include <stdair/bom/AirlineFeature.hpp>
-#include <stdair/bom/AirlineFeatureList.hpp>
-
-namespace stdair {
-
- // ////////////////////////////////////////////////////////////////////
- AirlineFeatureList_T::
- AirlineFeatureList_T (const AirlineFeatureHolder_T& iAirlineFeatureHolder)
- : _airlineFeatureHolder (iAirlineFeatureHolder) {
- }
-
- // ////////////////////////////////////////////////////////////////////
- AirlineFeatureList_T::
- AirlineFeatureList_T (const AirlineFeatureList_T& iAFList)
- : _airlineFeatureHolder (iAFList._airlineFeatureHolder) {
- }
-
- // ////////////////////////////////////////////////////////////////////
- AirlineFeatureList_T::~AirlineFeatureList_T () {
- }
-
- // //////////////////////////////////////////////////////////////////////
- AirlineFeatureList_T::iterator AirlineFeatureList_T::begin () const {
- return _airlineFeatureHolder.listBegin ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- AirlineFeatureList_T::iterator AirlineFeatureList_T::end () const {
- return _airlineFeatureHolder.listEnd ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- AirlineFeatureList_T::reverse_iterator AirlineFeatureList_T::rbegin () const {
- return _airlineFeatureHolder.listRBegin ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- AirlineFeatureList_T::reverse_iterator AirlineFeatureList_T::rend () const {
- return _airlineFeatureHolder.listREnd ();
- }
-
-}
-
Deleted: trunk/stdair/stdair/bom/AirlineFeatureList.hpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureList.hpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/AirlineFeatureList.hpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -1,70 +0,0 @@
-#ifndef __STDAIR_BOM_AIRLINEFEATURELIST_HPP
-#define __STDAIR_BOM_AIRLINEFEATURELIST_HPP
-
-// //////////////////////////////////////////////////////////////////////
-// Import section
-// //////////////////////////////////////////////////////////////////////
-// STDAIR
-#include <stdair/bom/AirlineFeatureTypes.hpp>
-
-namespace stdair {
-
- // Forward declarations
- template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T;
- template <typename BOM_STRUCTURE> class BomChildrenHolderImp;
- class AirlineFeature;
-
- /** Structure which handles the iterators for a booking class list. */
- struct AirlineFeatureList_T {
-
- public:
- // /////////////////////////////////////////////////////////////////////////
- // See the explanations, within the stdair::BomContentRoot class, for all
- // the iterator types specified below
- // /////////////////////////////////////////////////////////////////////////
- /** Define the booking class list iterators. */
- typedef BomIterator_T<AirlineFeature,
- AirlineFeatureStructureList_T::const_iterator> iterator;
- typedef BomIterator_T<AirlineFeature,
- AirlineFeatureStructureList_T::const_reverse_iterator> reverse_iterator;
- // /////////////////////////////////////////////////////////////////////////
-
- /** Define the booking class holder. */
- typedef BomChildrenHolderImp<AirlineFeature> AirlineFeatureHolder_T;
-
- public:
- // /////////// Iteration methods //////////
- /** Initialise the internal iterator on flight date:
- return the iterator at the begining of the list. */
- iterator begin () const;
-
- /** Initialise the internal iterator on flight date:
- return the iterator at the end of the list. */
- iterator end () const;
-
- /** Initialise the internal reverse iterator on flight date:
- return the reverse iterator at the rbegining of the list. */
- reverse_iterator rbegin () const;
-
- /** Initialise the internal reverse iterator on flight date:
- return the reverse iterator at the end of the list. */
- reverse_iterator rend () const;
-
- public:
- /** Default constructors. */
- AirlineFeatureList_T ();
- AirlineFeatureList_T (const AirlineFeatureList_T&);
- AirlineFeatureList_T (const AirlineFeatureHolder_T&);
-
- /** Destructor. */
- virtual ~AirlineFeatureList_T();
-
- private:
- // Attributes
- /** Reference structure. */
- const AirlineFeatureHolder_T& _airlineFeatureHolder;
- };
-
-}
-#endif // __STDAIR_BOM_AIRLINEFEATURELIST_HPP
-
Deleted: trunk/stdair/stdair/bom/AirlineFeatureMap.cpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureMap.cpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/AirlineFeatureMap.cpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -1,56 +0,0 @@
-// //////////////////////////////////////////////////////////////////////
-// Import section
-// //////////////////////////////////////////////////////////////////////
-// STL
-#include <cassert>
-// STDAIR
-#include <stdair/bom/BomChildrenHolderImp.hpp>
-#include <stdair/bom/AirlineFeature.hpp>
-#include <stdair/bom/AirlineFeatureMap.hpp>
-
-namespace stdair {
-
- // ////////////////////////////////////////////////////////////////////
- AirlineFeatureMap_T::
- AirlineFeatureMap_T (const AirlineFeatureHolder_T& iAirlineFeatureHolder)
- : _airlineFeatureHolder (iAirlineFeatureHolder) {
- }
-
- // ////////////////////////////////////////////////////////////////////
- AirlineFeatureMap_T::
- AirlineFeatureMap_T (const AirlineFeatureMap_T& iAFMap)
- : _airlineFeatureHolder (iAFMap._airlineFeatureHolder) {
- }
-
- // ////////////////////////////////////////////////////////////////////
- AirlineFeatureMap_T::~AirlineFeatureMap_T () {
- }
-
- // //////////////////////////////////////////////////////////////////////
- AirlineFeatureMap_T::iterator AirlineFeatureMap_T::begin () const {
- return _airlineFeatureHolder.mapBegin ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- AirlineFeatureMap_T::iterator AirlineFeatureMap_T::end () const {
- return _airlineFeatureHolder.mapEnd ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- AirlineFeatureMap_T::reverse_iterator AirlineFeatureMap_T::rbegin () const {
- return _airlineFeatureHolder.mapRBegin ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- AirlineFeatureMap_T::reverse_iterator AirlineFeatureMap_T::rend () const {
- return _airlineFeatureHolder.mapREnd ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- AirlineFeatureMap_T::
- iterator AirlineFeatureMap_T::find (const MapKey_T& iKey) const {
- return _airlineFeatureHolder.find (iKey);
- }
-
-}
-
Deleted: trunk/stdair/stdair/bom/AirlineFeatureMap.hpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureMap.hpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/AirlineFeatureMap.hpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -1,74 +0,0 @@
-#ifndef __STDAIR_BOM_AIRLINEFEATUREMAP_HPP
-#define __STDAIR_BOM_AIRLINEFEATUREMAP_HPP
-
-// //////////////////////////////////////////////////////////////////////
-// Import section
-// //////////////////////////////////////////////////////////////////////
-// STDAIR
-#include <stdair/bom/AirlineFeatureTypes.hpp>
-
-namespace stdair {
-
- // Forward declarations
- template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T;
- template <typename BOM_STRUCTURE> class BomChildrenHolderImp;
- class AirlineFeature;
-
- /** Structure which handles the iterators for a booking class map. */
- struct AirlineFeatureMap_T {
-
- public:
- // /////////////////////////////////////////////////////////////////////////
- // See the explanations, within the stdair::BomRoot class, for all
- // the iterator types specified below
- // /////////////////////////////////////////////////////////////////////////
- /** Define the booking class map iterators. */
- typedef BomIterator_T<AirlineFeature,
- AirlineFeatureStructureMap_T::const_iterator> iterator;
- typedef BomIterator_T<AirlineFeature,
- AirlineFeatureStructureMap_T::const_reverse_iterator> reverse_iterator;
- // /////////////////////////////////////////////////////////////////////////
-
- /** Define the booking class holder. */
- typedef BomChildrenHolderImp<AirlineFeature> AirlineFeatureHolder_T;
-
- public:
- // /////////// Iteration methods //////////
- /** Initialise the internal iterator on flight date:
- return the iterator at the begining of the map. */
- iterator begin () const;
-
- /** Initialise the internal iterator on flight date:
- return the iterator at the end of the map. */
- iterator end () const;
-
- /** Initialise the internal reverse iterator on flight date:
- return the reverse iterator at the rbegining of the map. */
- reverse_iterator rbegin () const;
-
- /** Initialise the internal reverse iterator on flight date:
- return the reverse iterator at the end of the map. */
- reverse_iterator rend () const;
-
- /** Retrieve, if existing, the AirlineFeature corresponding to the
- given key. */
- iterator find (const MapKey_T&) const;
-
- public:
- /** Default constructors. */
- AirlineFeatureMap_T ();
- AirlineFeatureMap_T (const AirlineFeatureMap_T&);
- AirlineFeatureMap_T (const AirlineFeatureHolder_T&);
-
- /** Destructor. */
- virtual ~AirlineFeatureMap_T();
-
- private:
- // Attributes
- /** Reference structure. */
- const AirlineFeatureHolder_T& _airlineFeatureHolder;
- };
-
-}
-#endif // __STDAIR_BOM_AIRLINEFEATUREMAP_HPP
-
Modified: trunk/stdair/stdair/bom/AirlineFeatureSet.cpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureSet.cpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/AirlineFeatureSet.cpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -7,8 +7,8 @@
#include <stdair/bom/AirlineFeatureSetStructure.hpp>
#include <stdair/bom/AirlineFeatureSet.hpp>
#include <stdair/bom/AirlineFeature.hpp>
-#include <stdair/bom/AirlineFeatureList.hpp>
-#include <stdair/bom/AirlineFeatureMap.hpp>
+#include <stdair/bom/BomList.hpp>
+#include <stdair/bom/BomMap.hpp>
namespace stdair {
Modified: trunk/stdair/stdair/bom/AirlineFeatureSet.hpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureSet.hpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/AirlineFeatureSet.hpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -15,8 +15,6 @@
class FacBomContent;
class AirlineFeature;
struct AirlineFeatureSetKey_T;
- struct AirlineFeatureList_T;
- struct AirlineFeatureMap_T;
/** Class representing the actual functional/business content
for the Bom root. */
Modified: trunk/stdair/stdair/bom/AirlineFeatureTypes.hpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureTypes.hpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/AirlineFeatureTypes.hpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -13,17 +13,25 @@
// Forward declarations.
template <typename BOM_CONTENT> class AirlineFeatureStructure;
+ template <typename BOM> struct BomList_T;
+ template <typename BOM> struct BomMap_T;
class AirlineFeature;
- /** Define the AirlineFeature structure. */
+ /** Define the airline feature structure. */
typedef AirlineFeatureStructure<AirlineFeature> AirlineFeatureStructure_T;
- /** Define the segment-cabin structure list. */
+ /** Define the airline feature structure list. */
typedef std::vector<AirlineFeatureStructure_T*> AirlineFeatureStructureList_T;
- /** Define the segment-cabin structure map. */
+ /** Define the airline feature structure map. */
typedef std::map<const std::string, AirlineFeatureStructure_T*> AirlineFeatureStructureMap_T;
+ /** Define the airline feature list. */
+ typedef BomList_T<AirlineFeature> AirlineFeatureList_T;
+
+ /** Define the airline feature map. */
+ typedef BomMap_T<AirlineFeature> AirlineFeatureMap_T;
+
}
#endif // __STDAIR_BOM_AIRLINEFEATURETYPES_HPP
Copied: trunk/stdair/stdair/bom/BomList.hpp (from rev 58, trunk/stdair/stdair/bom/InventoryList.hpp)
===================================================================
--- trunk/stdair/stdair/bom/BomList.hpp (rev 0)
+++ trunk/stdair/stdair/bom/BomList.hpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -0,0 +1,70 @@
+#ifndef __STDAIR_BOM_BOMLIST_HPP
+#define __STDAIR_BOM_BOMLIST_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+
+namespace stdair {
+
+ // Forward declarations
+ template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T;
+ template <typename BOM_CONTENT> class BomChildrenHolderImp;
+
+ /** Structure which handles the iterators for a bom list. */
+ template <typename BOM> struct BomList_T {
+
+ public:
+ /** Definition that allows to retrieve the corresponding BomStructure
+ associated to the BOM. */
+ typedef typename BOM::BomStructure_T BomStructure_T;
+ /** Define the list of bom objects. */
+ typedef std::vector<BomStructure_T*> BomStructureList_T;
+ /** Define the bom holder. */
+ typedef BomChildrenHolderImp<BOM> BomHolder_T;
+
+ // /////////////////////////////////////////////////////////////////////////
+ // See the explanations, within the stdair::BomContentRoot class, for all
+ // the iterator types specified below
+ // /////////////////////////////////////////////////////////////////////////
+ /** Define the bom list iterators. */
+ typedef BomIterator_T<BOM, typename BomStructureList_T::const_iterator> iterator;
+ typedef BomIterator_T<BOM, typename BomStructureList_T::const_reverse_iterator> reverse_iterator;
+ // /////////////////////////////////////////////////////////////////////////
+
+ public:
+ // /////////// Iteration methods //////////
+ /** Initialise the internal iterator on flight date:
+ return the iterator at the begining of the list. */
+ iterator begin () const { return _bomHolder.listBegin(); }
+
+ /** Initialise the internal iterator on flight date:
+ return the iterator at the end of the list. */
+ iterator end () const { return _bomHolder.listEnd(); }
+
+ /** Initialise the internal reverse iterator on flight date:
+ return the reverse iterator at the rbegining of the list. */
+ reverse_iterator rbegin () const { return _bomHolder.listRBegin(); }
+
+ /** Initialise the internal reverse iterator on flight date:
+ return the reverse iterator at the end of the list. */
+ reverse_iterator rend () const { return _bomHolder.listREnd(); }
+
+ public:
+ /** Default constructors. */
+ BomList_T ();
+ BomList_T (const BomList_T& iBomList) : _bomHolder (iBomList._bomHolder) { }
+ BomList_T (const BomHolder_T& iBomHolder) : _bomHolder (iBomHolder) { }
+
+ /** Destructor. */
+ ~BomList_T() { }
+
+ private:
+ // Attributes
+ /** Reference structure. */
+ const BomHolder_T& _bomHolder;
+ };
+
+}
+#endif // __STDAIR_BOM_BOMLIST_HPP
+
Copied: trunk/stdair/stdair/bom/BomMap.hpp (from rev 58, trunk/stdair/stdair/bom/InventoryList.hpp)
===================================================================
--- trunk/stdair/stdair/bom/BomMap.hpp (rev 0)
+++ trunk/stdair/stdair/bom/BomMap.hpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -0,0 +1,74 @@
+#ifndef __STDAIR_BOM_BOMMAP_HPP
+#define __STDAIR_BOM_BOMMAP_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+
+namespace stdair {
+
+ // Forward declarations
+ template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T;
+ template <typename BOM_CONTENT> class BomChildrenHolderImp;
+
+ /** Structure which handles the iterators for a bom map. */
+ template <typename BOM> struct BomMap_T {
+
+ public:
+ /** Definition that allows to retrieve the corresponding BomStructure
+ associated to the BOM. */
+ typedef typename BOM::BomStructure_T BomStructure_T;
+ /** Define the map of bom objects. */
+ typedef std::map<const MapKey_T, BomStructure_T*> BomStructureMap_T;
+ /** Define the bom holder. */
+ typedef BomChildrenHolderImp<BOM> BomHolder_T;
+
+ // /////////////////////////////////////////////////////////////////////////
+ // See the explanations, within the stdair::BomContentRoot class, for all
+ // the iterator types specified below
+ // /////////////////////////////////////////////////////////////////////////
+ /** Define the bom map iterators. */
+ typedef BomIterator_T<BOM, typename BomStructureMap_T::const_iterator> iterator;
+ typedef BomIterator_T<BOM, typename BomStructureMap_T::const_reverse_iterator> reverse_iterator;
+ // /////////////////////////////////////////////////////////////////////////
+
+ public:
+ // /////////// Iteration methods //////////
+ /** Initialise the internal iterator on flight date:
+ return the iterator at the begining of the map. */
+ iterator begin () const { return _bomHolder.mapBegin(); }
+
+ /** Initialise the internal iterator on flight date:
+ return the iterator at the end of the map. */
+ iterator end () const { return _bomHolder.mapEnd(); }
+
+ /** Initialise the internal reverse iterator on flight date:
+ return the reverse iterator at the rbegining of the map. */
+ reverse_iterator rbegin () const { return _bomHolder.mapRBegin(); }
+
+ /** Initialise the internal reverse iterator on flight date:
+ return the reverse iterator at the end of the map. */
+ reverse_iterator rend () const { return _bomHolder.mapREnd(); }
+
+ /** Retrieve, if existing, the Inventory corresponding to the
+ given key. */
+ iterator find (const MapKey_T& iKey) const { return _bomHolder.find (iKey); }
+
+ public:
+ /** Default constructors. */
+ BomMap_T ();
+ BomMap_T (const BomMap_T& iBomMap) : _bomHolder (iBomMap._bomHolder) { }
+ BomMap_T (const BomHolder_T& iBomHolder) : _bomHolder (iBomHolder) { }
+
+ /** Destructor. */
+ ~BomMap_T() { }
+
+ private:
+ // Attributes
+ /** Reference structure. */
+ const BomHolder_T& _bomHolder;
+ };
+
+}
+#endif // __STDAIR_BOM_BOMMAP_HPP
+
Modified: trunk/stdair/stdair/bom/BomRoot.cpp
===================================================================
--- trunk/stdair/stdair/bom/BomRoot.cpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/BomRoot.cpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -6,9 +6,9 @@
// STDAIR
#include <stdair/bom/BomRootStructure.hpp>
#include <stdair/bom/BomRoot.hpp>
+#include <stdair/bom/BomList.hpp>
+#include <stdair/bom/BomMap.hpp>
#include <stdair/bom/Inventory.hpp>
-#include <stdair/bom/InventoryList.hpp>
-#include <stdair/bom/InventoryMap.hpp>
namespace stdair {
Modified: trunk/stdair/stdair/bom/BomRoot.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomRoot.hpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/BomRoot.hpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -15,8 +15,6 @@
class FacBomContent;
class AirlineFeatureSet;
struct BomRootKey_T;
- struct InventoryList_T;
- struct InventoryMap_T;
/** Class representing the actual functional/business content
for the Bom root. */
Modified: trunk/stdair/stdair/bom/BookingClass.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClass.hpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/BookingClass.hpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -15,8 +15,6 @@
// Forward declarations
class FacBomContent;
struct BookingClassKey_T;
- struct BookingClassList_T;
- struct BookingClassMap_T;
/** Class representing the actual functional/business content for a
segment-cabin. */
Deleted: trunk/stdair/stdair/bom/BookingClassList.cpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClassList.cpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/BookingClassList.cpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -1,50 +0,0 @@
-// //////////////////////////////////////////////////////////////////////
-// Import section
-// //////////////////////////////////////////////////////////////////////
-// STL
-#include <cassert>
-// STDAIR
-#include <stdair/bom/BomChildrenHolderImp.hpp>
-#include <stdair/bom/BookingClass.hpp>
-#include <stdair/bom/BookingClassList.hpp>
-
-namespace stdair {
-
- // ////////////////////////////////////////////////////////////////////
- BookingClassList_T::
- BookingClassList_T (const BookingClassHolder_T& iBookingClassHolder)
- : _bookingClassHolder (iBookingClassHolder) {
- }
-
- // ////////////////////////////////////////////////////////////////////
- BookingClassList_T::
- BookingClassList_T (const BookingClassList_T& iBCList)
- : _bookingClassHolder (iBCList._bookingClassHolder) {
- }
-
- // ////////////////////////////////////////////////////////////////////
- BookingClassList_T::~BookingClassList_T () {
- }
-
- // //////////////////////////////////////////////////////////////////////
- BookingClassList_T::iterator BookingClassList_T::begin () const {
- return _bookingClassHolder.listBegin ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- BookingClassList_T::iterator BookingClassList_T::end () const {
- return _bookingClassHolder.listEnd ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- BookingClassList_T::reverse_iterator BookingClassList_T::rbegin () const {
- return _bookingClassHolder.listRBegin ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- BookingClassList_T::reverse_iterator BookingClassList_T::rend () const {
- return _bookingClassHolder.listREnd ();
- }
-
-}
-
Deleted: trunk/stdair/stdair/bom/BookingClassList.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClassList.hpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/BookingClassList.hpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -1,70 +0,0 @@
-#ifndef __STDAIR_BOM_BOOKINGCLASSLIST_HPP
-#define __STDAIR_BOM_BOOKINGCLASSLIST_HPP
-
-// //////////////////////////////////////////////////////////////////////
-// Import section
-// //////////////////////////////////////////////////////////////////////
-// STDAIR
-#include <stdair/bom/BookingClassTypes.hpp>
-
-namespace stdair {
-
- // Forward declarations
- template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T;
- template <typename BOM_STRUCTURE> class BomChildrenHolderImp;
- class BookingClass;
-
- /** Structure which handles the iterators for a booking class list. */
- struct BookingClassList_T {
-
- public:
- // /////////////////////////////////////////////////////////////////////////
- // See the explanations, within the stdair::BomContentRoot class, for all
- // the iterator types specified below
- // /////////////////////////////////////////////////////////////////////////
- /** Define the booking class list iterators. */
- typedef BomIterator_T<BookingClass,
- BookingClassStructureList_T::const_iterator> iterator;
- typedef BomIterator_T<BookingClass,
- BookingClassStructureList_T::const_reverse_iterator> reverse_iterator;
- // /////////////////////////////////////////////////////////////////////////
-
- /** Define the booking class holder. */
- typedef BomChildrenHolderImp<BookingClass> BookingClassHolder_T;
-
- public:
- // /////////// Iteration methods //////////
- /** Initialise the internal iterator on flight date:
- return the iterator at the begining of the list. */
- iterator begin () const;
-
- /** Initialise the internal iterator on flight date:
- return the iterator at the end of the list. */
- iterator end () const;
-
- /** Initialise the internal reverse iterator on flight date:
- return the reverse iterator at the rbegining of the list. */
- reverse_iterator rbegin () const;
-
- /** Initialise the internal reverse iterator on flight date:
- return the reverse iterator at the end of the list. */
- reverse_iterator rend () const;
-
- public:
- /** Default constructors. */
- BookingClassList_T ();
- BookingClassList_T (const BookingClassList_T&);
- BookingClassList_T (const BookingClassHolder_T&);
-
- /** Destructor. */
- virtual ~BookingClassList_T();
-
- private:
- // Attributes
- /** Reference structure. */
- const BookingClassHolder_T& _bookingClassHolder;
- };
-
-}
-#endif // __STDAIR_BOM_BOOKINGCLASSLIST_HPP
-
Deleted: trunk/stdair/stdair/bom/BookingClassMap.cpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClassMap.cpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/BookingClassMap.cpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -1,56 +0,0 @@
-// //////////////////////////////////////////////////////////////////////
-// Import section
-// //////////////////////////////////////////////////////////////////////
-// STL
-#include <cassert>
-// STDAIR
-#include <stdair/bom/BomChildrenHolderImp.hpp>
-#include <stdair/bom/BookingClass.hpp>
-#include <stdair/bom/BookingClassMap.hpp>
-
-namespace stdair {
-
- // ////////////////////////////////////////////////////////////////////
- BookingClassMap_T::
- BookingClassMap_T (const BookingClassHolder_T& iBookingClassHolder)
- : _bookingClassHolder (iBookingClassHolder) {
- }
-
- // ////////////////////////////////////////////////////////////////////
- BookingClassMap_T::
- BookingClassMap_T (const BookingClassMap_T& iBCMap)
- : _bookingClassHolder (iBCMap._bookingClassHolder) {
- }
-
- // ////////////////////////////////////////////////////////////////////
- BookingClassMap_T::~BookingClassMap_T () {
- }
-
- // //////////////////////////////////////////////////////////////////////
- BookingClassMap_T::iterator BookingClassMap_T::begin () const {
- return _bookingClassHolder.mapBegin ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- BookingClassMap_T::iterator BookingClassMap_T::end () const {
- return _bookingClassHolder.mapEnd ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- BookingClassMap_T::reverse_iterator BookingClassMap_T::rbegin () const {
- return _bookingClassHolder.mapRBegin ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- BookingClassMap_T::reverse_iterator BookingClassMap_T::rend () const {
- return _bookingClassHolder.mapREnd ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- BookingClassMap_T::
- iterator BookingClassMap_T::find (const MapKey_T& iKey) const {
- return _bookingClassHolder.find (iKey);
- }
-
-}
-
Deleted: trunk/stdair/stdair/bom/BookingClassMap.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClassMap.hpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/BookingClassMap.hpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -1,74 +0,0 @@
-#ifndef __STDAIR_BOM_BOOKINGCLASSMAP_HPP
-#define __STDAIR_BOM_BOOKINGCLASSMAP_HPP
-
-// //////////////////////////////////////////////////////////////////////
-// Import section
-// //////////////////////////////////////////////////////////////////////
-// STDAIR
-#include <stdair/bom/BookingClassTypes.hpp>
-
-namespace stdair {
-
- // Forward declarations
- template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T;
- template <typename BOM_STRUCTURE> class BomChildrenHolderImp;
- class BookingClass;
-
- /** Structure which handles the iterators for a booking class map. */
- struct BookingClassMap_T {
-
- public:
- // /////////////////////////////////////////////////////////////////////////
- // See the explanations, within the stdair::BomContentRoot class, for all
- // the iterator types specified below
- // /////////////////////////////////////////////////////////////////////////
- /** Define the booking class map iterators. */
- typedef BomIterator_T<BookingClass,
- BookingClassStructureMap_T::const_iterator> iterator;
- typedef BomIterator_T<BookingClass,
- BookingClassStructureMap_T::const_reverse_iterator> reverse_iterator;
- // /////////////////////////////////////////////////////////////////////////
-
- /** Define the booking class holder. */
- typedef BomChildrenHolderImp<BookingClass> BookingClassHolder_T;
-
- public:
- // /////////// Iteration methods //////////
- /** Initialise the internal iterator on flight date:
- return the iterator at the begining of the map. */
- iterator begin () const;
-
- /** Initialise the internal iterator on flight date:
- return the iterator at the end of the map. */
- iterator end () const;
-
- /** Initialise the internal reverse iterator on flight date:
- return the reverse iterator at the rbegining of the map. */
- reverse_iterator rbegin () const;
-
- /** Initialise the internal reverse iterator on flight date:
- return the reverse iterator at the end of the map. */
- reverse_iterator rend () const;
-
- /** Retrieve, if existing, the BookingClass corresponding to the
- given key. */
- iterator find (const MapKey_T&) const;
-
- public:
- /** Default constructors. */
- BookingClassMap_T ();
- BookingClassMap_T (const BookingClassMap_T&);
- BookingClassMap_T (const BookingClassHolder_T&);
-
- /** Destructor. */
- virtual ~BookingClassMap_T();
-
- private:
- // Attributes
- /** Reference structure. */
- const BookingClassHolder_T& _bookingClassHolder;
- };
-
-}
-#endif // __STDAIR_BOM_BOOKINGCLASSMAP_HPP
-
Modified: trunk/stdair/stdair/bom/BookingClassTypes.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClassTypes.hpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/BookingClassTypes.hpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -13,17 +13,24 @@
// Forward declarations.
template <typename BOM_CONTENT> class BookingClassStructure;
+ template <typename BOM> struct BomList_T;
+ template <typename BOM> struct BomMap_T;
class BookingClass;
- /** Define the BookingClass structure. */
+ /** Define the booking class structure. */
typedef BookingClassStructure<BookingClass> BookingClassStructure_T;
- /** Define the segment-cabin structure list. */
+ /** Define the booking class structure list. */
typedef std::vector<BookingClassStructure_T*> BookingClassStructureList_T;
- /** Define the segment-cabin structure map. */
+ /** Define the booking class structure map. */
typedef std::map<const std::string, BookingClassStructure_T*> BookingClassStructureMap_T;
+ /** Define the booking class list. */
+ typedef BomList_T<BookingClass> BookingClassList_T;
+
+ /** Define the booking class map. */
+ typedef BomMap_T<BookingClass> BookingClassMap_T;
}
#endif // __STDAIR_BOM_BOOKINGCLASSTYPES_HPP
Modified: trunk/stdair/stdair/bom/FlightDate.cpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDate.cpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/FlightDate.cpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -10,11 +10,9 @@
#include <stdair/bom/FlightDateStructure.hpp>
#include <stdair/bom/FlightDate.hpp>
#include <stdair/bom/SegmentDate.hpp>
-#include <stdair/bom/SegmentDateList.hpp>
-#include <stdair/bom/SegmentDateMap.hpp>
#include <stdair/bom/LegDate.hpp>
-#include <stdair/bom/LegDateList.hpp>
-#include <stdair/bom/LegDateMap.hpp>
+#include <stdair/bom/BomList.hpp>
+#include <stdair/bom/BomMap.hpp>
namespace stdair {
Modified: trunk/stdair/stdair/bom/FlightDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDate.hpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -16,10 +16,6 @@
// Forward declarations
class FacBomContent;
struct FlightDateKey_T;
- struct SegmentDateList_T;
- struct SegmentDateMap_T;
- struct LegDateList_T;
- struct LegDateMap_T;
/** Class representing the actual functional/business content for a
flight-date. */
Deleted: trunk/stdair/stdair/bom/FlightDateList.cpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDateList.cpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/FlightDateList.cpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -1,50 +0,0 @@
-// //////////////////////////////////////////////////////////////////////
-// Import section
-// //////////////////////////////////////////////////////////////////////
-// STL
-#include <cassert>
-// STDAIR
-#include <stdair/bom/BomChildrenHolderImp.hpp>
-#include <stdair/bom/FlightDate.hpp>
-#include <stdair/bom/FlightDateList.hpp>
-
-namespace stdair {
-
- // ////////////////////////////////////////////////////////////////////
- FlightDateList_T::
- FlightDateList_T (const FlightDateHolder_T& iFlightDateHolder)
- : _flightDateHolder (iFlightDateHolder) {
- }
-
- // ////////////////////////////////////////////////////////////////////
- FlightDateList_T::
- FlightDateList_T (const FlightDateList_T& iFDList)
- : _flightDateHolder (iFDList._flightDateHolder) {
- }
-
- // ////////////////////////////////////////////////////////////////////
- FlightDateList_T::~FlightDateList_T () {
- }
-
- // //////////////////////////////////////////////////////////////////////
- FlightDateList_T::iterator FlightDateList_T::begin () const {
- return _flightDateHolder.listBegin ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- FlightDateList_T::iterator FlightDateList_T::end () const {
- return _flightDateHolder.listEnd ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- FlightDateList_T::reverse_iterator FlightDateList_T::rbegin () const {
- return _flightDateHolder.listRBegin ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- FlightDateList_T::reverse_iterator FlightDateList_T::rend () const {
- return _flightDateHolder.listREnd ();
- }
-
-}
-
Deleted: trunk/stdair/stdair/bom/FlightDateList.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDateList.hpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/FlightDateList.hpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -1,70 +0,0 @@
-#ifndef __STDAIR_BOM_FLIGHTDATELIST_HPP
-#define __STDAIR_BOM_FLIGHTDATELIST_HPP
-
-// //////////////////////////////////////////////////////////////////////
-// Import section
-// //////////////////////////////////////////////////////////////////////
-// STDAIR
-#include <stdair/bom/FlightDateTypes.hpp>
-
-namespace stdair {
-
- // Forward declarations
- template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T;
- template <typename BOM_STRUCTURE> class BomChildrenHolderImp;
- class FlightDate;
-
- /** Structure which handles the iterators for a flight-date list. */
- struct FlightDateList_T {
-
- public:
- // /////////////////////////////////////////////////////////////////////////
- // See the explanations, within the stdair::BomContentRoot class, for all
- // the iterator types specified below
- // /////////////////////////////////////////////////////////////////////////
- /** Define the flight-date list iterators. */
- typedef BomIterator_T<FlightDate,
- FlightDateStructureList_T::const_iterator> iterator;
- typedef BomIterator_T<FlightDate,
- FlightDateStructureList_T::const_reverse_iterator> reverse_iterator;
- // /////////////////////////////////////////////////////////////////////////
-
- /** Define the flight-date holder. */
- typedef BomChildrenHolderImp<FlightDate> FlightDateHolder_T;
-
- public:
- // /////////// Iteration methods //////////
- /** Initialise the internal iterator on flight date:
- return the iterator at the begining of the list. */
- iterator begin () const;
-
- /** Initialise the internal iterator on flight date:
- return the iterator at the end of the list. */
- iterator end () const;
-
- /** Initialise the internal reverse iterator on flight date:
- return the reverse iterator at the rbegining of the list. */
- reverse_iterator rbegin () const;
-
- /** Initialise the internal reverse iterator on flight date:
- return the reverse iterator at the end of the list. */
- reverse_iterator rend () const;
-
- public:
- /** Default constructors. */
- FlightDateList_T ();
- FlightDateList_T (const FlightDateList_T&);
- FlightDateList_T (const FlightDateHolder_T&);
-
- /** Destructor. */
- virtual ~FlightDateList_T();
-
- private:
- // Attributes
- /** Reference structure. */
- const FlightDateHolder_T& _flightDateHolder;
- };
-
-}
-#endif // __STDAIR_BOM_FLIGHTDATELIST_HPP
-
Deleted: trunk/stdair/stdair/bom/FlightDateMap.cpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDateMap.cpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/FlightDateMap.cpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -1,56 +0,0 @@
-// //////////////////////////////////////////////////////////////////////
-// Import section
-// //////////////////////////////////////////////////////////////////////
-// STL
-#include <cassert>
-// STDAIR
-#include <stdair/bom/BomChildrenHolderImp.hpp>
-#include <stdair/bom/FlightDate.hpp>
-#include <stdair/bom/FlightDateMap.hpp>
-
-namespace stdair {
-
- // ////////////////////////////////////////////////////////////////////
- FlightDateMap_T::
- FlightDateMap_T (const FlightDateHolder_T& iFlightDateHolder)
- : _flightDateHolder (iFlightDateHolder) {
- }
-
- // ////////////////////////////////////////////////////////////////////
- FlightDateMap_T::
- FlightDateMap_T (const FlightDateMap_T& iFDMap)
- : _flightDateHolder (iFDMap._flightDateHolder) {
- }
-
- // ////////////////////////////////////////////////////////////////////
- FlightDateMap_T::~FlightDateMap_T () {
- }
-
- // //////////////////////////////////////////////////////////////////////
- FlightDateMap_T::iterator FlightDateMap_T::begin () const {
- return _flightDateHolder.mapBegin ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- FlightDateMap_T::iterator FlightDateMap_T::end () const {
- return _flightDateHolder.mapEnd ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- FlightDateMap_T::reverse_iterator FlightDateMap_T::rbegin () const {
- return _flightDateHolder.mapRBegin ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- FlightDateMap_T::reverse_iterator FlightDateMap_T::rend () const {
- return _flightDateHolder.mapREnd ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- FlightDateMap_T::
- iterator FlightDateMap_T::find (const MapKey_T& iKey) const {
- return _flightDateHolder.find (iKey);
- }
-
-}
-
Deleted: trunk/stdair/stdair/bom/FlightDateMap.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDateMap.hpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/FlightDateMap.hpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -1,74 +0,0 @@
-#ifndef __STDAIR_BOM_FLIGHTDATEMAP_HPP
-#define __STDAIR_BOM_FLIGHTDATEMAP_HPP
-
-// //////////////////////////////////////////////////////////////////////
-// Import section
-// //////////////////////////////////////////////////////////////////////
-// STDAIR
-#include <stdair/bom/FlightDateTypes.hpp>
-
-namespace stdair {
-
- // Forward declarations
- template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T;
- template <typename BOM_STRUCTURE> class BomChildrenHolderImp;
- class FlightDate;
-
- /** Structure which handles the iterators for a flight-date map. */
- struct FlightDateMap_T {
-
- public:
- // /////////////////////////////////////////////////////////////////////////
- // See the explanations, within the stdair::BomContentRoot class, for all
- // the iterator types specified below
- // /////////////////////////////////////////////////////////////////////////
- /** Define the flight-date map iterators. */
- typedef BomIterator_T<FlightDate,
- FlightDateStructureMap_T::const_iterator> iterator;
- typedef BomIterator_T<FlightDate,
- FlightDateStructureMap_T::const_reverse_iterator> reverse_iterator;
- // /////////////////////////////////////////////////////////////////////////
-
- /** Define the flight-date holder. */
- typedef BomChildrenHolderImp<FlightDate> FlightDateHolder_T;
-
- public:
- // /////////// Iteration methods //////////
- /** Initialise the internal iterator on flight date:
- return the iterator at the begining of the map. */
- iterator begin () const;
-
- /** Initialise the internal iterator on flight date:
- return the iterator at the end of the map. */
- iterator end () const;
-
- /** Initialise the internal reverse iterator on flight date:
- return the reverse iterator at the rbegining of the map. */
- reverse_iterator rbegin () const;
-
- /** Initialise the internal reverse iterator on flight date:
- return the reverse iterator at the end of the map. */
- reverse_iterator rend () const;
-
- /** Retrieve, if existing, the FlightDate corresponding to the
- given key. */
- iterator find (const MapKey_T&) const;
-
- public:
- /** Default constructors. */
- FlightDateMap_T ();
- FlightDateMap_T (const FlightDateMap_T&);
- FlightDateMap_T (const FlightDateHolder_T&);
-
- /** Destructor. */
- virtual ~FlightDateMap_T();
-
- private:
- // Attributes
- /** Reference structure. */
- const FlightDateHolder_T& _flightDateHolder;
- };
-
-}
-#endif // __STDAIR_BOM_FLIGHTDATEMAP_HPP
-
Modified: trunk/stdair/stdair/bom/FlightDateTypes.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDateTypes.hpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/FlightDateTypes.hpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -13,6 +13,8 @@
// Forward declarations.
template <typename BOM_CONTENT> class FlightDateStructure;
+ template <typename BOM> struct BomList_T;
+ template <typename BOM> struct BomMap_T;
class FlightDate;
/** Define the FlightDate structure. */
@@ -24,6 +26,11 @@
/** Define the flight-date structure map. */
typedef std::map<const std::string, FlightDateStructure_T*> FlightDateStructureMap_T;
+ /** Define the flight-date list. */
+ typedef BomList_T<FlightDate> FlightDateList_T;
+
+ /** Define the flight-date map. */
+ typedef BomMap_T<FlightDate> FlightDateMap_T;
}
#endif // __STDAIR_BOM_FLIGHTDATETYPES_HPP
Modified: trunk/stdair/stdair/bom/Inventory.cpp
===================================================================
--- trunk/stdair/stdair/bom/Inventory.cpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/Inventory.cpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -7,8 +7,8 @@
#include <stdair/bom/InventoryStructure.hpp>
#include <stdair/bom/Inventory.hpp>
#include <stdair/bom/FlightDate.hpp>
-#include <stdair/bom/FlightDateList.hpp>
-#include <stdair/bom/FlightDateMap.hpp>
+#include <stdair/bom/BomList.hpp>
+#include <stdair/bom/BomMap.hpp>
namespace stdair {
@@ -34,6 +34,7 @@
// //////////////////////////////////////////////////////////////////////
std::string Inventory::toString() const {
std::ostringstream oStr;
+ oStr << _key.toString();
return oStr.str();
}
Modified: trunk/stdair/stdair/bom/Inventory.hpp
===================================================================
--- trunk/stdair/stdair/bom/Inventory.hpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/Inventory.hpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -10,15 +10,13 @@
#include <stdair/bom/InventoryTypes.hpp>
#include <stdair/bom/FlightDateTypes.hpp>
#include <stdair/bom/InventoryContent.hpp>
-#include <stdair/bom/BookingClassMap.hpp>
namespace stdair {
// Forward declarations
class FacBomContent;
class AirlineFeature;
+ class BookingClass;
struct InventoryKey_T;
- struct FlightDateList_T;
- struct FlightDateMap_T;
/** Class representing the actual functional/business content for
an airline inventory. */
@@ -43,6 +41,9 @@
/** Definition allowing to retrieve the associated BOM content child
type. */
typedef FlightDate ContentChild_T;
+
+ /** Definition allowing to retrieve the specific BookingClass type. */
+ typedef BookingClass BookingClassContent_T;
// /////////////////////////////////////////////////////////////////////////
public:
@@ -138,7 +139,7 @@
const AirlineFeature* _airlineFeature;
/** List of booking classes. */
- //BookingClassMap_T _bookingClassList;
+ //BookingClassHolder_T _bookingClassList;
};
}
Deleted: trunk/stdair/stdair/bom/InventoryList.cpp
===================================================================
--- trunk/stdair/stdair/bom/InventoryList.cpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/InventoryList.cpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -1,50 +0,0 @@
-// //////////////////////////////////////////////////////////////////////
-// Import section
-// //////////////////////////////////////////////////////////////////////
-// STL
-#include <cassert>
-// STDAIR
-#include <stdair/bom/BomChildrenHolderImp.hpp>
-#include <stdair/bom/Inventory.hpp>
-#include <stdair/bom/InventoryList.hpp>
-
-namespace stdair {
-
- // ////////////////////////////////////////////////////////////////////
- InventoryList_T::
- InventoryList_T (const InventoryHolder_T& iInventoryHolder)
- : _inventoryHolder (iInventoryHolder) {
- }
-
- // ////////////////////////////////////////////////////////////////////
- InventoryList_T::
- InventoryList_T (const InventoryList_T& iINVList)
- : _inventoryHolder (iINVList._inventoryHolder) {
- }
-
- // ////////////////////////////////////////////////////////////////////
- InventoryList_T::~InventoryList_T () {
- }
-
- // //////////////////////////////////////////////////////////////////////
- InventoryList_T::iterator InventoryList_T::begin () const {
- return _inventoryHolder.listBegin ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- InventoryList_T::iterator InventoryList_T::end () const {
- return _inventoryHolder.listEnd ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- InventoryList_T::reverse_iterator InventoryList_T::rbegin () const {
- return _inventoryHolder.listRBegin ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- InventoryList_T::reverse_iterator InventoryList_T::rend () const {
- return _inventoryHolder.listREnd ();
- }
-
-}
-
Deleted: trunk/stdair/stdair/bom/InventoryList.hpp
===================================================================
--- trunk/stdair/stdair/bom/InventoryList.hpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/InventoryList.hpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -1,70 +0,0 @@
-#ifndef __STDAIR_BOM_INVENTORYLIST_HPP
-#define __STDAIR_BOM_INVENTORYLIST_HPP
-
-// //////////////////////////////////////////////////////////////////////
-// Import section
-// //////////////////////////////////////////////////////////////////////
-// STDAIR
-#include <stdair/bom/InventoryTypes.hpp>
-
-namespace stdair {
-
- // Forward declarations
- template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T;
- template <typename BOM_STRUCTURE> class BomChildrenHolderImp;
- class Inventory;
-
- /** Structure which handles the iterators for a inventory list. */
- struct InventoryList_T {
-
- public:
- // /////////////////////////////////////////////////////////////////////////
- // See the explanations, within the stdair::BomContentRoot class, for all
- // the iterator types specified below
- // /////////////////////////////////////////////////////////////////////////
- /** Define the inventory list iterators. */
- typedef BomIterator_T<Inventory,
- InventoryStructureList_T::const_iterator> iterator;
- typedef BomIterator_T<Inventory,
- InventoryStructureList_T::const_reverse_iterator> reverse_iterator;
- // /////////////////////////////////////////////////////////////////////////
-
- /** Define the inventory holder. */
- typedef BomChildrenHolderImp<Inventory> InventoryHolder_T;
-
- public:
- // /////////// Iteration methods //////////
- /** Initialise the internal iterator on flight date:
- return the iterator at the begining of the list. */
- iterator begin () const;
-
- /** Initialise the internal iterator on flight date:
- return the iterator at the end of the list. */
- iterator end () const;
-
- /** Initialise the internal reverse iterator on flight date:
- return the reverse iterator at the rbegining of the list. */
- reverse_iterator rbegin () const;
-
- /** Initialise the internal reverse iterator on flight date:
- return the reverse iterator at the end of the list. */
- reverse_iterator rend () const;
-
- public:
- /** Default constructors. */
- InventoryList_T ();
- InventoryList_T (const InventoryList_T&);
- InventoryList_T (const InventoryHolder_T&);
-
- /** Destructor. */
- virtual ~InventoryList_T();
-
- private:
- // Attributes
- /** Reference structure. */
- const InventoryHolder_T& _inventoryHolder;
- };
-
-}
-#endif // __STDAIR_BOM_INVENTORYLIST_HPP
-
Deleted: trunk/stdair/stdair/bom/InventoryMap.cpp
===================================================================
--- trunk/stdair/stdair/bom/InventoryMap.cpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/InventoryMap.cpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -1,56 +0,0 @@
-// //////////////////////////////////////////////////////////////////////
-// Import section
-// //////////////////////////////////////////////////////////////////////
-// STL
-#include <cassert>
-// STDAIR
-#include <stdair/bom/BomChildrenHolderImp.hpp>
-#include <stdair/bom/Inventory.hpp>
-#include <stdair/bom/InventoryMap.hpp>
-
-namespace stdair {
-
- // ////////////////////////////////////////////////////////////////////
- InventoryMap_T::
- InventoryMap_T (const InventoryHolder_T& iInventoryHolder)
- : _inventoryHolder (iInventoryHolder) {
- }
-
- // ////////////////////////////////////////////////////////////////////
- InventoryMap_T::
- InventoryMap_T (const InventoryMap_T& iINVMap)
- : _inventoryHolder (iINVMap._inventoryHolder) {
- }
-
- // ////////////////////////////////////////////////////////////////////
- InventoryMap_T::~InventoryMap_T () {
- }
-
- // //////////////////////////////////////////////////////////////////////
- InventoryMap_T::iterator InventoryMap_T::begin () const {
- return _inventoryHolder.mapBegin ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- InventoryMap_T::iterator InventoryMap_T::end () const {
- return _inventoryHolder.mapEnd ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- InventoryMap_T::reverse_iterator InventoryMap_T::rbegin () const {
- return _inventoryHolder.mapRBegin ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- InventoryMap_T::reverse_iterator InventoryMap_T::rend () const {
- return _inventoryHolder.mapREnd ();
- }
-
- // //////////////////////////////////////////////////////////////////////
- InventoryMap_T::
- iterator InventoryMap_T::find (const MapKey_T& iKey) const {
- return _inventoryHolder.find (iKey);
- }
-
-}
-
Deleted: trunk/stdair/stdair/bom/InventoryMap.hpp
===================================================================
--- trunk/stdair/stdair/bom/InventoryMap.hpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/stdair/bom/InventoryMap.hpp 2009-11-05 10:54:06 UTC (rev 60)
@@ -1,74 +0,0 @@
-#ifndef __STDAIR_BOM_INVENTORYMAP_HPP
-#define __STDAIR_BOM_INVENTORYMAP_HPP
-
-// //////////////////////////////////////////////////////////////////////
-// Import section
-// //////////////////////////////////////////////////////////////////////
-// STDAIR
-#include <stdair/bom/InventoryTypes.hpp>
-
-namespace stdair {
-
- // Forward declarations
- template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T;
- template <typename BOM_STRUCTURE> class BomChildrenHolderImp;
- class Inventory;
-
- /** Structure which handles the iterators for a inventory map. */
- struct InventoryMap_T {
-
- public:
- // /////////////////////////////////////////////////////////////////////////
- // See the explanations, within the stdair::BomContentRoot class, for all
- // the iterator types specified below
- // /////////////////////////////////////////////////////////////////////////
- /** Define the inventory map iterators. */
- typedef BomIterator_T<Inventory,
- InventoryStructureMap_T::const_iterator> iterator;
- typedef BomIterator_T<Inventory,
- InventoryStructureMap_T::const_reverse_iterator> reverse_iterator;
- // /////////////////////////////////////////////////////////////////////////
-
- /** Define the inventory holder. */
- typedef BomChildrenHolderImp<Inventory> InventoryHolder_T;
-
- public:
- // /////////// Iteration methods //////////
- /** Initialise the internal iterator on flight date:
- return the iterator at the begining of the map. */
- iterator begin () const;
-
- /** Initialise the internal iterator on flight date:
- return the iterator at the end of the map. */
- iterator end () const;
-
- /** Initialise the internal reverse iterator on flight date:
- return the reverse iterator at the rbegining of the map. */
- reverse_iterator rbegin () const;
-
- /** Initialise the internal reverse iterator on flight date:
- return the reverse iterator at the end of the map. */
- reverse_iterator rend () const;
-
- /** Retrieve, if existing, the Inventory corresponding to the
- given key. */
- iterator find (const MapKey_T&) const;
-
- public:
- /** Default constructors. */
- InventoryMap_T ();
- InventoryMap_T (const InventoryMap_T&);
- InventoryMap_T (const InventoryHolder_T&);
-
- /** Destructor. */
- virtual ~InventoryMap_T();
-
- private:
- // Attributes
- /** Reference structure. */
- const InventoryHolder_T& _inventoryHolder;
- };
-
-}
-#endif // __STDAIR_BOM_INVENTORYMAP_HPP
-
Modified: trunk/stdair/stdair/bom/InventoryStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-11-04 10:39:37 UTC (rev 59)
+++ trunk/stdair/s...
[truncated message content] |
|
From: <qua...@us...> - 2009-11-04 10:39:53
|
Revision: 59
http://stdair.svn.sourceforge.net/stdair/?rev=59&view=rev
Author: quannaus
Date: 2009-11-04 10:39:37 +0000 (Wed, 04 Nov 2009)
Log Message:
-----------
[dev] added some objects.
Modified Paths:
--------------
trunk/stdair/stdair/basic/sources.mk
trunk/stdair/stdair/bom/AirlineFeatureMap.cpp
trunk/stdair/stdair/bom/BomRoot.hpp
trunk/stdair/stdair/bom/BookingClass.hpp
trunk/stdair/stdair/bom/BookingClassContent.cpp
trunk/stdair/stdair/bom/BookingClassContent.hpp
trunk/stdair/stdair/bom/BookingClassMap.cpp
trunk/stdair/stdair/bom/BookingClassMap.hpp
trunk/stdair/stdair/bom/FlightDate.hpp
trunk/stdair/stdair/bom/FlightDateContent.cpp
trunk/stdair/stdair/bom/FlightDateContent.hpp
trunk/stdair/stdair/bom/FlightDateMap.cpp
trunk/stdair/stdair/bom/FlightDateMap.hpp
trunk/stdair/stdair/bom/Inventory.cpp
trunk/stdair/stdair/bom/Inventory.hpp
trunk/stdair/stdair/bom/InventoryMap.cpp
trunk/stdair/stdair/bom/InventoryMap.hpp
trunk/stdair/stdair/bom/LegCabin.cpp
trunk/stdair/stdair/bom/LegCabin.hpp
trunk/stdair/stdair/bom/LegCabinContent.cpp
trunk/stdair/stdair/bom/LegCabinContent.hpp
trunk/stdair/stdair/bom/LegCabinMap.cpp
trunk/stdair/stdair/bom/LegCabinMap.hpp
trunk/stdair/stdair/bom/LegDate.hpp
trunk/stdair/stdair/bom/LegDateContent.cpp
trunk/stdair/stdair/bom/LegDateContent.hpp
trunk/stdair/stdair/bom/LegDateMap.cpp
trunk/stdair/stdair/bom/LegDateMap.hpp
trunk/stdair/stdair/bom/OptimizerStruct.cpp
trunk/stdair/stdair/bom/SegmentCabin.hpp
trunk/stdair/stdair/bom/SegmentCabinContent.cpp
trunk/stdair/stdair/bom/SegmentCabinContent.hpp
trunk/stdair/stdair/bom/SegmentCabinMap.cpp
trunk/stdair/stdair/bom/SegmentCabinMap.hpp
trunk/stdair/stdair/bom/SegmentDate.cpp
trunk/stdair/stdair/bom/SegmentDate.hpp
trunk/stdair/stdair/bom/SegmentDateContent.cpp
trunk/stdair/stdair/bom/SegmentDateContent.hpp
trunk/stdair/stdair/bom/SegmentDateMap.cpp
trunk/stdair/stdair/bom/SegmentDateMap.hpp
trunk/stdair/stdair/bom/sources.mk
trunk/stdair/stdair/core/Makefile.am
trunk/stdair/stdair/factory/FacBomStructure.hpp
Added Paths:
-----------
trunk/stdair/stdair/basic/BasConst.cpp
trunk/stdair/stdair/basic/BasConst_BookingClass.hpp
trunk/stdair/stdair/basic/BasConst_Inventory.hpp
trunk/stdair/stdair/basic/BasConst_Period_BOM.hpp
trunk/stdair/stdair/basic/BasConst_WorldSchedule.hpp
trunk/stdair/stdair/basic/BasConst_Yield.hpp
trunk/stdair/stdair/bom/DoWStruct.cpp
trunk/stdair/stdair/bom/DoWStruct.hpp
trunk/stdair/stdair/bom/StructAbstract.hpp
Property Changed:
----------------
trunk/stdair/stdair/basic/
Property changes on: trunk/stdair/stdair/basic
___________________________________________________________________
Modified: svn:ignore
- Makefile
Makefile.in
+ Makefile
Makefile.in
.deps
.libs
Added: trunk/stdair/stdair/basic/BasConst.cpp
===================================================================
--- trunk/stdair/stdair/basic/BasConst.cpp (rev 0)
+++ trunk/stdair/stdair/basic/BasConst.cpp 2009-11-04 10:39:37 UTC (rev 59)
@@ -0,0 +1,482 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STL
+#include <string>
+// STDAIR
+#include <stdair/STDAIR_Types.hpp>
+#include <stdair/basic/BasConst_WorldSchedule.hpp>
+#include <stdair/basic/BasConst_Inventory.hpp>
+#include <stdair/basic/BasConst_BookingClass.hpp>
+#include <stdair/basic/BasConst_Yield.hpp>
+#include <stdair/basic/BasConst_Period_BOM.hpp>
+
+namespace stdair {
+
+ // ///////// General /////////
+ /** Default very small value. */
+ const double DEFAULT_EPSILON_VALUE = 0.0001;
+
+ /** Default flight speed (number of kilometers per hour). */
+ const unsigned int DEFAULT_FLIGHT_SPEED = 900;
+
+ /** Default number of generated flight dates . */
+ const NbOfFlightDates_T DEFAULT_NB_OF_FLIGHTDATES = 0.0;
+
+
+ // // ///////// GSL /////////
+ // /** Default (GSL) random generator type. */
+ // const gsl_rng_type* DEFAULT_LATUS_RANDOM_GENERATOR_TYPE = gsl_rng_default;
+
+ // /** Default seed value for Exponential distribution. */
+ // const ExponentialSeed_T DEFAULT_EXPONENTIAL_SEED = 0;
+
+ // /** Default seed value for Exponential distribution. */
+ // const UniformSeed_T DEFAULT_UNIFORM_SEED = 0;
+
+ // // ///////// Labels in General Configuration Files /////////
+ // /** Default file path separator*/
+ // const std::string DEFAULT_CONFIG_FILEPATH_SEPARATOR = "/";
+
+ // /** Default label for RDS. */
+ // const std::string DEFAULT_CONFIG_RDS_LABEL = "rds";
+ // /** Default label for RDS file path. */
+ // const std::string DEFAULT_CONFIG_RDS_FILEPATH_LABEL = "rds_path";
+ // /** Default label for RDS Id (= folder holding RDS). */
+ // const std::string DEFAULT_CONFIG_RDS_ID_LABEL = "rds_id";
+ // /** Default label for RDS manifest. */
+ // const std::string DEFAULT_CONFIG_RDS_MANIFEST_LABEL = "rds_manifest";
+ // /** Default label for RDS airline configuration file name. */
+ // const std::string DEFAULT_CONFIG_RDS_AIRLINE_CONFIGURATION_LABEL =
+ // "airlineconfiguration";
+
+ // /** Default label for output files. */
+ // const std::string DEFAULT_CONFIG_OUTPUT_FILE_LABEL = "output_files";
+ // /** Default label for inventory output file name. */
+ // const std::string DEFAULT_CONFIG_INVENTORY_OUTPUT_FILE_LABEL =
+ // "inventory_output";
+ // /** Default label for simulation output file name. */
+ // const std::string DEFAULT_CONFIG_SIMULATION_OUTPUT_FILE_LABEL =
+ // "simulation_output";
+
+ // // ///////// Lables in RDS XML file /////////
+ // const std::string DEFAULT_CONFIG_RDS_DEMAND_ARRIVAL_FILENAME_LABEL =
+ // "demandpattern";
+ // const std::string DEFAULT_CONFIG_RDS_CANCEL_FILENAME_LABEL =
+ // "cancelratecurve";
+ // const std::string DEFAULT_CONFIG_RDS_CHARACTERISTIC_FILENAME_LABEL =
+ // "characteristics";
+ // const std::string DEFAULT_CONFIG_RDS_DEMAND_FILENAME_LABEL = "demands";
+ // const std::string DEFAULT_CONFIG_RDS_SCHEDULE_FILENAME_LABEL = "schedule";
+ // const std::string DEFAULT_CONFIG_RDS_FARE_FILENAME_LABEL = "fares";
+ // const std::string DEFAULT_CONFIG_RDS_YIELD_FILENAME_LABEL = "yields";
+ // const std::string DEFAULT_CONFIG_RDS_AU_RULES_FILENAME_LABEL = "aurules";
+ // const std::string DEFAULT_CONFIG_RDS_LFDTD_RULES_FILENAME_LABEL = "lfdtdrules";
+ // const std::string DEFAULT_CONFIG_RDS_DCP_FILENAME_LABEL =
+ // "datacollectionpoints";
+
+ // // ///////// BOOST Date-Time /////////
+ // // Time duration representing a full day
+ // // (i.e., 24h or 1,440 minutes or 86,400 seconds)
+
+ // /** Time duration representing a full day (in boost::time_duration unit).*/
+ // const Duration_T BOOST_TIME_DURATION_FOR_A_DAY =
+ // boost::posix_time::hours(24);
+
+ // /** Time duration representing a full day (in seconds).*/
+ // const int TIME_DURATION_FOR_A_DAY_IN_SECONDS =
+ // static_cast<const int> (BOOST_TIME_DURATION_FOR_A_DAY.total_seconds());
+
+ // /** Time duration representing a full hour (in seconds).*/
+ // const int TIME_DURATION_FOR_AN_HOUR_IN_SECONDS = 3600;
+
+ // /** Time duration representing a full minute (in seconds).*/
+ // const int TIME_DURATION_FOR_A_MINUTE_IN_SECONDS = 60;
+
+ // /** Null time duration (in boost::time_duration unit).*/
+ // const Duration_T NULL_BOOST_TIME_DURATION =
+ // boost::posix_time::hours(0)+ boost::posix_time::minutes (0)
+ // + boost::posix_time::seconds (0);
+
+ // /** Date duration representing a full day (in boost::date_duration unit).*/
+ // const DateOffSet_T BOOST_DATE_DURATION_FOR_A_DAY (1);
+
+ // /** Date duration representing the window of time used for statistical
+ // analysis. */
+ // const DateOffSet_T DEFAULT_ANALYSIS_TIME_WINDOW (180);
+
+ // /** Date duration representing the period of reservation for a
+ // typical flight. */
+ // const DateOffSet_T DEFAULT_RESERVATION_PERIOD_LENGTH (365);
+
+
+ // //////// (Flight-)Period-related BOM ///////
+ /** Default number of duration days. */
+ const DayDuration_T DEFAULT_DAY_DURATION (0);
+
+ /** Default date period (0-length, i.e., it lasts one day).*/
+ const DatePeriod_T BOOST_DEFAULT_DATE_PERIOD (Date_T (2007, 1, 1),
+ Date_T (2007, 1, 1));
+
+ const std::string DOW_STR[] = {"Mon", "Tue", "Wed", "Thu", "Fri",
+ "Sat", "Sun"};
+
+ /** Default DOW String (e.g., "1111100"). */
+ const DOW_String_T DEFAULT_DOW_STRING ("1111100");
+
+ /** Default Date OffSet (e.g., 0). */
+ const DateOffSet_T DEFAULT_DATE_OFFSET (0);
+
+ // // //////// WorldSchedule ///////
+ // /** Default update date for the WorldSchedule. */
+ // const Date_T DEFAULT_WORLD_SCHEDULE_UPDATE_DATE (2007,
+ // boost::gregorian::Jan,
+ // 1);
+
+
+ // // //////// WholeDemand ///////
+ // /** Default update date for the WholeDemand. */
+ // const Date_T DEFAULT_WHOLE_DEMAND_UPDATE_DATE (2007,
+ // boost::gregorian::Jan,
+ // 1);
+
+ // /** Default update date&time. */
+ // const DateTime_T DEFAULT_DEMAND_DATETIME (DEFAULT_WHOLE_DEMAND_UPDATE_DATE,
+ // NULL_BOOST_TIME_DURATION);
+
+ // // //////// Fare Rules ///////
+ // /** Default saturdayStay value (false). */
+ // const SaturdayStay_T DEFAULT_SATURDAY_STAY = false;
+
+ // /** Default change fees value (false). */
+ // const ChangeFees_T DEFAULT_CHANGE_FEES = false;
+
+ // /** Default non refundable value (false). */
+ // const NonRefundable_T DEFAULT_NON_REFUNDABLE = false;
+
+ // /** Default airlineCode value ('XX'). */
+ // const AirlineCode_T DEFAULT_AIRLINE_CODE = "XX";
+
+ // /** Default airlineCode value (''). */
+ // const AirlineCode_T DEFAULT_NULL_AIRLINE_CODE = "";
+
+ // /** Default airportCode value ('XXX'). */
+ // const AirportCode_T DEFAULT_AIRPORT_CODE = "XXX";
+
+ // /** Default family code value ('X'). */
+ // const ClassCode_T DEFAULT_FAMILY_CODE = "0";
+
+ // /** Default classCode value ('X'). */
+ // const ClassCode_T DEFAULT_CLASS_CODE = "X";
+
+ // /** Default number of airlines. */
+ // const NbOfAirlines_T DEFAULT_NBOFAIRLINES = 0;
+
+ // /** Default classCode value (''). */
+ // const ClassCode_T DEFAULT_NULL_CLASS_CODE = "";
+
+ // /** Default flightPathCode value (''). */
+ // const FlightPathCode_T DEFAULT_FLIGHTPATH_CODE = "";
+
+ // // //////// DemandFeatures ///////
+ // /** Default SaturdayStay average ratio of demand (value between [0, 100]). */
+ // const SaturdayStayRatio_T DEFAULT_SATURDAY_STAY_RATIO = 50;
+
+ // /** Default Change fees average ratio (value between [0, 100]). */
+ // const ChangeFeesRatio_T DEFAULT_CHANGE_FEES_RATIO = 50;
+
+ // /** Default Non refundable average ratio (value between [0, 100]). */
+ // const NonRefundableRatio_T DEFAULT_NON_REFUNDABLE_RATIO = 50;
+
+ // /** Default passenger type (Leisure or Business). */
+ // const PassengerType_T DEFAULT_PASSENGER_TYPE = "L";
+
+ // /** Default distribution pattern identifier. */
+ // const DistributionPatternId_T DEFAULT_DISTRIBUTION_PATTERN_ID = "";
+
+ // /** Default cancellation rate curve identifier. */
+ // const CancellationRateCurveId_T DEFAULT_CANCELLATION_RATE_CURVE_ID = "";
+
+ // /** Default airline preference identifier. */
+ // const AirlinePreferenceId_T DEFAULT_AIRLINE_PREFERENCE_ID = "";
+
+ // /** Default percentage pair of cancellation and no-show. */
+ // const CancellationNoShowRatePair_T DEFAULT_PERCENTAGE_PAIR (0.0, 0.0);
+
+ // /** Default characteristics pattern identifier. */
+ // const CharacteristicsPatternId_T DEFAULT_CHARACTERISTICS_PATTERN_ID = "";
+
+ // //////// (Segment-)Class-related BOM ///////
+ /** Default distance value (kilometers). */
+ const Distance_T DEFAULT_DISTANCE_VALUE = 0;
+
+ /** Default number of bookings (with counted cancellation)
+ for BookingClass. */
+ const NbOfBookings_T DEFAULT_CLASS_NB_OF_BOOKINGS = 0;
+
+ /** Default number of booking (without cancellation)
+ demands for BookingClass. */
+ const NbOfBookings_T DEFAULT_CLASS_TOTAL_NB_OF_BOOKINGS = 0;
+
+ /** Default unconstrained demand for BookingClass. */
+ const NbOfBookings_T DEFAULT_CLASS_UNCONSTRAINED_DEMAND = 0;
+
+ /** Default remaining future demand mean for BookingClass. */
+ const NbOfBookings_T DEFAULT_CLASS_REMAINING_DEMAND_MEAN = 0;
+
+ /** Default remaining futre demand standard deviation for BookingClass. */
+ const NbOfBookings_T DEFAULT_CLASS_REMAINING_DEMAND_STANDARD_DEVIATION = 0;
+
+ /** Default number of cancellations for BookingClass. */
+ const NbOfCancellations_T DEFAULT_CLASS_NB_OF_CANCELLATIONS = 0;
+
+ /** Default number of no-shows for BookingClass. */
+ const NbOfNoShows_T DEFAULT_CLASS_NB_OF_NOSHOWS = 0;
+
+ /** Default cabin capacity for Leg cabins. */
+ const CabinCapacity_T DEFAULT_CABIN_CAPACITY = 0.0;
+
+ /** Default commited space value for Leg cabins. */
+ const CommitedSpace_T DEFAULT_COMMITED_SPACE = 0.0;
+
+ /** Default commited space value for Leg cabins. */
+ const BlockSpace_T DEFAULT_BLOCK_SPACE = 0.0;
+
+ /** Default availability for BookingClass. */
+ const Availability_T DEFAULT_CLASS_AVAILABILITY = 0.0;
+
+ /** Default boolean for censorship flag given the status of
+ availability for BookingClass. */
+ const CensorshipFlag_T DEFAULT_CLASS_CENSORSHIPFLAG = false;
+
+ /** Default list of censorship flag given the status of
+ availability for BookingClass. */
+ const CensorshipFlagList_T DEFAULT_CLASS_CENSORSHIPFLAG_LIST = std::vector<CensorshipFlag_T>();
+
+ /** Default booking limit value for BookingClass. */
+ const BookingLimit_T DEFAULT_CLASS_BOOKING_LIMIT = 9999.0;
+
+ /** Default authorization level for BookingClass. */
+ const AuthorizationLevel_T DEFAULT_CLASS_AUTHORIZATION_LEVEL = 9999.0;
+
+ /** Default MAX value of authorization level for BookingClass. */
+ const AuthorizationLevel_T DEFAULT_CLASS_MAX_AUTHORIZATION_LEVEL = 9999.0;
+
+ /** Default MIN value of authorization level for BookingClass. */
+ const AuthorizationLevel_T DEFAULT_CLASS_MIN_AUTHORIZATION_LEVEL = 0.0;
+
+ /** Default over-booking rate for BookingClass. */
+ const OverbookingRate_T DEFAULT_CLASS_OVERBOOKING_RATE = 0.0;
+
+ /** Default booking rate for OnD bookings over overall class bookings. */
+ const BookingRatio_T DEFAULT_OND_BOOKING_RATE = 0.0;
+
+ /** Default closed class code. */
+ const ClassCode_T DEFAULT_CLOSED_CLASS_CODE = "CC";
+
+ /** Default Fare value for BookingClass. */
+ const Fare_T DEFAULT_CLASS_FARE_VALUE = 0.0;
+
+ /** Default yield value for a virtual class. */
+ const Yield_T DEFAULT_CLASS_YIELD_VALUE = 0.0;
+
+ /** Default Revenue value. */
+ const Revenue_T DEFAULT_REVENUE_VALUE = 0.0;
+
+ /** Default load factor value (100%). */
+ const Percentage_T DEFAULT_LOAD_FACTOR_VALUE = 100.0;
+
+ // //////// (Leg-)YieldRange-related BOM ///////
+ /** Default yield value. */
+ const Yield_T DEFAULT_YIELD_VALUE = 0.0;
+
+ /** Default yield max value. */
+ const Yield_T DEFAULT_YIELD_MAX_VALUE = std::numeric_limits<double>::max();
+
+ /** Default number of bookings for YieldRangeStruct_T. */
+ const NbOfBookings_T DEFAULT_YIELD_NB_OF_BOOKINGS = 0.0;
+
+ /** Default booking number. */
+ const Identity_T DEFAULT_BOOKING_NUMBER = 0;
+
+ /** Default cancellation number for YieldRangeStruct_T. */
+ const NbOfCancellations_T DEFAULT_YIELD_NB_OF_CANCELLATIONS = 0.0;
+
+ /** Default no-shows number for YieldRangeStruct_T. */
+ const NbOfNoShows_T DEFAULT_YIELD_NB_OF_NOSHOWS = 0.0;
+
+ /** Default availability for YieldRangeStruct_T. */
+ const Availability_T DEFAULT_YIELD_AVAILABILITY = 0.0;
+
+ /** Default boolean for booking limit availability for
+ YieldRangeStruct_T. */
+ const CensorshipFlag_T DEFAULT_YIELD_CENSORSHIPFLAG = false;
+
+ /** Default booking limit value for YieldRangeStruct_T. */
+ const BookingLimit_T DEFAULT_YIELD_BOOKING_LIMIT = 0.0;
+
+ /** Default over-booking rate for YieldRangeStruct_T. */
+ const OverbookingRate_T DEFAULT_YIELD_OVERBOOKING_RATE = 0.0;
+
+ // //////// OnD-related BOM ///////
+ /** Default value of Fare. */
+ const Fare_T DEFAULT_OND_FARE_VALUE = 0.0;
+
+ // /** Default number of bookings. */
+ // const NbOfBookings_T DEFAULT_OND_NB_OF_BOOKINGS = 0.0;
+
+ // /** Default remaining future demand mean for OnD. */
+ // const NbOfBookings_T DEFAULT_OND_REMAINING_DEMAND_MEAN = 0.0;
+
+ // /** Default remaining futre demand standard deviation for OnD. */
+ // const NbOfBookings_T DEFAULT_OND_REMAINING_DEMAND_STANDARD_DEVIATION = 0.0;
+
+ // // //////// Travel Solutions ///////
+ // /** Default Minimum connection time. */
+ // const Duration_T DEFAULT_MINIMUM_CONNECTION_TIME (0, 30, 0);
+
+ // /** Default Matching Indicator value. */
+ // const MatchingIndicator_T DEFAULT_MATCHING_INDICATOR (0.0);
+
+ // /** Default price value (0.0). */
+ // const PriceValue_T DEFAULT_PRICE_VALUE (0.0);
+
+ // /** Default currency (euro). */
+ // const PriceCurrency_T DEFAULT_CURRENCY ("EUR");
+
+ // /** Default availability status for a travel solution. */
+ // const AvailabilityStatus_T DEFAULT_AVAILABILITY_STATUS = false;
+
+ // // //////// Cancellation ///////
+ // /** Default Fare value */
+ // const Fare_T DEFAULT_FARE_VALUE = 0.0;
+
+ // /** Default number of bookings. */
+ // const NbOfBookings_T DEFAULT_NB_OF_BOOKINGS = 0;
+
+ // /** Default date&time. */
+ // const DateTime_T DEFAULT_CANCELLATION_DATETIME
+ // (DEFAULT_WORLD_SCHEDULE_UPDATE_DATE,
+ // NULL_BOOST_TIME_DURATION);
+
+ // // //////// CityPair ////////
+ // /** Default booking date for BookingDay. */
+ // const Date_T DEFAULT_BOOKING_DATE (2007, boost::gregorian::Jan, 1);
+
+ // /** Default departure date for CityPairDate. */
+ // const Date_T DEFAULT_DEPARTURE_DATE (2008, boost::gregorian::Jan, 1);
+
+ // /** Date duration representing the time during which a flight-date is open
+ // to the reservation (in boost::date_duration unit).*/
+ // const DateOffSet_T DEFAULT_FLIGHT_DATE_RESERVATION_DURATION (365);
+
+ // /** Default number of seats required whenever a demand is processed into
+ // the simulator. */
+ // const unsigned short DEFAULT_NUMBER_OF_REQUIRED_SEATS = 1;
+
+ // // //////// Flight Period Actions ////////
+ // // //////// RMS mode ///////
+ // /** Default forecaster mode. */
+ // const ForecasterMode_T DEFAULT_FORECAST_MODE = "NoForecast";
+
+ // /** First forecaster mode. */
+ // const ForecasterMode_T FIRST_FORECAST_MODE = "Forecaster1";
+
+ // /** Basic forecaster mode. */
+ // const ForecasterMode_T BASIC_FORECAST_MODE = "BasicForecaster";
+
+ // /** Neural forecaster mode. */
+ // const ForecasterMode_T NEURAL_FORECAST_MODE = "NeuralForecaster";
+
+ // /** Q forecaster mode. */
+ // const ForecasterMode_T Q_FORECAST_MODE = "QForecaster";
+
+ // /** Default optimizer mode. */
+ // const OptimizerMode_T DEFAULT_OPTIMIZER_MODE = "FCFS";
+
+ // /** Optimizer mode for rules like LF & DTD threshold. */
+ // const OptimizerMode_T LF_DTD_RULES_OPTIMIZER_MODE = "LFDTDRules";
+
+ // /** Optimizer mode for EMSR heuristic. */
+ // const OptimizerMode_T EMSR_OPTIMIZER_MODE = "EMSR";
+
+ // /** Optimizer mode for EMSR-a heuristic. */
+ // const OptimizerMode_T EMSRA_OPTIMIZER_MODE = "EMSRa";
+
+ // // /** Optimizer mode for EMSR-a with sell up probability. */
+ // // const OptimizerMode_T EMSRA_SELLUP_OPTIMIZER_MODE = "EMSRaSellup";
+
+ // /** Optimizer mode for EMSR-b heuristic. */
+ // const OptimizerMode_T EMSRB_OPTIMIZER_MODE = "EMSRb";
+
+ // /** Optimizer mode for Optimal Optimization by Monte-Carlo. */
+ // const OptimizerMode_T MC_OPTIMIZER_MODE = "MC";
+
+ // /** Optimizer mode for Leg-Based Iterative DAVN Optimization with
+ // Monte-Carlo. */
+ // const OptimizerMode_T LB_ITERATIVE_DAVN_OPTIMIZER_WITH_MC_MODE = "LB_DAVN_MC";
+
+ // /** Optimizer mode for Leg-Based Iterative DAVN Optimization with
+ // EMSR. */
+ // const OptimizerMode_T LB_ITERATIVE_DAVN_OPTIMIZER_WITH_EMSR_MODE = "LB_DAVN_EMSR";
+
+ // // /** No sell-up for optimizer by default*/
+ // // const SellupFlagForOptimizer_T DEFAULT_SELLUP_FLAG_FOR_OPTIMIZER = false;
+
+ // /** Defaut control mode. */
+ // const ControlMode_T DEFAULT_CONTROL_MODE = "STD";
+
+ // /** Theft control mode. */
+ // const ControlMode_T THEFT_CONTROL_MODE = "THEFT";
+
+ // /** Default number of draws for Monte-Carlo Integration method. */
+ // const int DEFAULT_NUMBER_OF_RANDOM_DRAWS = 1000;
+
+ // /** Default epsilon for convergence test. */
+ // const double DEFAULT_CONVERGENCE_EPSILON = 0.1;
+
+ // /** Default max number of iterations for Iterative DAVN. */
+ // const int DEFAULT_NB_OF_ITERATIONS_DAVN = 10;
+
+ // // //////// Characteristics ///////
+ // /** Default k-factor (0.3).*/
+ // const Multiplier_T DEFAULT_KFACTOR = 0.3;
+
+ // /** Default basefare [used for computing WTP] (0).*/
+ // const Fare_T DEFAULT_BASEFARE = 0;
+
+ // /** Default elasticity multiplier [used for computing WTP] (1.5). */
+ // const Multiplier_T DEFAULT_EMULTIPLIER = 1.5;
+
+ // // //////// DICO mode ///////
+ // /** Default DICO studied airline. */
+ // const AirlineCode_T DEFAULT_DICO_AIRLINE = "AD";
+ // //const AirlineCode_T DEFAULT_DICO_STUDIED_AIRLINE = "AA";
+
+ // /** Default second studied airline for DICO. */
+ // const AirlineCode_T DEFAULT_SECOND_DICO_AIRLINE = "AL";
+ // //const AirlineCode_T DEFAULT_SECOND_DICO_STUDIED_AIRLINE = "BA";
+
+ // /** Default DICO studied date. */
+ // const Date_T DEFAULT_DICO_STUDIED_DATE (2009, boost::gregorian::Jun, 29);
+ // //const Date_T DEFAULT_DICO_STUDIED_DATE (2009, boost::gregorian::Jun, 27);
+
+ // /** Default DICO optimiser (dico mode). */
+ // const DicoOptimizerMode_T DEFAULT_DICO_OPTIMIZER = "dico";
+
+ // /** Default DICO optimiser (robust dico mode). */
+ // const DicoOptimizerMode_T DEFAULT_ROBUST_DICO_OPTIMIZER =
+ // "robustdico";
+
+ // /** Default DICO optimiser (fast robust dico mode). */
+ // const DicoOptimizerMode_T DEFAULT_FAST_ROBUST_DICO_OPTIMIZER =
+ // "fastrobustdico";
+
+ // //////// Inventory-related BOM ///////
+ /** Default Bid-Price. */
+ const BidPrice_T DEFAULT_BID_PRICE = 0.0;
+
+ /** Default Bid-Price Vector. */
+ const BidPriceVector_T DEFAULT_BID_PRICE_VECTOR = std::vector<BidPrice_T>();
+
+}
Added: trunk/stdair/stdair/basic/BasConst_BookingClass.hpp
===================================================================
--- trunk/stdair/stdair/basic/BasConst_BookingClass.hpp (rev 0)
+++ trunk/stdair/stdair/basic/BasConst_BookingClass.hpp 2009-11-04 10:39:37 UTC (rev 59)
@@ -0,0 +1,97 @@
+#ifndef __STDAIR_BAS_BASCONST_BOOKINGCLASS_HPP
+#define __STDAIR_BAS_BASCONST_BOOKINGCLASS_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/STDAIR_Types.hpp>
+
+namespace stdair {
+
+ // //////// (Segment-)Class-related BOM ///////
+ /** Default distance value (kilometers). */
+ extern const Distance_T DEFAULT_DISTANCE_VALUE;
+
+ /** Default closed class code. */
+ extern const ClassCode_T DEFAULT_CLOSED_CLASS_CODE;
+
+ /** Default number of bookings (with counted cancellation)
+ for BookingClass. */
+ extern const NbOfBookings_T DEFAULT_CLASS_NB_OF_BOOKINGS;
+
+ /** Default number of bookings (without cancellation)
+ for BookingClass. */
+ extern const NbOfBookings_T DEFAULT_CLASS_TOTAL_NB_OF_BOOKINGS;
+
+ /** Default unconstrained demand for BookingClass. */
+ extern const NbOfBookings_T DEFAULT_CLASS_UNCONSTRAINED_DEMAND;
+
+ /** Default remaining future demand mean for BookingClass. */
+ extern const NbOfBookings_T DEFAULT_CLASS_REMAINING_DEMAND_MEAN;
+
+ /** Default remaining futre demand standard deviation for BookingClass. */
+ extern const NbOfBookings_T DEFAULT_CLASS_REMAINING_DEMAND_STANDARD_DEVIATION;
+
+ /** Default number of cancellations for BookingClass. */
+ extern const NbOfCancellations_T DEFAULT_CLASS_NB_OF_CANCELLATIONS;
+
+ /** Default number of no-shows for BookingClass. */
+ extern const NbOfNoShows_T DEFAULT_CLASS_NB_OF_NOSHOWS;
+
+ /** Default cabin capacity for Leg cabins. */
+ extern const CabinCapacity_T DEFAULT_CABIN_CAPACITY;
+
+ /** Default commited space value for Leg cabins. */
+ extern const CommitedSpace_T DEFAULT_COMMITED_SPACE;
+
+ /** Default commited space value for Leg cabins. */
+ extern const BlockSpace_T DEFAULT_BLOCK_SPACE;
+
+ /** Default availability for BookingClass. */
+ extern const Availability_T DEFAULT_CLASS_AVAILABILITY;
+
+ /** Default boolean for censorship flag given the status of
+ availability for BookingClass. */
+ extern const CensorshipFlag_T DEFAULT_CLASS_CENSORSHIPFLAG;
+
+ /** Default list of censorship flag given the status of
+ availability for BookingClass. */
+ extern const CensorshipFlagList_T DEFAULT_CLASS_CENSORSHIPFLAG_LIST;
+
+ /** Default booking limit value for BookingClass. */
+ extern const BookingLimit_T DEFAULT_CLASS_BOOKING_LIMIT;
+
+ /** Default authorization level for BookingClass. */
+ extern const AuthorizationLevel_T DEFAULT_CLASS_AUTHORIZATION_LEVEL;
+
+ /** Default MAX value of authorization level for BookingClass. */
+ extern const AuthorizationLevel_T DEFAULT_CLASS_MAX_AUTHORIZATION_LEVEL;
+
+ /** Default MIN value of authorization level for BookingClass. */
+ extern const AuthorizationLevel_T DEFAULT_CLASS_MIN_AUTHORIZATION_LEVEL;
+
+ /** Default over-booking rate for BookingClass. */
+ extern const OverbookingRate_T DEFAULT_CLASS_OVERBOOKING_RATE;
+
+ /** Default over-booking rate for BookingClass. */
+ extern const Fare_T DEFAULT_CLASS_FARE_VALUE;
+
+ /** Default revenue value for BookingClass. */
+ extern const Revenue_T DEFAULT_REVENUE_VALUE;
+
+ /** Default currency (euro). */
+ extern const PriceCurrency_T DEFAULT_CURRENCY;
+
+ /** Default load factor value (100%). */
+ extern const Percentage_T DEFAULT_LOAD_FACTOR_VALUE;
+
+ /** Default number of duration days (0). */
+ extern const DayDuration_T DEFAULT_DAY_DURATION;
+
+ /** Default epsilon value between customer requirements
+ and a fare rule. */
+ extern const double DEFAULT_EPSILON_VALUE;
+
+}
+#endif // __STDAIR_BAS_BASCONST_BOOKINGCLASS_HPP
Added: trunk/stdair/stdair/basic/BasConst_Inventory.hpp
===================================================================
--- trunk/stdair/stdair/basic/BasConst_Inventory.hpp (rev 0)
+++ trunk/stdair/stdair/basic/BasConst_Inventory.hpp 2009-11-04 10:39:37 UTC (rev 59)
@@ -0,0 +1,20 @@
+#ifndef __STDAIR_BAS_BASCONST_INVENTORY_HPP
+#define __STDAIR_BAS_BASCONST_INVENTORY_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/STDAIR_Types.hpp>
+
+namespace stdair {
+
+ // //////// Inventory-related BOM ///////
+ /** Default Bid-Price. */
+ extern const BidPrice_T DEFAULT_BID_PRICE;
+
+ /** Default Bid-Price Vector. */
+ extern const BidPriceVector_T DEFAULT_BID_PRICE_VECTOR;
+
+}
+#endif // __STDAIR_BAS_BASCONST_INVENTORY_HPP
Added: trunk/stdair/stdair/basic/BasConst_Period_BOM.hpp
===================================================================
--- trunk/stdair/stdair/basic/BasConst_Period_BOM.hpp (rev 0)
+++ trunk/stdair/stdair/basic/BasConst_Period_BOM.hpp 2009-11-04 10:39:37 UTC (rev 59)
@@ -0,0 +1,29 @@
+#ifndef __STDAIR_BAS_BASCONST_PERIOD_BOM_HPP
+#define __STDAIR_BAS_BASCONST_PERIOD_BOM_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/STDAIR_Types.hpp>
+
+namespace stdair {
+
+ // //////// (Flight-)Period-related BOM ///////
+ /** Default date period (0-length, i.e., it lasts one day).*/
+ extern const DatePeriod_T BOOST_DEFAULT_DATE_PERIOD;
+
+ /** Representation of Dow-Of-the-Week */
+ extern const std::string DOW_STR[];
+
+ /** Default DOW String (e.g., "1111100"). */
+ extern const DOW_String_T DEFAULT_DOW_STRING;
+
+ /** Default Date OffSet (e.g., 0). */
+ extern const DateOffSet_T DEFAULT_DATE_OFFSET;
+
+ /** Default Duration in days (e.g., 0). */
+ extern const DayDuration_T DEFAULT_DAY_DURATION;
+
+}
+#endif // __STDAIR_BAS_BASCONST_PERIOD_BOM_HPP
Added: trunk/stdair/stdair/basic/BasConst_WorldSchedule.hpp
===================================================================
--- trunk/stdair/stdair/basic/BasConst_WorldSchedule.hpp (rev 0)
+++ trunk/stdair/stdair/basic/BasConst_WorldSchedule.hpp 2009-11-04 10:39:37 UTC (rev 59)
@@ -0,0 +1,40 @@
+#ifndef __STDAIR_BAS_BASCONST_WORLDSCHEDULE_HPP
+#define __STDAIR_BAS_BASCONST_WORLDSCHEDULE_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// LATUS Common
+#include <stdair/STDAIR_Types.hpp>
+
+namespace stdair {
+
+ /** Default epsilon value. */
+ extern const double DEFAULT_EPSILON_VALUE;
+
+ /** Default flight speed (number of kilometers per hour). */
+ extern const unsigned int DEFAULT_FLIGHT_SPEED;
+
+ /** Default cabin capacity for Leg cabins. */
+ extern const CabinCapacity_T DEFAULT_CABIN_CAPACITY;
+
+ /** Default number of generated flight dates . */
+ extern const NbOfFlightDates_T DEFAULT_NB_OF_FLIGHTDATES;
+
+ /** Default number of bookings for BookingClass. */
+ extern const NbOfBookings_T DEFAULT_CLASS_NB_OF_BOOKINGS;
+
+ /** Default distance value (kilometers). */
+ extern const Distance_T DEFAULT_DISTANCE_VALUE;
+
+ /** Default value of Fare. */
+ extern const Fare_T DEFAULT_CLASS_FARE_VALUE;
+
+ /** Default revenue value. */
+ extern const Revenue_T DEFAULT_REVENUE_VALUE;
+
+ /** Default booking rate for OnD bookings over overall class bookings. */
+ extern const BookingRatio_T DEFAULT_OND_BOOKING_RATE;
+
+}
+#endif // __STDAIR_BAS_BASCONST_WORLDSCHEDULE_HPP
Added: trunk/stdair/stdair/basic/BasConst_Yield.hpp
===================================================================
--- trunk/stdair/stdair/basic/BasConst_Yield.hpp (rev 0)
+++ trunk/stdair/stdair/basic/BasConst_Yield.hpp 2009-11-04 10:39:37 UTC (rev 59)
@@ -0,0 +1,20 @@
+#ifndef __STDAIR_BAS_BASCONST_YIELD_HPP
+#define __STDAIR_BAS_BASCONST_YIELD_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/STDAIR_Types.hpp>
+
+namespace stdair {
+
+ // //////// (Leg-)Yield-related BOM ///////
+ /** Default yield value. */
+ extern const Yield_T DEFAULT_YIELD_VALUE;
+
+ /** Default yield max value. */
+ extern const Yield_T DEFAULT_YIELD_MAX_VALUE;
+
+}
+#endif // __STDAIR_BAS_BASCONST_YIELD_HPP
Modified: trunk/stdair/stdair/basic/sources.mk
===================================================================
--- trunk/stdair/stdair/basic/sources.mk 2009-10-28 10:05:59 UTC (rev 58)
+++ trunk/stdair/stdair/basic/sources.mk 2009-11-04 10:39:37 UTC (rev 59)
@@ -1,3 +1,9 @@
bas_h_sources = \
- $(top_srcdir)/stdair/basic/BasTypes.hpp
-bas_cc_sources =
+ $(top_srcdir)/stdair/basic/BasTypes.hpp \
+ $(top_srcdir)/stdair/basic/BasConst_WorldSchedule.hpp \
+ $(top_srcdir)/stdair/basic/BasConst_Inventory.hpp \
+ $(top_srcdir)/stdair/basic/BasConst_BookingClass.hpp \
+ $(top_srcdir)/stdair/basic/BasConst_Yield.hpp \
+ $(top_srcdir)/stdair/basic/BasConst_Period_BOM.hpp
+bas_cc_sources = \
+ $(top_srcdir)/stdair/basic/BasConst.cpp
Modified: trunk/stdair/stdair/bom/AirlineFeatureMap.cpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureMap.cpp 2009-10-28 10:05:59 UTC (rev 58)
+++ trunk/stdair/stdair/bom/AirlineFeatureMap.cpp 2009-11-04 10:39:37 UTC (rev 59)
@@ -47,8 +47,8 @@
}
// //////////////////////////////////////////////////////////////////////
- AirlineFeatureMap_T::iterator AirlineFeatureMap_T::
- find (const MapKey_T& iKey) const {
+ AirlineFeatureMap_T::
+ iterator AirlineFeatureMap_T::find (const MapKey_T& iKey) const {
return _airlineFeatureHolder.find (iKey);
}
Modified: trunk/stdair/stdair/bom/BomRoot.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomRoot.hpp 2009-10-28 10:05:59 UTC (rev 58)
+++ trunk/stdair/stdair/bom/BomRoot.hpp 2009-11-04 10:39:37 UTC (rev 59)
@@ -13,6 +13,7 @@
namespace stdair {
// Forward declarations.
class FacBomContent;
+ class AirlineFeatureSet;
struct BomRootKey_T;
struct InventoryList_T;
struct InventoryMap_T;
@@ -103,7 +104,20 @@
/** Get a InventoryMap_T for iteration methods. */
InventoryMap_T getInventoryMap () const;
+
+ /** Get the reference of the AirlineFeatureSet object. */
+ const AirlineFeatureSet& getAirlineFeatureSet() const {
+ assert (_airlineFeatureSet != NULL);
+ return *_airlineFeatureSet;
+ }
+ public:
+ // //////////// Setters //////////////
+ /** Set the reference to the AirlineFeatureSet object. */
+ void setAirlineFeatureSet (const AirlineFeatureSet* ioAirlineFeatureSet_ptr){
+ _airlineFeatureSet = ioAirlineFeatureSet_ptr;
+ }
+
private:
/** Retrieve the BOM structure object. */
BomStructure_T& getBomStructure () {
@@ -124,6 +138,9 @@
// Attributes
/** Reference structure. */
BomStructure_T& _bomRootStructure;
+
+ /** Set of all AirlineFeatures.*/
+ const AirlineFeatureSet* _airlineFeatureSet;
};
}
Modified: trunk/stdair/stdair/bom/BookingClass.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-28 10:05:59 UTC (rev 58)
+++ trunk/stdair/stdair/bom/BookingClass.hpp 2009-11-04 10:39:37 UTC (rev 59)
@@ -38,7 +38,89 @@
/** Definition allowing to retrieve the associated
BOM content child type. */
typedef BookingClass ContentChild_T;
+
+ public:
+ // /////////// Getters /////////////
+ /** Get the FareFamily (parent class). */
+ // FareFamily* getFareFamily() const {
+// return _fareFamily;
+// }
+
+ // ////// Getters from the parent class ///////
+// /** Get the airline code (from the parent class). */
+// const AirlineCode_T& getAirlineCode() const;
+
+// /** Get the flight number (from the parent class). */
+// const FlightNumber_T& getFlightNumber() const;
+
+// /** Get the flight-date (from the parent class). */
+// const Date_T& getFlightDateDate() const;
+
+// /** Get the board point (from the parent class). */
+// const AirportCode_T& getBoardPoint () const;
+
+// /** Get the off point (from the parent class). */
+// const AirportCode_T& getOffPoint () const;
+
+// /** Get the board date (from the parent class). */
+// const Date_T& getBoardDate () const;
+
+// /** Get the cabin code (from the parent class). */
+// const CabinCode_T& getCabinCode () const;
+
+// /** Get the board time (from the parent class). */
+// const Duration_T& getBoardTime () const;
+
+// /** Get the off date (from the parent class). */
+// const Date_T& getOffDate () const;
+
+// /** Get the off time (from the parent class). */
+// const Duration_T& getOffTime () const;
+
+// /** Get the elapsed time (from the parent class). */
+// const Duration_T& getElapsedTime() const;
+
+// /** Get the distance (from the parent class). */
+// const Distance_T& getDistance() const;
+
+// /** Get the date off set (from the parent class). */
+// const DateOffSet_T getDateOffSet () const;
+
+// /** Get the time off set between board and off points (from the
+// parent class). */
+// const Duration_T getTimeOffSet() const;
+
+// /** Retrieve, if existing, theOnD corresponding to the
+// given OnDKey.
+// <br>If not existing, return the NULL pointer. */
+// OnD* getOnD (const OnDKey_T& iOnDKey) const;
+
+// /** Get the size of the OnD list. */
+// const unsigned int getOnDListSize () const {
+// return _onDList.size();
+// }
+
+// /** Get the list of OnDs related to this class. */
+// const OnDList_T& getOnDList() const {
+// return _onDList;
+// }
+
+ public:
+ // ///////// Setters //////////
+ /** Set the Fare family (parent class). */
+// void setFareFamily (FareFamily& ioFareFamily) {
+// _fareFamily = &ioFareFamily;
+// }
+ /** Reset the number of bookings to its intial state. */
+ //void reset ();
+
+// /** Reset the booking fare. */
+// void resetFare();
+
+// /** Reset the booking yield. */
+// void resetYield();
+
public:
// /////////// Display support methods /////////
/** Dump a Business Object into an output stream.
@@ -60,6 +142,46 @@
at the same level). */
const std::string describeShortKey() const;
+ /** Give a description of the structure (for display purposes). */
+ //const std::string describe() const;
+
+ /** Get a string describing the solution (Fare, MatchIndicator...). */
+ //const std::string describeSolution() const;
+
+ public:
+ // ///////// Business Methods //////////
+ /** Update the number of bookings. */
+// bool updateInventoryForReservation (const NbOfBookings_T&);
+
+// /** Update the number of cancellations. */
+// bool updateInventoryForCancellation (const NbOfCancellations_T&);
+
+// /** Update the number of no-shows. */
+// bool updateInventoryForNoShow (const NbOfNoShows_T&);
+
+
+// /** Update the revenue of the booking. */
+// bool updateRevenue (const NbOfBookings_T&, const Fare_T&,
+// const AnalysisStatus_T&);
+
+// /** Add the current censorship flag into the flag list. */
+// void addCurrentCensorshipFlagToTheFlagList();
+
+// /** Build the Class-Segment code (for example:B-NCE-BKK->BNCEBKK). */
+// const std::string buildClassSegmentCode() const;
+
+// /** Insert a new OnD reference. */
+// void addOnD (OnD&);
+
+// /** Calculate the ratio of booking for this booking only
+// (without OnD bookings). */
+// const BookingRatio_T calculateNetProductRatio();
+
+ protected:
+ /** Update some statistics of the SegmentCabin parent object.*/
+// void updateParentStatistics (const Revenue_T&,
+// const NbOfBookings_T&) const;
+
private:
/** Retrieve the BOM structure object. */
BomStructure_T& getBomStructure () {
@@ -81,6 +203,12 @@
// Attributes
/** Reference structure. */
BomStructure_T& _bookingClassStructure;
+
+ /** Parent class: FareFamily. */
+// FareFamily* _fareFamily;
+
+// /** List of OnD references related to this bookingClass. */
+// OnDList_T _onDList;
};
}
Modified: trunk/stdair/stdair/bom/BookingClassContent.cpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClassContent.cpp 2009-10-28 10:05:59 UTC (rev 58)
+++ trunk/stdair/stdair/bom/BookingClassContent.cpp 2009-11-04 10:39:37 UTC (rev 59)
@@ -4,17 +4,54 @@
// STL
#include <cassert>
// STDAIR
+#include <stdair/basic/BasConst_BookingClass.hpp>
+#include <stdair/basic/BasConst_Yield.hpp>
#include <stdair/bom/BookingClassContent.hpp>
namespace stdair {
// ////////////////////////////////////////////////////////////////////
- BookingClassContent::BookingClassContent (const BomKey_T& iKey) : _key (iKey) {
+ BookingClassContent::BookingClassContent (const BomKey_T& iKey)
+ : _key (iKey),
+ _nbOfBookings (DEFAULT_CLASS_NB_OF_BOOKINGS),
+ _totalNbOfBookings (DEFAULT_CLASS_TOTAL_NB_OF_BOOKINGS),
+ _lastDCPTotalNbOfBookings (DEFAULT_CLASS_TOTAL_NB_OF_BOOKINGS),
+ _unconstrainedDemand (DEFAULT_CLASS_UNCONSTRAINED_DEMAND),
+ _nbOfCancellations (DEFAULT_CLASS_NB_OF_CANCELLATIONS),
+ _nbOfNoShows (DEFAULT_CLASS_NB_OF_NOSHOWS),
+ _availability (DEFAULT_CLASS_AVAILABILITY),
+ _classRevenue (DEFAULT_REVENUE_VALUE),
+ _currentCensorshipFlag (DEFAULT_CLASS_CENSORSHIPFLAG),
+ _censorshipFlagList (DEFAULT_CLASS_CENSORSHIPFLAG_LIST),
+ _bookingLimit (DEFAULT_CLASS_BOOKING_LIMIT),
+ _authorizationLevel(DEFAULT_CLASS_AUTHORIZATION_LEVEL),
+ _MAX (DEFAULT_CLASS_MAX_AUTHORIZATION_LEVEL),
+ _MIN (DEFAULT_CLASS_MIN_AUTHORIZATION_LEVEL),
+ _overbookingRate (1 + DEFAULT_CLASS_OVERBOOKING_RATE),
+ _fare (DEFAULT_CLASS_FARE_VALUE),
+ _adjustedYield (DEFAULT_YIELD_VALUE),
+ _yield (DEFAULT_YIELD_VALUE),
+ _remainingDemandMean (DEFAULT_CLASS_REMAINING_DEMAND_MEAN),
+ _remainingProductDemandMean (DEFAULT_CLASS_REMAINING_DEMAND_MEAN),
+ _remainingDemandSD (DEFAULT_CLASS_REMAINING_DEMAND_STANDARD_DEVIATION),
+ _remainingProductDemandSD (DEFAULT_CLASS_REMAINING_DEMAND_STANDARD_DEVIATION) {
}
// ////////////////////////////////////////////////////////////////////
BookingClassContent::~BookingClassContent () {
}
+
+ // //////////////////////////////////////////////////////////////////////
+ void BookingClassContent::setRemainingDemandMean(NbOfBookings_T& iMean) {
+ _remainingDemandMean = iMean;
+ _remainingProductDemandMean = iMean;
+ }
+ // //////////////////////////////////////////////////////////////////////
+ void BookingClassContent::setRemainingDemandSD(NbOfBookings_T& iSD) {
+ _remainingDemandSD = iSD;
+ _remainingProductDemandSD = iSD;
+ }
+
}
Modified: trunk/stdair/stdair/bom/BookingClassContent.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClassContent.hpp 2009-10-28 10:05:59 UTC (rev 58)
+++ trunk/stdair/stdair/bom/BookingClassContent.hpp 2009-11-04 10:39:37 UTC (rev 59)
@@ -24,7 +24,198 @@
return _key;
}
+ /** Get the booking code (part of the primary key). */
+ const ClassCode_T& getClassCode() const {
+ return _key.getClassCode();
+ }
+
+ /** Get the number of bookings of the bookingClass. */
+ const NbOfBookings_T& getNbOfBookings() const {
+ return _nbOfBookings;
+ }
+
+ /** Get the number of bookings (without cancellation counted)
+ of the bookingClass. */
+ const NbOfBookings_T& getTotalNbOfBookings() const {
+ return _totalNbOfBookings;
+ }
+
+ /** Get the number of bookings at the last DCP(without
+ cancellation counted) of the bookingClass. */
+ const NbOfBookings_T& getLastDCPTotalNbOfBookings() const {
+ return _lastDCPTotalNbOfBookings;
+ }
+
+ /** Get the unconstrained demand (last DCP) of the bookingClass. */
+ const NbOfBookings_T& getUnconstrainedDemand () const {
+ return _unconstrainedDemand;
+ }
+
+ /** Get the number of cancellations of the bookingClass. */
+ const NbOfCancellations_T& getNbOfCancellations() const {
+ return _nbOfCancellations;
+ }
+
+ /** Get the number of no-shows of the bookingClass. */
+ const NbOfNoShows_T& getNbOfNoShows() const {
+ return _nbOfNoShows;
+ }
+
+ /** Get the overbooking rate dedicated to the booking. */
+ const OverbookingRate_T& getOverbookingRate() const {
+ return _overbookingRate;
+ }
+
+ /** Get the list of censorship flags. */
+ const CensorshipFlagList_T& getCensorshipFlagList() const {
+ return _censorshipFlagList;
+ }
+
+ /** Get the current censorship flag. */
+ const CensorshipFlag_T& getCurrentCensorshipFlag() const {
+ return _currentCensorshipFlag;
+ }
+
+ /** Get the protection value. */
+ const BookingLimit_T& getBookingLimit() const {
+ return _bookingLimit;
+ }
+
+ /** Get the authorisation level value. */
+ const AuthorizationLevel_T& getAuthorizationLevel () const {
+ return _authorizationLevel;
+ }
+
+ /** Get the MAX value of AU. */
+ const AuthorizationLevel_T& getMAX () const {
+ return _MAX;
+ }
+
+ /** Get the MIN value of AU. */
+ const AuthorizationLevel_T& getMIN () const {
+ return _MIN;
+ }
+
+ /** Get the availability number. */
+ const Availability_T& getAvailability() const {
+ return _availability;
+ }
+
+ /** Get the revenue amount. */
+ const Revenue_T& getRevenue() const {
+ return _classRevenue;
+ }
+
+ /** Get the fare current value. */
+ const Fare_T& getFare() const {
+ return _fare;
+ }
+
+ /** Get the adjusted yield current value. */
+ const Yield_T& getAdjustedYield() const {
+ return _adjustedYield;
+ }
+
+ /** Get the yield current value. */
+ const Yield_T& getYield() const {
+ return _yield;
+ }
+
+ /** Get the remaining demand mean. */
+ const NbOfBookings_T& getRemainingDemandMean() const {
+ return _remainingDemandMean;
+ }
+
+ /** Get the remaining demand mean for the net booking product. */
+ const NbOfBookings_T& getRemainingProductDemandMean() const {
+ return _remainingProductDemandMean;
+ }
+
+ /** Get the remaining demand standard deviation. */
+ const NbOfBookings_T& getRemainingDemandSD() const {
+ return _remainingDemandSD;
+ }
+
+ /** Get the remaining demand standard deviation
+ for the net booking product. */
+ const NbOfBookings_T& getRemainingProductDemandSD() const {
+ return _remainingProductDemandSD;
+ }
+
public:
+ // /////////// Setters ////////////
+ /** Set the booking limit. */
+ void setBookingLimit (BookingLimit_T& iBookingLimit) {
+ _bookingLimit = iBookingLimit;
+ }
+
+ /** Set the authorization level. */
+ void setAuthorizationLevel (AuthorizationLevel_T& iAuthorizationLevel) {
+ _authorizationLevel = iAuthorizationLevel;
+ }
+
+ /** Set the MAX value of AU. */
+ void setMAX (const AuthorizationLevel_T& iMAX) {
+ _MAX = iMAX;
+ }
+
+ /** Set the MIN value of AU. */
+ void setMIN (const AuthorizationLevel_T& iMIN) {
+ _MIN = iMIN;
+ }
+
+ /** Set the Availability number. */
+ void setAvailability (Availability_T& iAvailability) {
+ _availability = iAvailability;
+ }
+
+ /** Set the censorship flag status. */
+ void setCensorshipFlagStatus (bool iFlagStatus) {
+ _currentCensorshipFlag = iFlagStatus;
+ }
+
+ /** Set the fare value. */
+ void setFare(Fare_T& iFare) {
+ _fare = iFare;
+ }
+
+ /** Set the adjusted fare value. */
+ void setAdjustedYield(Yield_T& iYield) {
+ _adjustedYield = iYield;
+ }
+
+ /** Set the yield value. */
+ void setYield(Yield_T& iYield) {
+ _yield = iYield;
+ }
+
+ /** Set the unconstrained demand. */
+ void setUnconstrainedDemand (NbOfBookings_T& iDemand) {
+ _unconstrainedDemand = iDemand;
+ }
+
+ /** Set the total bookings for the DCP. */
+ void setDCPTotalNbOfBookings (NbOfBookings_T& iBookings) {
+ _lastDCPTotalNbOfBookings = iBookings;
+ }
+
+ /** Set the remaining demand mean. */
+ void setRemainingDemandMean (NbOfBookings_T&);
+
+ /** Set the remaining demand mean for the net booking product. */
+ void setRemainingProductDemandMean (NbOfBookings_T& iMean) {
+ _remainingProductDemandMean = iMean;
+ }
+
+ /** Set the remaining demand standard deviation. */
+ void setRemainingDemandSD (NbOfBookings_T&);
+
+ /** Set the remaining demand standard deviation. */
+ void setRemainingProductDemandSD (NbOfBookings_T& iSD) {
+ _remainingProductDemandSD = iSD;
+ }
+
+ public:
// /////////// Display support methods /////////
/** Dump a Business Object into an output stream.
@param ostream& the output stream. */
@@ -58,6 +249,79 @@
// Attributes
/** The key of both structure and content objects. */
BomKey_T _key;
+
+ /** Number of current bookings in the booking. */
+ NbOfBookings_T _nbOfBookings;
+
+ /** Total number of bookings (without substraction of cancellation). */
+ NbOfBookings_T _totalNbOfBookings;
+
+ /** Total number of bookings at the last DCP (without
+ substraction of cancellation). */
+ NbOfBookings_T _lastDCPTotalNbOfBookings;
+
+ /** Unconstraining demnd value (last RMS Computation).*/
+ NbOfBookings_T _unconstrainedDemand;
+
+ /** Number of cancelled demands. */
+ NbOfCancellations_T _nbOfCancellations;
+
+ /** Number of no-shows. */
+ NbOfNoShows_T _nbOfNoShows;
+
+ /** Number of available seats. */
+ Availability_T _availability;
+
+ /** Total Revenue of the booking. */
+ Revenue_T _classRevenue;
+
+ /** Current Censorship flag which indicates whether the demand
+ is censored. */
+ CensorshipFlag_T _currentCensorshipFlag;
+
+ /** List of censorship flags which indicates whether the demand
+ is censored (one flag per DCP). */
+ CensorshipFlagList_T _censorshipFlagList;
+
+ /** Value of the booking limit of the booking. */
+ BookingLimit_T _bookingLimit;
+
+ /** Value of the authorization level of the booking. */
+ AuthorizationLevel_T _authorizationLevel;
+
+ /** MAX of Authorization Level (AU). */
+ AuthorizationLevel_T _MAX;
+
+ /** MIN of Authorization Level (AU). */
+ AuthorizationLevel_T _MIN;
+
+ /** Rate of allowed overbooking. */
+ OverbookingRate_T _overbookingRate;
+
+ /** Current Fare value of the booking. */
+ Fare_T _fare;
+
+ /** Current Adjusted Fare value of the booking. */
+ Yield_T _adjustedYield;
+
+ /** Current Yield value of the booking. */
+ Yield_T _yield;
+
+ /** Temporary attributes just for the forecaster prototype. */
+ /** Remaining demand mean for the whole booking. */
+ NbOfBookings_T _remainingDemandMean;
+
+ /** Remaining demand mean for the product corresponding to this booking
+ (excluding (OnDs)). */
+ NbOfBookings_T _remainingProductDemandMean;
+
+ /** Remaining demand standrad deviation for the whole booking. */
+ NbOfBookings_T _remainingDemandSD;
+
+ /** Remaining demand standard deviation for the product
+ corresponding to this booking (excluding (OnDs)). */
+ NbOfBookings_T _remainingProductDemandSD;
+
};
}
Modified: trunk/stdair/stdair/bom/BookingClassMap.cpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClassMap.cpp 2009-10-28 10:05:59 UTC (rev 58)
+++ trunk/stdair/stdair/bom/BookingClassMap.cpp 2009-11-04 10:39:37 UTC (rev 59)
@@ -45,6 +45,12 @@
BookingClassMap_T::reverse_iterator BookingClassMap_T::rend () const {
return _bookingClassHolder.mapREnd ();
}
-
+
+ // //////////////////////////////////////////////////////////////////////
+ BookingClassMap_T::
+ iterator BookingClassMap_T::find (const MapKey_T& iKey) const {
+ return _bookingClassHolder.find (iKey);
+ }
+
}
Modified: trunk/stdair/stdair/bom/BookingClassMap.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClassMap.hpp 2009-10-28 10:05:59 UTC (rev 58)
+++ trunk/stdair/stdair/bom/BookingClassMap.hpp 2009-11-04 10:39:37 UTC (rev 59)
@@ -50,6 +50,10 @@
return the reverse iterator at the end of the map. */
reverse_iterator rend () const;
+ /** Retrieve, if existing, the BookingClass corresponding to the
+ given key. */
+ iterator find (const MapKey_T&) const;
+
public:
/** Default constructors. */
BookingClassMap_T ();
Added: trunk/stdair/stdair/bom/DoWStruct.cpp
===================================================================
--- trunk/stdair/stdair/bom/DoWStruct.cpp (rev 0)
+++ trunk/stdair/stdair/bom/DoWStruct.cpp 2009-11-04 10:39:37 UTC (rev 59)
@@ -0,0 +1,75 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// C
+#include <assert.h>
+// STL
+#include <sstream>
+// STDAIR
+#include <stdair/basic/BasConst_Period_BOM.hpp>
+#include <stdair/bom/DoWStruct.hpp>
+
+namespace stdair {
+
+ // //////////////////////////////////////////////////////////////////////
+ DoWStruct_T::DoWStruct_T (const std::string& iDowString) {
+ const unsigned short lDowStringSize = iDowString.size();
+ assert (lDowStringSize == 7);
+
+ _dowList.reserve (lDowStringSize);
+ for (std::string::const_iterator itChar = iDowString.begin();
+ itChar != iDowString.end(); ++itChar) {
+ const bool isDoWSet = (*itChar == '1')?true:false;
+ _dowList.push_back (isDoWSet);
+ }
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ DoWStruct_T::DoWStruct_T (const DoWStruct_T& iDowStruct) :
+ _dowList (iDowStruct._dowList) {
+
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ const std::string DoWStruct_T::describeShort() const {
+ std::ostringstream ostr;
+ short i = 0;
+ for (BooleanList_T::const_iterator itDoW = _dowList.begin();
+ itDoW != _dowList.end(); ++itDoW, ++i) {
+ const char lDoW = (*itDoW == true)?'1':'0';
+ ostr << lDoW;
+ }
+ return ostr.str();
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ const std::string DoWStruct_T::describe() const {
+ std::ostringstream ostr;
+ short i = 0;
+ for (BooleanList_T::const_iterator itDoW = _dowList.begin();
+ itDoW != _dowList.end(); ++itDoW, ++i) {
+ const bool lDoW = *itDoW;
+ if (lDoW == true) {
+ ostr << DOW_STR[i] << ".";
+ }
+ }
+ return ostr.str();
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ bool DoWStruct_T::getDayOfWeek (const unsigned short i) const {
+ return _dowList.at (i);
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ bool DoWStruct_T::getStandardDayOfWeek (const unsigned short i) const {
+ unsigned short iStd = i;
+ if (iStd == 0) {
+ iStd = 6;
+ } else {
+ --iStd;
+ }
+ return _dowList.at (iStd);
+ }
+
+}
Added: trunk/stdair/stdair/bom/DoWStruct.hpp
===================================================================
--- trunk/stdair/stdair/bom/DoWStruct.hpp (rev 0)
+++ trunk/stdair/stdair/bom/DoWStruct.hpp 2009-11-04 10:39:37 UTC (rev 59)
@@ -0,0 +1,51 @@
+#ifndef __STDAIR_BOM_DOWSTRUCT_HPP
+#define __STDAIR_BOM_DOWSTRUCT_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STL
+#include <string>
+#include <vector>
+// STDAIR
+#include <stdair/bom/StructAbstract.hpp>
+
+namespace stdair {
+
+ /** Define a Day Of the Week (DoW) sequence.
+ <br>For instance, 1..11.1 means that the period is active on
+ Mon., Thu., Fri. and Sun. */
+ struct DoWStruct_T : public StructAbstract {
+ public:
+ /** Define the bit set representing the DoW. */
+ typedef std::vector<bool> BooleanList_T;
+
+ /** Attributes. */
+ BooleanList_T _dowList;
+
+ /** Get the i-th day of the week (Monday being the first one). */
+ bool getDayOfWeek (const unsigned short i) const;
+
+ /** Get the i-th day of the week (Sunday being the first one). */
+ bool getStandardDayOfWeek (const unsigned short i) const;
+
+ /** Display explicitly (e.g., "Mon.Tue.Wed.Thu.Fri."). */
+ const std::string describe() const;
+
+ /** Display as a bit set (e.g., "1111100"). */
+ const std::string describeShort() const;
+
+ public:
+ /** Constructor from a given bit set (e.g., "0000011" for the
+ week-ends). */
+ DoWStruct_T (const std::string& iDowString);
+
+ /** Default constructor. */
+ DoWStruct_T ();
+
+ /** Default constructor. */
+ DoWStruct_T (const DoWStruct_T&);
+ };
+
+}
+#endif // __STDAIR_BOM_DOWSTRUCT_HPP
Modified: trunk/stdair/stdair/bom/FlightDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-28 10:05:59 UTC (rev 58)
+++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-11-04 10:39:37 UTC (rev 59)
@@ -51,6 +51,56 @@
typedef LegDate SecondContentChild_T;
public:
+ // /////////// Getters /////////////
+ /** Get a SegmentDateList_T for iteration methods. */
+ SegmentDateList_T getSegmentDateList () const;
+
+ /** Get a SegmentDateMap_T for iteration methods. */
+ SegmentDateMap_T getSegmentDateMap () const;
+
+ /** Get a LegDateList_T for iteration methods. */
+ LegDateList_T getLegDateList () const;
+
+ /** Get a LegDateMap_T for iteration methods. */
+ LegDateMap_T getLegDateMap () const;
+
+ /** Get the list of class structures */
+ // BookingClassMap_T getClassList() const {
+// return _bookingClassList;
+// }
+
+ /** Get the airline code (from the parent class). */
+ // const AirlineCode_T& getAirlineCode() const;
+
+// /** Retrieve, if existing, the LegDate corresponding to the
+// given board point (LegDate key).
+// <br>If not existing, return the NULL pointer. */
+// LegDate* getLegDate (const AirportCode_T& iBoardPoint) const;
+
+// /** Retrieve, if existing, the SegmentDate corresponding to the
+// given (board point, off point) pair (SegmentDate key).
+// <br>If not existing, return the NULL pointer. */
+// SegmentDate* getSegmentDate (const AirportCode_T& iBoardPoint,
+// const AirportCode_T& iOffPoint) const;
+
+// /** Return the BookingClass corresponding to a given key.
+// <br>When no BookingClass, matching the given key, can be found,
+// the NULL pointer is returned.
+// <br>Otherwise, a pointer is returned on the BookingClass object. */
+// BookingClass* getBookingClass (const std::string&) const;
+
+// /** Retrieve, if existing, theOnD corresponding to the
+// given OnDKey.
+// <br>If not existing, return the NULL pointer. */
+// OnD* getOnD (const OnDKey_T& iOnDKey) const;
+
+ private:
+ /** Retrieve the BOM structure object. */
+ BomStructure_T& getBomStructure () {
+ return _flightDateStructure;
+ }
+
+ public:
// /////////// Display support methods /////////
/** Dump a Business Object into an output stream.
@param ostream& the output stream. */
@@ -71,26 +121,9 @@
at the same level). */
const std::string describeShortKey() const;
- public:
- // /////////// Getters /////////////
- /** Get a SegmentDateList_T for iteration methods. */
- SegmentDateList_T getSegmentDateList () const;
+ /** Display the full FlightDate context. */
+ //const std::string display() con...
[truncated message content] |
|
From: <qua...@us...> - 2009-10-28 10:06:10
|
Revision: 58
http://stdair.svn.sourceforge.net/stdair/?rev=58&view=rev
Author: quannaus
Date: 2009-10-28 10:05:59 +0000 (Wed, 28 Oct 2009)
Log Message:
-----------
[Dev] Some changes in factory.
Modified Paths:
--------------
trunk/stdair/stdair/factory/FacBomContent.hpp
Modified: trunk/stdair/stdair/factory/FacBomContent.hpp
===================================================================
--- trunk/stdair/stdair/factory/FacBomContent.hpp 2009-10-28 09:38:19 UTC (rev 57)
+++ trunk/stdair/stdair/factory/FacBomContent.hpp 2009-10-28 10:05:59 UTC (rev 58)
@@ -30,8 +30,12 @@
/** Create the root of the BOM tree, i.e., a pair of linked
BomRootStructure and BomRoot objects. */
template <typename BOM_ROOT>
- BOM_ROOT& create (typename BOM_ROOT::BomKey_T iKey) {
- BOM_ROOT& lBomRoot = createInternal<BOM_ROOT>(iKey);
+ BOM_ROOT& create () {
+ // Define the typename for BomRootKey.
+ typedef typename BOM_ROOT::BomKey_T BOM_ROOT_KEY_T;
+ // Create the BOM root object.
+ BOM_ROOT_KEY_T lBomRootKey;
+ BOM_ROOT& lBomRoot = createInternal<BOM_ROOT>(lBomRootKey);
return lBomRoot;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qua...@us...> - 2009-10-28 09:38:28
|
Revision: 57
http://stdair.svn.sourceforge.net/stdair/?rev=57&view=rev
Author: quannaus
Date: 2009-10-28 09:38:19 +0000 (Wed, 28 Oct 2009)
Log Message:
-----------
[Dev] Some changes in the constructors.
Modified Paths:
--------------
trunk/stdair/stdair/bom/AirlineFeature.cpp
trunk/stdair/stdair/bom/AirlineFeature.hpp
trunk/stdair/stdair/bom/AirlineFeatureContent.cpp
trunk/stdair/stdair/bom/AirlineFeatureContent.hpp
trunk/stdair/stdair/bom/BomRootContent.hpp
trunk/stdair/stdair/bom/BomRootKey.hpp
trunk/stdair/stdair/bom/OptimizerStruct.cpp
trunk/stdair/stdair/bom/OptimizerStruct.hpp
trunk/stdair/stdair/factory/FacBomContent.hpp
Modified: trunk/stdair/stdair/bom/AirlineFeature.cpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeature.cpp 2009-10-27 16:23:33 UTC (rev 56)
+++ trunk/stdair/stdair/bom/AirlineFeature.cpp 2009-10-28 09:38:19 UTC (rev 57)
@@ -12,13 +12,8 @@
// ////////////////////////////////////////////////////////////////////
AirlineFeature::
AirlineFeature (const BomKey_T& iKey,
- const ForecasterMode_T& iForecastMode,
- const HistoricalDataLimit_T& iHistoricalDataLimit,
- const OptimizerStruct_T& iOptimizerStruct,
- const ControlMode_T& iControlMode,
BomStructure_T& ioAirlineFeatureStructure)
- : AirlineFeatureContent (iKey, iForecastMode, iHistoricalDataLimit,
- iOptimizerStruct, iControlMode),
+ : AirlineFeatureContent (iKey),
_airlineFeatureStructure (ioAirlineFeatureStructure) {
}
@@ -26,6 +21,16 @@
AirlineFeature::~AirlineFeature () {
}
+ // ////////////////////////////////////////////////////////////////////
+ void AirlineFeature::
+ init (const ForecasterMode_T& iForecastMode,
+ const HistoricalDataLimit_T& iHistoricalDataLimit,
+ const OptimizerStruct_T& iOptimizerStruct,
+ const ControlMode_T& iControlMode) {
+ AirlineFeatureContent::init (iForecastMode, iHistoricalDataLimit,
+ iOptimizerStruct, iControlMode);
+ }
+
// //////////////////////////////////////////////////////////////////////
void AirlineFeature::toStream (std::ostream& ioOut) const {
ioOut << toString() << std::endl;
Modified: trunk/stdair/stdair/bom/AirlineFeature.hpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeature.hpp 2009-10-27 16:23:33 UTC (rev 56)
+++ trunk/stdair/stdair/bom/AirlineFeature.hpp 2009-10-28 09:38:19 UTC (rev 57)
@@ -40,6 +40,12 @@
typedef AirlineFeature ContentChild_T;
public:
+ // //////////// Setters //////////
+ /** Intialization method. */
+ void init (const ForecasterMode_T&, const HistoricalDataLimit_T&,
+ const OptimizerStruct_T&, const ControlMode_T&);
+
+ public:
// /////////// Display support methods /////////
/** Dump a Business Object into an output stream.
@param ostream& the output stream. */
@@ -75,9 +81,7 @@
/** Default constructors. */
AirlineFeature ();
AirlineFeature (const AirlineFeature&);
- AirlineFeature (const BomKey_T&, const ForecasterMode_T&,
- const HistoricalDataLimit_T&, const OptimizerStruct_T&,
- const ControlMode_T&, BomStructure_T&);
+ AirlineFeature (const BomKey_T&, BomStructure_T&);
/** Destructor. */
virtual ~AirlineFeature();
Modified: trunk/stdair/stdair/bom/AirlineFeatureContent.cpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureContent.cpp 2009-10-27 16:23:33 UTC (rev 56)
+++ trunk/stdair/stdair/bom/AirlineFeatureContent.cpp 2009-10-28 09:38:19 UTC (rev 57)
@@ -10,19 +10,25 @@
// ////////////////////////////////////////////////////////////////////
AirlineFeatureContent::
- AirlineFeatureContent (const BomKey_T& iKey,
- const ForecasterMode_T& iForecastMode,
- const HistoricalDataLimit_T& iHistoricalDataLimit,
- const OptimizerStruct_T& iOptimizerStruct,
- const ControlMode_T& iControlMode)
- : _key (iKey), _forecasterMode (iForecastMode),
- _historicalDataLimit (iHistoricalDataLimit),
- _optimizerStruct (iOptimizerStruct), _controlMode (iControlMode){
+ AirlineFeatureContent (const BomKey_T& iKey)
+ : _key (iKey) {
}
// ////////////////////////////////////////////////////////////////////
AirlineFeatureContent::~AirlineFeatureContent () {
}
+ // ////////////////////////////////////////////////////////////////////
+ void AirlineFeatureContent::
+ init (const ForecasterMode_T& iForecastMode,
+ const HistoricalDataLimit_T& iHistoricalDataLimit,
+ const OptimizerStruct_T& iOptimizerStruct,
+ const ControlMode_T& iControlMode) {
+ _forecasterMode = iForecastMode;
+ _historicalDataLimit = iHistoricalDataLimit;
+ _optimizerStruct = iOptimizerStruct;
+ _controlMode = iControlMode;
+ }
+
}
Modified: trunk/stdair/stdair/bom/AirlineFeatureContent.hpp
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureContent.hpp 2009-10-27 16:23:33 UTC (rev 56)
+++ trunk/stdair/stdair/bom/AirlineFeatureContent.hpp 2009-10-28 09:38:19 UTC (rev 57)
@@ -25,6 +25,12 @@
const BomKey_T& getKey() const {
return _key;
}
+
+ public:
+ // //////////// Setters //////////
+ /** Intialization method. */
+ void init (const ForecasterMode_T&, const HistoricalDataLimit_T&,
+ const OptimizerStruct_T&, const ControlMode_T&);
public:
// /////////// Display support methods /////////
@@ -50,10 +56,9 @@
protected:
/** Default constructors. */
- AirlineFeatureContent (const BomKey_T&, const ForecasterMode_T&,
- const HistoricalDataLimit_T&,
- const OptimizerStruct_T&, const ControlMode_T&);
+ AirlineFeatureContent ();
AirlineFeatureContent (const AirlineFeatureContent&);
+ AirlineFeatureContent (const BomKey_T&);
/** Destructor. */
virtual ~AirlineFeatureContent();
Modified: trunk/stdair/stdair/bom/BomRootContent.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomRootContent.hpp 2009-10-27 16:23:33 UTC (rev 56)
+++ trunk/stdair/stdair/bom/BomRootContent.hpp 2009-10-28 09:38:19 UTC (rev 57)
@@ -24,11 +24,6 @@
return _key;
}
- /** Get the update/creation date for the world schedule data. */
- const Date_T& getUpdateDate() const {
- return _updateDate;
- }
-
/** Get the number of generated flight dates. */
const NbOfFlightDates_T getNumberOfFlightDates() const {
return _flightDateCounter;
@@ -77,11 +72,6 @@
public:
// ///////// Setters //////////
- /** Set the update/creation date for the world schdule data. */
- void setUpdateDate (const Date_T& iUpdateDate) {
- _updateDate = iUpdateDate;
- }
-
/** Set the revenue amount. */
void setRevenue (const Revenue_T& iWCRevenue) {
_worldScheduleRevenue = iWCRevenue;
@@ -147,9 +137,6 @@
/** The key of both structure and content objects. */
BomKey_T _key;
- /** Update/creation date for the World Schedule data. */
- Date_T _updateDate;
-
/** Counter of all generated flight dates in the world schedule. */
NbOfFlightDates_T _flightDateCounter;
Modified: trunk/stdair/stdair/bom/BomRootKey.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomRootKey.hpp 2009-10-27 16:23:33 UTC (rev 56)
+++ trunk/stdair/stdair/bom/BomRootKey.hpp 2009-10-28 09:38:19 UTC (rev 57)
@@ -16,11 +16,9 @@
// /////////// Construction ///////////
/** Constructor. */
BomRootKey_T ();
-
/** Destructor. */
~BomRootKey_T ();
-
// /////////// Display support methods /////////
/** Dump a Business Object Key into an output stream.
@param ostream& the output stream. */
@@ -39,7 +37,6 @@
private:
// Attributes
- // No attributes, as that class corresponds to the root of Bom structure.
};
}
Modified: trunk/stdair/stdair/bom/OptimizerStruct.cpp
===================================================================
--- trunk/stdair/stdair/bom/OptimizerStruct.cpp 2009-10-27 16:23:33 UTC (rev 56)
+++ trunk/stdair/stdair/bom/OptimizerStruct.cpp 2009-10-28 09:38:19 UTC (rev 57)
@@ -5,8 +5,11 @@
#include <stdair/bom/OptimizerStruct.hpp>
namespace stdair {
-
// ///////////////////////////////////////////////////////////////////
+ OptimizerStruct_T::OptimizerStruct_T () {
+ }
+
+ // ///////////////////////////////////////////////////////////////////
OptimizerStruct_T::OptimizerStruct_T
(const OptimizerMode_T& iOptimizerMode,
const SellupFlagForOptimizer_T& iSellupFlagForOptimizer,
@@ -29,6 +32,16 @@
}
// ////////////////////////////////////////////////////////////////////
+ void OptimizerStruct_T::
+ init (const OptimizerMode_T& iOptimizerMode,
+ const SellupFlagForOptimizer_T& iSellupFlagForOptimizer,
+ const SellupProbabilityVector_T& iSellupProbabilityVectorForOptimizer) {
+ _optimizerMode = iOptimizerMode;
+ _sellupFlagForOptimizer = iSellupFlagForOptimizer;
+ _sellupProbabilityVectorForOptimizer = iSellupProbabilityVectorForOptimizer;
+ }
+
+ // ////////////////////////////////////////////////////////////////////
const std::string OptimizerStruct_T::describe() const {
std::ostringstream ostr;
ostr << _optimizerMode
Modified: trunk/stdair/stdair/bom/OptimizerStruct.hpp
===================================================================
--- trunk/stdair/stdair/bom/OptimizerStruct.hpp 2009-10-27 16:23:33 UTC (rev 56)
+++ trunk/stdair/stdair/bom/OptimizerStruct.hpp 2009-10-28 09:38:19 UTC (rev 57)
@@ -28,6 +28,11 @@
getSellupProbabilityVectorForOptimizer() const {
return _sellupProbabilityVectorForOptimizer;
}
+
+ // ////////// Setters ////////////
+ /** Initialization method. */
+ void init (const OptimizerMode_T&,const SellupFlagForOptimizer_T&,
+ const SellupProbabilityVector_T&);
// ///////// Display Methods //////////
/** Display the structure. */
@@ -37,6 +42,8 @@
const std::string describeSellupProbabilityVector() const;
public:
+ /** Default constructor. */
+ OptimizerStruct_T ();
/** Constructor. */
OptimizerStruct_T (const OptimizerMode_T&,
const SellupFlagForOptimizer_T&,
@@ -46,11 +53,7 @@
/** Defaut destructor. */
~OptimizerStruct_T ();
- private:
- /** Default constructor. */
- OptimizerStruct_T ();
-
private:
// /////////////// Attributes //////////
/** Attributes. */
Modified: trunk/stdair/stdair/factory/FacBomContent.hpp
===================================================================
--- trunk/stdair/stdair/factory/FacBomContent.hpp 2009-10-27 16:23:33 UTC (rev 56)
+++ trunk/stdair/stdair/factory/FacBomContent.hpp 2009-10-28 09:38:19 UTC (rev 57)
@@ -30,12 +30,8 @@
/** Create the root of the BOM tree, i.e., a pair of linked
BomRootStructure and BomRoot objects. */
template <typename BOM_ROOT>
- BOM_ROOT& create () {
- // Define the typename for BomRootKey.
- typedef typename BOM_ROOT::BomKey_T BOM_ROOT_KEY_T;
- // Create the BOM root object.
- BOM_ROOT_KEY_T lBomRootKey;
- BOM_ROOT& lBomRoot = createInternal<BOM_ROOT>(lBomRootKey);
+ BOM_ROOT& create (typename BOM_ROOT::BomKey_T iKey) {
+ BOM_ROOT& lBomRoot = createInternal<BOM_ROOT>(iKey);
return lBomRoot;
}
@@ -104,90 +100,7 @@
return *aBomContent_ptr;
}
-
- // //////////////////// AirlineFeature //////////////////////////
public:
- /** Create a AirlineFeature object. */
- template <typename BOM_CONTENT_CHILD>
- BOM_CONTENT_CHILD&
- createAirlineFeature (typename BOM_CONTENT_CHILD::Parent_T& ioContentParent,
- const typename BOM_CONTENT_CHILD::BomKey_T& iKey,
- const ForecasterMode_T& iForecastMode,
- const HistoricalDataLimit_T& iHistoricalDataLimit,
- const OptimizerStruct_T& iOptimizerStruct,
- const ControlMode_T& iControlMode) {
-
- // Create the child structure object for the given key
- BOM_CONTENT_CHILD& lBomContentChild =
- createInternalAirlineFeature<BOM_CONTENT_CHILD> (iKey, iForecastMode,
- iHistoricalDataLimit,
- iOptimizerStruct,
- iControlMode);
-
- // Retrieve the child structure object
- typename BOM_CONTENT_CHILD::BomStructure_T& lBomStructureChild =
- lBomContentChild.getBomStructure ();
-
- // Type for the parent Bom content
- typedef typename BOM_CONTENT_CHILD::Parent_T PARENT_CONTENT_T;
-
- // Type for the parent Bom structure
- typedef typename PARENT_CONTENT_T::BomStructure_T PARENT_STRUCTURE_T;
-
- // Retrieve the parent structure object
- PARENT_STRUCTURE_T& lBomStructureParent =
- ioContentParent.getBomStructure ();
-
- // Type for the child Bom structure
- typedef typename BOM_CONTENT_CHILD::BomStructure_T CHILD_STRUCTURE_T;
-
- // Link both the parent and child structure objects
- const bool hasLinkBeenSuccessful = FacBomStructure::
- linkBomParentWithBomChild<CHILD_STRUCTURE_T> (lBomStructureParent,
- lBomStructureChild);
-
- if (hasLinkBeenSuccessful == false) {
- throw new MemoryAllocationException();
- }
-
- return lBomContentChild;
- }
-
- private:
- /** Create a AirlineFeature object. */
- template <typename BOM_CONTENT>
- BOM_CONTENT&
- createInternalAirlineFeature (const typename BOM_CONTENT::BomKey_T& iKey,
- const ForecasterMode_T& iForecastMode,
- const HistoricalDataLimit_T& iHistoricalDataLimit,
- const OptimizerStruct_T& iOptimizerStruct,
- const ControlMode_T& iControlMode) {
-
- // Create the structure/holder object
- typedef typename BOM_CONTENT::BomStructure_T BOM_STRUCTURE_T;
- BOM_STRUCTURE_T& lBomStructure =
- FacBomStructure::instance().create<BOM_STRUCTURE_T> ();
-
- // The created flight-date content (BomContent) object gets a constant
- // reference on its corresponding flight-date structure/holder object
- BOM_CONTENT* aBomContent_ptr = new BOM_CONTENT (iKey,
- iForecastMode,
- iHistoricalDataLimit,
- iOptimizerStruct,
- iControlMode,
- lBomStructure);
- assert (aBomContent_ptr != NULL);
-
- // The new object is added to the pool of content objects
- _contentPool.push_back (aBomContent_ptr);
-
- // Link the structure/holder object with its corresponding content object
- setContent<BOM_STRUCTURE_T, BOM_CONTENT> (lBomStructure, *aBomContent_ptr);
-
- return *aBomContent_ptr;
- }
-
- public:
/** Provide the unique instance.
<br>The singleton is instantiated when first used.
@return FacBomContent& */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qua...@us...> - 2009-10-27 16:23:46
|
Revision: 56
http://stdair.svn.sourceforge.net/stdair/?rev=56&view=rev
Author: quannaus
Date: 2009-10-27 16:23:33 +0000 (Tue, 27 Oct 2009)
Log Message:
-----------
[Dev] Added AirlineFeature.
Modified Paths:
--------------
trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp
trunk/stdair/stdair/bom/BomRoot.cpp
trunk/stdair/stdair/bom/BookingClassStructure.hpp
trunk/stdair/stdair/bom/FlightDateStructure.hpp
trunk/stdair/stdair/bom/Inventory.cpp
trunk/stdair/stdair/bom/InventoryStructure.hpp
trunk/stdair/stdair/bom/LegCabinStructure.hpp
trunk/stdair/stdair/bom/LegDateStructure.hpp
trunk/stdair/stdair/bom/SegmentCabinStructure.hpp
trunk/stdair/stdair/bom/SegmentDateStructure.hpp
trunk/stdair/stdair/bom/sources.mk
trunk/stdair/stdair/factory/FacBomContent.hpp
Added Paths:
-----------
trunk/stdair/stdair/bom/AirlineFeature.cpp
trunk/stdair/stdair/bom/AirlineFeature.hpp
trunk/stdair/stdair/bom/AirlineFeatureContent.cpp
trunk/stdair/stdair/bom/AirlineFeatureContent.hpp
trunk/stdair/stdair/bom/AirlineFeatureKey.cpp
trunk/stdair/stdair/bom/AirlineFeatureKey.hpp
trunk/stdair/stdair/bom/AirlineFeatureList.cpp
trunk/stdair/stdair/bom/AirlineFeatureList.hpp
trunk/stdair/stdair/bom/AirlineFeatureMap.cpp
trunk/stdair/stdair/bom/AirlineFeatureMap.hpp
trunk/stdair/stdair/bom/AirlineFeatureSet.cpp
trunk/stdair/stdair/bom/AirlineFeatureSet.hpp
trunk/stdair/stdair/bom/AirlineFeatureSetContent.cpp
trunk/stdair/stdair/bom/AirlineFeatureSetContent.hpp
trunk/stdair/stdair/bom/AirlineFeatureSetKey.cpp
trunk/stdair/stdair/bom/AirlineFeatureSetKey.hpp
trunk/stdair/stdair/bom/AirlineFeatureSetStructure.hpp
trunk/stdair/stdair/bom/AirlineFeatureSetTypes.hpp
trunk/stdair/stdair/bom/AirlineFeatureStructure.hpp
trunk/stdair/stdair/bom/AirlineFeatureTypes.hpp
trunk/stdair/stdair/bom/OptimizerStruct.cpp
trunk/stdair/stdair/bom/OptimizerStruct.hpp
Copied: trunk/stdair/stdair/bom/AirlineFeature.cpp (from rev 55, trunk/stdair/stdair/bom/BookingClass.cpp)
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeature.cpp (rev 0)
+++ trunk/stdair/stdair/bom/AirlineFeature.cpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -0,0 +1,67 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// C
+#include <assert.h>
+// STDAIR
+#include <stdair/bom/AirlineFeatureStructure.hpp>
+#include <stdair/bom/AirlineFeature.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ AirlineFeature::
+ AirlineFeature (const BomKey_T& iKey,
+ const ForecasterMode_T& iForecastMode,
+ const HistoricalDataLimit_T& iHistoricalDataLimit,
+ const OptimizerStruct_T& iOptimizerStruct,
+ const ControlMode_T& iControlMode,
+ BomStructure_T& ioAirlineFeatureStructure)
+ : AirlineFeatureContent (iKey, iForecastMode, iHistoricalDataLimit,
+ iOptimizerStruct, iControlMode),
+ _airlineFeatureStructure (ioAirlineFeatureStructure) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ AirlineFeature::~AirlineFeature () {
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ void AirlineFeature::toStream (std::ostream& ioOut) const {
+ ioOut << toString() << std::endl;
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ void AirlineFeature::fromStream (std::istream& ioIn) {
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ std::string AirlineFeature::toString() const {
+ std::ostringstream oStr;
+ oStr << describeShortKey() << std::endl;
+ return oStr.str();
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ const std::string AirlineFeature::describe() const {
+ std::ostringstream ostr;
+ ostr << describeKey()
+ << ", " << _forecasterMode
+ << ", " << _historicalDataLimit
+ << ", " << _optimizerStruct.describe()
+ << ", " << _controlMode;
+ return ostr.str();
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ const std::string AirlineFeature::describeKey() const {
+ return _key.toString();
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ const std::string AirlineFeature::describeShortKey() const {
+ return _key.toString();
+ }
+
+}
+
Copied: trunk/stdair/stdair/bom/AirlineFeature.hpp (from rev 55, trunk/stdair/stdair/bom/BookingClass.hpp)
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeature.hpp (rev 0)
+++ trunk/stdair/stdair/bom/AirlineFeature.hpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -0,0 +1,93 @@
+#ifndef __STDAIR_BOM_AIRLINEFEATURE_HPP
+#define __STDAIR_BOM_AIRLINEFEATURE_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/AirlineFeatureSet.hpp>
+#include <stdair/bom/AirlineFeatureStructure.hpp>
+#include <stdair/bom/AirlineFeatureContent.hpp>
+#include <stdair/bom/AirlineFeatureSetTypes.hpp>
+#include <stdair/bom/AirlineFeatureTypes.hpp>
+
+namespace stdair {
+ // Forward declarations
+ class FacBomContent;
+ struct AirlineFeatureKey_T;
+ struct AirlineFeatureList_T;
+ struct AirlineFeatureMap_T;
+
+ /** Class representing the actual functional/business content for a
+ segment-cabin. */
+ class AirlineFeature : public AirlineFeatureContent {
+ friend class FacBomContent;
+
+ public:
+ // Type definitions
+ /** Definition allowing to retrieve the associated parent
+ BOM content type. */
+ typedef AirlineFeatureSet Parent_T;
+
+ /** Definition allowing to retrieve the associated BOM structure type. */
+ typedef AirlineFeatureStructure_T BomStructure_T;
+
+ /** Definition allowing to retrieve the associated BOM key type. */
+ typedef AirlineFeatureKey_T BomKey_T;
+
+ /** Definition allowing to retrieve the associated
+ BOM content child type. */
+ typedef AirlineFeature ContentChild_T;
+
+ public:
+ // /////////// Display support methods /////////
+ /** Dump a Business Object into an output stream.
+ @param ostream& the output stream. */
+ void toStream (std::ostream& ioOut) const;
+
+ /** Read a Business Object from an input stream.
+ @param istream& the input stream. */
+ void fromStream (std::istream& ioIn);
+
+ /** Get the serialised version of the Business Object. */
+ std::string toString() const;
+
+ /** Get a string describing the whole key (differentiating two objects
+ at any level). */
+ const std::string describeKey() const;
+
+ /** Get a string describing the short key (differentiating two objects
+ at the same level). */
+ const std::string describeShortKey() const;
+
+ /** Give a description of the structure (for display purposes). */
+ const std::string describe() const;
+
+ private:
+ /** Retrieve the BOM structure object. */
+ BomStructure_T& getBomStructure () {
+ return _airlineFeatureStructure;
+ }
+
+ protected:
+ /** Constructors are private so as to force the usage of the Factory
+ layer. */
+ /** Default constructors. */
+ AirlineFeature ();
+ AirlineFeature (const AirlineFeature&);
+ AirlineFeature (const BomKey_T&, const ForecasterMode_T&,
+ const HistoricalDataLimit_T&, const OptimizerStruct_T&,
+ const ControlMode_T&, BomStructure_T&);
+
+ /** Destructor. */
+ virtual ~AirlineFeature();
+
+ protected:
+ // Attributes
+ /** Reference structure. */
+ BomStructure_T& _airlineFeatureStructure;
+ };
+
+}
+#endif // __STDAIR_BOM_AIRLINEFEATURE_HPP
+
Copied: trunk/stdair/stdair/bom/AirlineFeatureContent.cpp (from rev 55, trunk/stdair/stdair/bom/BookingClassContent.cpp)
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureContent.cpp (rev 0)
+++ trunk/stdair/stdair/bom/AirlineFeatureContent.cpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -0,0 +1,28 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STL
+#include <cassert>
+// STDAIR
+#include <stdair/bom/AirlineFeatureContent.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ AirlineFeatureContent::
+ AirlineFeatureContent (const BomKey_T& iKey,
+ const ForecasterMode_T& iForecastMode,
+ const HistoricalDataLimit_T& iHistoricalDataLimit,
+ const OptimizerStruct_T& iOptimizerStruct,
+ const ControlMode_T& iControlMode)
+ : _key (iKey), _forecasterMode (iForecastMode),
+ _historicalDataLimit (iHistoricalDataLimit),
+ _optimizerStruct (iOptimizerStruct), _controlMode (iControlMode){
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ AirlineFeatureContent::~AirlineFeatureContent () {
+ }
+
+}
+
Copied: trunk/stdair/stdair/bom/AirlineFeatureContent.hpp (from rev 55, trunk/stdair/stdair/bom/BookingClassContent.hpp)
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureContent.hpp (rev 0)
+++ trunk/stdair/stdair/bom/AirlineFeatureContent.hpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -0,0 +1,81 @@
+#ifndef __STDAIR_BOM_AIRLINEFEATURECONTENT_HPP
+#define __STDAIR_BOM_AIRLINEFEATURECONTENT_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/STDAIR_Types.hpp>
+#include <stdair/bom/BomContent.hpp>
+#include <stdair/bom/AirlineFeatureKey.hpp>
+#include <stdair/bom/OptimizerStruct.hpp>
+
+namespace stdair {
+
+ /** Class representing the actual attributes for an airline booking class. */
+ class AirlineFeatureContent : public BomContent {
+ public:
+ // Type definitions.
+ /** Definition allowing to retrieve the associated BOM key type. */
+ typedef AirlineFeatureKey_T BomKey_T;
+
+ public:
+ // /////////// Getters ////////////
+ /** Get the booking class key. */
+ const BomKey_T& getKey() const {
+ return _key;
+ }
+
+ public:
+ // /////////// Display support methods /////////
+ /** Dump a Business Object into an output stream.
+ @param ostream& the output stream. */
+ virtual void toStream (std::ostream& ioOut) const = 0;
+
+ /** Read a Business Object from an input stream.
+ @param istream& the input stream. */
+ virtual void fromStream (std::istream& ioIn) = 0;
+
+ /** Get the serialised version of the Business Object. */
+ virtual std::string toString() const = 0;
+
+ /** Get a string describing the whole key (differentiating two objects
+ at any level). */
+ virtual const std::string describeKey() const = 0;
+
+ /** Get a string describing the short key (differentiating two objects
+ at the same level). */
+ virtual const std::string describeShortKey() const = 0;
+
+
+ protected:
+ /** Default constructors. */
+ AirlineFeatureContent (const BomKey_T&, const ForecasterMode_T&,
+ const HistoricalDataLimit_T&,
+ const OptimizerStruct_T&, const ControlMode_T&);
+ AirlineFeatureContent (const AirlineFeatureContent&);
+
+ /** Destructor. */
+ virtual ~AirlineFeatureContent();
+
+ protected:
+ // Attributes
+ /** The key of both structure and content objects. */
+ BomKey_T _key;
+
+ /** The type of forecaster. */
+ ForecasterMode_T _forecasterMode;
+
+ /** The size of the moving average window. */
+ HistoricalDataLimit_T _historicalDataLimit;
+
+ /** The type of optimizer. */
+ OptimizerStruct_T _optimizerStruct;
+
+ /** The type of inventory control. */
+ ControlMode_T _controlMode;
+ };
+
+}
+#endif // __STDAIR_BOM_AIRLINEFEATURECONTENT_HPP
+
Copied: trunk/stdair/stdair/bom/AirlineFeatureKey.cpp (from rev 51, trunk/stdair/stdair/bom/InventoryKey.cpp)
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureKey.cpp (rev 0)
+++ trunk/stdair/stdair/bom/AirlineFeatureKey.cpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -0,0 +1,34 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/AirlineFeatureKey.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ AirlineFeatureKey_T::AirlineFeatureKey_T (const AirlineCode_T& iAirlineCode)
+ : _airlineCode (iAirlineCode) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ AirlineFeatureKey_T::~AirlineFeatureKey_T () {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ void AirlineFeatureKey_T::toStream (std::ostream& ioOut) const {
+ ioOut << "AirlineFeatureKey: " << toString() << std::endl;
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ void AirlineFeatureKey_T::fromStream (std::istream& ioIn) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ std::string AirlineFeatureKey_T::toString() const {
+ std::ostringstream oStr;
+ oStr << _airlineCode;
+ return oStr.str();
+ }
+
+}
Copied: trunk/stdair/stdair/bom/AirlineFeatureKey.hpp (from rev 51, trunk/stdair/stdair/bom/InventoryKey.hpp)
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureKey.hpp (rev 0)
+++ trunk/stdair/stdair/bom/AirlineFeatureKey.hpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -0,0 +1,50 @@
+#ifndef __STDAIR_BOM_AIRLINEFEATUREKEY_HPP
+#define __STDAIR_BOM_AIRLINEFEATUREKEY_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/STDAIR_Types.hpp>
+#include <stdair/bom/BomKey.hpp>
+
+namespace stdair {
+ /** Key of AirlineFeature. */
+ struct AirlineFeatureKey_T : public BomKey_T {
+
+ public:
+ // /////////// Construction ///////////
+ /** Constructor. */
+ AirlineFeatureKey_T (const AirlineCode_T& iAirlineCode);
+
+ /** Destructor. */
+ ~AirlineFeatureKey_T ();
+
+ // /////////// Getters //////////
+ /** Get the airline code. */
+ const AirlineCode_T& getAirlineCode() const;
+
+ // /////////// Display support methods /////////
+ /** Dump a Business Object Key into an output stream.
+ @param ostream& the output stream. */
+ void toStream (std::ostream& ioOut) const;
+
+ /** Read a Business Object Key from an input stream.
+ @param istream& the input stream. */
+ void fromStream (std::istream& ioIn);
+
+ /** Get the serialised version of the Business Object Key.
+ <br>That string is unique, at the level of a given Business Object,
+ when among children of a given parent Business Object.
+ <br>For instance, "H" and "K" allow to differentiate among two
+ marketing classes for the same segment-date. */
+ std::string toString() const;
+
+ private:
+ // Attributes
+ /** Airline code. */
+ AirlineCode_T _airlineCode;
+ };
+
+}
+#endif // __STDAIR_BOM_AIRLINEFEATUREKEY_HPP
Copied: trunk/stdair/stdair/bom/AirlineFeatureList.cpp (from rev 47, trunk/stdair/stdair/bom/BookingClassList.cpp)
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureList.cpp (rev 0)
+++ trunk/stdair/stdair/bom/AirlineFeatureList.cpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -0,0 +1,50 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STL
+#include <cassert>
+// STDAIR
+#include <stdair/bom/BomChildrenHolderImp.hpp>
+#include <stdair/bom/AirlineFeature.hpp>
+#include <stdair/bom/AirlineFeatureList.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ AirlineFeatureList_T::
+ AirlineFeatureList_T (const AirlineFeatureHolder_T& iAirlineFeatureHolder)
+ : _airlineFeatureHolder (iAirlineFeatureHolder) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ AirlineFeatureList_T::
+ AirlineFeatureList_T (const AirlineFeatureList_T& iAFList)
+ : _airlineFeatureHolder (iAFList._airlineFeatureHolder) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ AirlineFeatureList_T::~AirlineFeatureList_T () {
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ AirlineFeatureList_T::iterator AirlineFeatureList_T::begin () const {
+ return _airlineFeatureHolder.listBegin ();
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ AirlineFeatureList_T::iterator AirlineFeatureList_T::end () const {
+ return _airlineFeatureHolder.listEnd ();
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ AirlineFeatureList_T::reverse_iterator AirlineFeatureList_T::rbegin () const {
+ return _airlineFeatureHolder.listRBegin ();
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ AirlineFeatureList_T::reverse_iterator AirlineFeatureList_T::rend () const {
+ return _airlineFeatureHolder.listREnd ();
+ }
+
+}
+
Copied: trunk/stdair/stdair/bom/AirlineFeatureList.hpp (from rev 47, trunk/stdair/stdair/bom/BookingClassList.hpp)
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureList.hpp (rev 0)
+++ trunk/stdair/stdair/bom/AirlineFeatureList.hpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -0,0 +1,70 @@
+#ifndef __STDAIR_BOM_AIRLINEFEATURELIST_HPP
+#define __STDAIR_BOM_AIRLINEFEATURELIST_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/AirlineFeatureTypes.hpp>
+
+namespace stdair {
+
+ // Forward declarations
+ template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T;
+ template <typename BOM_STRUCTURE> class BomChildrenHolderImp;
+ class AirlineFeature;
+
+ /** Structure which handles the iterators for a booking class list. */
+ struct AirlineFeatureList_T {
+
+ public:
+ // /////////////////////////////////////////////////////////////////////////
+ // See the explanations, within the stdair::BomContentRoot class, for all
+ // the iterator types specified below
+ // /////////////////////////////////////////////////////////////////////////
+ /** Define the booking class list iterators. */
+ typedef BomIterator_T<AirlineFeature,
+ AirlineFeatureStructureList_T::const_iterator> iterator;
+ typedef BomIterator_T<AirlineFeature,
+ AirlineFeatureStructureList_T::const_reverse_iterator> reverse_iterator;
+ // /////////////////////////////////////////////////////////////////////////
+
+ /** Define the booking class holder. */
+ typedef BomChildrenHolderImp<AirlineFeature> AirlineFeatureHolder_T;
+
+ public:
+ // /////////// Iteration methods //////////
+ /** Initialise the internal iterator on flight date:
+ return the iterator at the begining of the list. */
+ iterator begin () const;
+
+ /** Initialise the internal iterator on flight date:
+ return the iterator at the end of the list. */
+ iterator end () const;
+
+ /** Initialise the internal reverse iterator on flight date:
+ return the reverse iterator at the rbegining of the list. */
+ reverse_iterator rbegin () const;
+
+ /** Initialise the internal reverse iterator on flight date:
+ return the reverse iterator at the end of the list. */
+ reverse_iterator rend () const;
+
+ public:
+ /** Default constructors. */
+ AirlineFeatureList_T ();
+ AirlineFeatureList_T (const AirlineFeatureList_T&);
+ AirlineFeatureList_T (const AirlineFeatureHolder_T&);
+
+ /** Destructor. */
+ virtual ~AirlineFeatureList_T();
+
+ private:
+ // Attributes
+ /** Reference structure. */
+ const AirlineFeatureHolder_T& _airlineFeatureHolder;
+ };
+
+}
+#endif // __STDAIR_BOM_AIRLINEFEATURELIST_HPP
+
Copied: trunk/stdair/stdair/bom/AirlineFeatureMap.cpp (from rev 47, trunk/stdair/stdair/bom/BookingClassList.cpp)
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureMap.cpp (rev 0)
+++ trunk/stdair/stdair/bom/AirlineFeatureMap.cpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -0,0 +1,56 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STL
+#include <cassert>
+// STDAIR
+#include <stdair/bom/BomChildrenHolderImp.hpp>
+#include <stdair/bom/AirlineFeature.hpp>
+#include <stdair/bom/AirlineFeatureMap.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ AirlineFeatureMap_T::
+ AirlineFeatureMap_T (const AirlineFeatureHolder_T& iAirlineFeatureHolder)
+ : _airlineFeatureHolder (iAirlineFeatureHolder) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ AirlineFeatureMap_T::
+ AirlineFeatureMap_T (const AirlineFeatureMap_T& iAFMap)
+ : _airlineFeatureHolder (iAFMap._airlineFeatureHolder) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ AirlineFeatureMap_T::~AirlineFeatureMap_T () {
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ AirlineFeatureMap_T::iterator AirlineFeatureMap_T::begin () const {
+ return _airlineFeatureHolder.mapBegin ();
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ AirlineFeatureMap_T::iterator AirlineFeatureMap_T::end () const {
+ return _airlineFeatureHolder.mapEnd ();
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ AirlineFeatureMap_T::reverse_iterator AirlineFeatureMap_T::rbegin () const {
+ return _airlineFeatureHolder.mapRBegin ();
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ AirlineFeatureMap_T::reverse_iterator AirlineFeatureMap_T::rend () const {
+ return _airlineFeatureHolder.mapREnd ();
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ AirlineFeatureMap_T::iterator AirlineFeatureMap_T::
+ find (const MapKey_T& iKey) const {
+ return _airlineFeatureHolder.find (iKey);
+ }
+
+}
+
Copied: trunk/stdair/stdair/bom/AirlineFeatureMap.hpp (from rev 47, trunk/stdair/stdair/bom/BookingClassList.hpp)
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureMap.hpp (rev 0)
+++ trunk/stdair/stdair/bom/AirlineFeatureMap.hpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -0,0 +1,74 @@
+#ifndef __STDAIR_BOM_AIRLINEFEATUREMAP_HPP
+#define __STDAIR_BOM_AIRLINEFEATUREMAP_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/AirlineFeatureTypes.hpp>
+
+namespace stdair {
+
+ // Forward declarations
+ template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T;
+ template <typename BOM_STRUCTURE> class BomChildrenHolderImp;
+ class AirlineFeature;
+
+ /** Structure which handles the iterators for a booking class map. */
+ struct AirlineFeatureMap_T {
+
+ public:
+ // /////////////////////////////////////////////////////////////////////////
+ // See the explanations, within the stdair::BomRoot class, for all
+ // the iterator types specified below
+ // /////////////////////////////////////////////////////////////////////////
+ /** Define the booking class map iterators. */
+ typedef BomIterator_T<AirlineFeature,
+ AirlineFeatureStructureMap_T::const_iterator> iterator;
+ typedef BomIterator_T<AirlineFeature,
+ AirlineFeatureStructureMap_T::const_reverse_iterator> reverse_iterator;
+ // /////////////////////////////////////////////////////////////////////////
+
+ /** Define the booking class holder. */
+ typedef BomChildrenHolderImp<AirlineFeature> AirlineFeatureHolder_T;
+
+ public:
+ // /////////// Iteration methods //////////
+ /** Initialise the internal iterator on flight date:
+ return the iterator at the begining of the map. */
+ iterator begin () const;
+
+ /** Initialise the internal iterator on flight date:
+ return the iterator at the end of the map. */
+ iterator end () const;
+
+ /** Initialise the internal reverse iterator on flight date:
+ return the reverse iterator at the rbegining of the map. */
+ reverse_iterator rbegin () const;
+
+ /** Initialise the internal reverse iterator on flight date:
+ return the reverse iterator at the end of the map. */
+ reverse_iterator rend () const;
+
+ /** Retrieve, if existing, the AirlineFeature corresponding to the
+ given key. */
+ iterator find (const MapKey_T&) const;
+
+ public:
+ /** Default constructors. */
+ AirlineFeatureMap_T ();
+ AirlineFeatureMap_T (const AirlineFeatureMap_T&);
+ AirlineFeatureMap_T (const AirlineFeatureHolder_T&);
+
+ /** Destructor. */
+ virtual ~AirlineFeatureMap_T();
+
+ private:
+ // Attributes
+ /** Reference structure. */
+ const AirlineFeatureHolder_T& _airlineFeatureHolder;
+ };
+
+}
+#endif // __STDAIR_BOM_AIRLINEFEATUREMAP_HPP
+
Copied: trunk/stdair/stdair/bom/AirlineFeatureSet.cpp (from rev 55, trunk/stdair/stdair/bom/BomRoot.cpp)
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureSet.cpp (rev 0)
+++ trunk/stdair/stdair/bom/AirlineFeatureSet.cpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -0,0 +1,76 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STL
+#include <cassert>
+// STDAIR
+#include <stdair/bom/AirlineFeatureSetStructure.hpp>
+#include <stdair/bom/AirlineFeatureSet.hpp>
+#include <stdair/bom/AirlineFeature.hpp>
+#include <stdair/bom/AirlineFeatureList.hpp>
+#include <stdair/bom/AirlineFeatureMap.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ AirlineFeatureSet::
+ AirlineFeatureSet (const BomKey_T& iKey,
+ BomStructure_T& ioAirlineFeatureSetStructure)
+ : AirlineFeatureSetContent (iKey),
+ _bomRootStructure (ioAirlineFeatureSetStructure) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ AirlineFeatureSet::~AirlineFeatureSet () {
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ const std::string AirlineFeatureSet::display() const {
+ // Store current formatting flags of std::cout
+ std::ios::fmtflags oldFlags = std::cout.flags();
+ std::ostringstream ostr;
+ ostr << "Set of airline features" << std::endl;
+
+ AirlineFeatureList_T lAirlineFeatureList = getAirlineFeatureList();
+ for (AirlineFeatureList_T::iterator itAirlineFeature =
+ lAirlineFeatureList.begin();
+ itAirlineFeature != lAirlineFeatureList.end(); ++itAirlineFeature) {
+ const AirlineFeature& lAirlineFeature = *itAirlineFeature;
+
+ ostr << lAirlineFeature.describe ();
+ }
+
+ // Reset formatting flags of std::cout
+ std::cout.flags (oldFlags);
+
+ return ostr.str();
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ AirlineFeatureList_T AirlineFeatureSet::getAirlineFeatureList () const {
+ return _bomRootStructure.getChildrenList();
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ AirlineFeatureMap_T AirlineFeatureSet::getAirlineFeatureMap () const {
+ return _bomRootStructure.getChildrenList();
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ const AirlineFeature* AirlineFeatureSet::
+ getAirlineFeature (const AirlineCode_T& iAirlineCode) const {
+
+ AirlineFeatureMap_T lAirlineFeatureMap = getAirlineFeatureMap ();
+ AirlineFeatureMap_T::iterator itAirlineFeature =
+ lAirlineFeatureMap.find (iAirlineCode);
+
+ if (itAirlineFeature != lAirlineFeatureMap.end()) {
+ const AirlineFeature* oAirlineFeature_ptr = itAirlineFeature->second;
+ assert (oAirlineFeature_ptr != NULL);
+ return oAirlineFeature_ptr;
+ }
+
+ return NULL;
+ }
+
+}
Copied: trunk/stdair/stdair/bom/AirlineFeatureSet.hpp (from rev 55, trunk/stdair/stdair/bom/BomRoot.hpp)
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureSet.hpp (rev 0)
+++ trunk/stdair/stdair/bom/AirlineFeatureSet.hpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -0,0 +1,99 @@
+#ifndef __STDAIR_BOM_AIRLINEFEATURESET_HPP
+#define __STDAIR_BOM_AIRLINEFEATURESET_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/AirlineFeatureSetStructure.hpp>
+#include <stdair/bom/AirlineFeatureSetContent.hpp>
+#include <stdair/bom/AirlineFeatureSetTypes.hpp>
+#include <stdair/bom/AirlineFeatureTypes.hpp>
+
+namespace stdair {
+ // Forward declarations.
+ class FacBomContent;
+ class AirlineFeature;
+ struct AirlineFeatureSetKey_T;
+ struct AirlineFeatureList_T;
+ struct AirlineFeatureMap_T;
+
+ /** Class representing the actual functional/business content
+ for the Bom root. */
+ class AirlineFeatureSet : public AirlineFeatureSetContent {
+ friend class FacBomContent;
+
+ public:
+ // /////////////////////////////////////////////////////////////////////////
+ /** Definition allowing to retrieve the associated BOM structure type. */
+ typedef AirlineFeatureSetStructure_T BomStructure_T;
+
+ /** Definition allowing to retrieve the associated BOM key type. */
+ typedef AirlineFeatureSetKey_T BomKey_T;
+
+ /** Definition allowing to retrieve the associated
+ BOM content child type. */
+ typedef AirlineFeature ContentChild_T;
+ // /////////////////////////////////////////////////////////////////////////
+
+ public:
+ // /////////// Display support methods /////////
+ /** Dump a Business Object into an output stream.
+ @param ostream& the output stream. */
+ void toStream (std::ostream& ioOut) const { ioOut << toString(); }
+
+ /** Read a Business Object from an input stream.
+ @param istream& the input stream. */
+ void fromStream (std::istream& ioIn) { }
+
+ /** Get the serialised version of the Business Object. */
+ std::string toString() const { return describeKey(); }
+
+ /** Get a string describing the whole key (differentiating two objects
+ at any level). */
+ const std::string describeKey() const { return std::string (""); }
+
+ /** Get a string describing the short key (differentiating two objects
+ at the same level). */
+ const std::string describeShortKey() const { return std::string (""); }
+
+ /** Display the full context of the set of airline features. */
+ const std::string display() const;
+
+ public:
+ // /////////// Getters /////////////
+ /** Retrieve, if existing, the Airline features corresponding to the
+ given airline code.
+ <br>If not existing, return the NULL pointer. */
+ const AirlineFeature* getAirlineFeature (const AirlineCode_T&) const;
+
+ /** Get a AirlineFeatureList_T for iteration methods. */
+ AirlineFeatureList_T getAirlineFeatureList () const;
+
+ /** Get a AirlineFeatureMap_T for iteration methods. */
+ AirlineFeatureMap_T getAirlineFeatureMap () const;
+
+ private:
+ /** Retrieve the BOM structure object. */
+ BomStructure_T& getBomStructure () {
+ return _bomRootStructure;
+ }
+
+ protected:
+ /** Constructors are private so as to force the usage of the Factory
+ layer. */
+ /** Default constructors. */
+ AirlineFeatureSet ();
+ AirlineFeatureSet (const AirlineFeatureSet&);
+ AirlineFeatureSet (const BomKey_T&, BomStructure_T&);
+ /** Destructor. */
+ virtual ~AirlineFeatureSet();
+
+ private:
+ // Attributes
+ /** Reference structure. */
+ BomStructure_T& _bomRootStructure;
+ };
+
+}
+#endif // __STDAIR_BOM_AIRLINEFEATURESET_HPP
Copied: trunk/stdair/stdair/bom/AirlineFeatureSetContent.cpp (from rev 55, trunk/stdair/stdair/bom/BomRootContent.cpp)
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureSetContent.cpp (rev 0)
+++ trunk/stdair/stdair/bom/AirlineFeatureSetContent.cpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -0,0 +1,20 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STL
+#include <cassert>
+// STDAIR
+#include <stdair/bom/AirlineFeatureSetContent.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ AirlineFeatureSetContent::AirlineFeatureSetContent (const BomKey_T& iKey)
+ : _key (iKey) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ AirlineFeatureSetContent::~AirlineFeatureSetContent () {
+ }
+
+}
Copied: trunk/stdair/stdair/bom/AirlineFeatureSetContent.hpp (from rev 55, trunk/stdair/stdair/bom/BomRootContent.hpp)
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureSetContent.hpp (rev 0)
+++ trunk/stdair/stdair/bom/AirlineFeatureSetContent.hpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -0,0 +1,68 @@
+#ifndef __STDAIR_BOM_AIRLINEFEATURESETCONTENT_HPP
+#define __STDAIR_BOM_AIRLINEFEATURESETCONTENT_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/STDAIR_Types.hpp>
+#include <stdair/bom/BomContent.hpp>
+#include <stdair/bom/AirlineFeatureSetKey.hpp>
+
+namespace stdair {
+ /** Class representing the actual attributes for the Bom root. */
+ class AirlineFeatureSetContent : public BomContent {
+
+ public:
+ /** Definition allowing to retrieve the associated BOM key type. */
+ typedef AirlineFeatureSetKey_T BomKey_T;
+
+ public:
+ // /////////// Getters //////////////
+ /** Get the AirlineFeatureSet key. */
+ const BomKey_T& getKey() const {
+ return _key;
+ }
+
+ public:
+ // ///////// Setters //////////
+
+
+ public:
+ // /////////// Display support methods /////////
+ /** Dump a Business Object into an output stream.
+ @param ostream& the output stream. */
+ virtual void toStream (std::ostream& ioOut) const = 0;
+
+ /** Read a Business Object from an input stream.
+ @param istream& the input stream. */
+ virtual void fromStream (std::istream& ioIn) = 0;
+
+ /** Get the serialised version of the Business Object. */
+ virtual std::string toString() const = 0;
+
+ /** Get a string describing the whole key (differentiating two objects
+ at any level). */
+ virtual const std::string describeKey() const = 0;
+
+ /** Get a string describing the short key (differentiating two objects
+ at the same level). */
+ virtual const std::string describeShortKey() const = 0;
+
+ protected:
+ /** Default constructors. */
+ AirlineFeatureSetContent ();
+ AirlineFeatureSetContent (const AirlineFeatureSetContent&);
+ AirlineFeatureSetContent (const BomKey_T& iKey);
+
+ /** Destructor. */
+ virtual ~AirlineFeatureSetContent();
+
+ protected:
+ // Attributes
+ /** The key of both structure and content objects. */
+ BomKey_T _key;
+ };
+
+}
+#endif // __STDAIR_BOM_AIRLINEFEATURESETCONTENT_HPP
Copied: trunk/stdair/stdair/bom/AirlineFeatureSetKey.cpp (from rev 51, trunk/stdair/stdair/bom/BomRootKey.cpp)
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureSetKey.cpp (rev 0)
+++ trunk/stdair/stdair/bom/AirlineFeatureSetKey.cpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -0,0 +1,33 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/AirlineFeatureSetKey.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ AirlineFeatureSetKey_T::AirlineFeatureSetKey_T () {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ AirlineFeatureSetKey_T::~AirlineFeatureSetKey_T () {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ void AirlineFeatureSetKey_T::toStream (std::ostream& ioOut) const {
+ ioOut << "AirlineFeatureSetStructureKey: " << toString() << std::endl;
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ void AirlineFeatureSetKey_T::fromStream (std::istream& ioIn) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ std::string AirlineFeatureSetKey_T::toString() const {
+ std::ostringstream oStr;
+ oStr << " -- AIRLINE FEATURE SET -- ";
+ return oStr.str();
+ }
+
+}
Copied: trunk/stdair/stdair/bom/AirlineFeatureSetKey.hpp (from rev 51, trunk/stdair/stdair/bom/BomRootKey.hpp)
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureSetKey.hpp (rev 0)
+++ trunk/stdair/stdair/bom/AirlineFeatureSetKey.hpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -0,0 +1,46 @@
+#ifndef __STDAIR_BOM_AIRLINEFEATURESETKEY_HPP
+#define __STDAIR_BOM_AIRLINEFEATURESETKEY_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/STDAIR_Types.hpp>
+#include <stdair/bom/BomKey.hpp>
+
+namespace stdair {
+ /** Key of the BOM structure root. */
+ struct AirlineFeatureSetKey_T : public BomKey_T {
+
+ public:
+ // /////////// Construction ///////////
+ /** Constructor. */
+ AirlineFeatureSetKey_T ();
+
+ /** Destructor. */
+ ~AirlineFeatureSetKey_T ();
+
+
+ // /////////// Display support methods /////////
+ /** Dump a Business Object Key into an output stream.
+ @param ostream& the output stream. */
+ void toStream (std::ostream& ioOut) const;
+
+ /** Read a Business Object Key from an input stream.
+ @param istream& the input stream. */
+ void fromStream (std::istream& ioIn);
+
+ /** Get the serialised version of the Business Object Key.
+ <br>That string is unique, at the level of a given Business Object,
+ when among children of a given parent Business Object.
+ <br>For instance, "H" and "K" allow to differentiate among two
+ marketing classes for the same segment-date. */
+ std::string toString() const;
+
+ private:
+ // Attributes
+ // No attributes, as that class corresponds to the root of Bom structure.
+ };
+
+}
+#endif // __STDAIR_BOM_AIRLINEFEATURESETKEY_HPP
Copied: trunk/stdair/stdair/bom/AirlineFeatureSetStructure.hpp (from rev 55, trunk/stdair/stdair/bom/BomRootStructure.hpp)
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureSetStructure.hpp (rev 0)
+++ trunk/stdair/stdair/bom/AirlineFeatureSetStructure.hpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -0,0 +1,121 @@
+#ifndef __STDAIR_BOM_AIRLINEFEATURESETSTRUCTURE_HPP
+#define __STDAIR_BOM_AIRLINEFEATURESETSTRUCTURE_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STL
+#include <cassert>
+// MPL
+#include <boost/mpl/vector.hpp>
+// STDAIR
+#include <stdair/bom/BomStructureDummy.hpp>
+#include <stdair/bom/BomContentDummy.hpp>
+#include <stdair/bom/AirlineFeatureStructure.hpp>
+
+namespace stdair {
+ /** Wrapper class aimed at holding the actual content, modeled
+ by a specific AirlineFeatureSet class. */
+ template <typename BOM_CONTENT>
+ class AirlineFeatureSetStructure : public BomStructure {
+ friend class FacBomStructure;
+ friend class FacBomContent;
+ friend class BomStructure;
+
+ public:
+ // Type definitions
+ /** Definition allowing to retrieve the associated BOM content type. */
+ typedef BOM_CONTENT Content_T;
+
+ /** Definition allowing to retrieve the children type of the
+ BOM_CONTENT. */
+ typedef typename BOM_CONTENT::ContentChild_T ContentChild_T;
+
+ private:
+ // Type definitions
+ /** Definition allowing to retrieve the associated BOM key type. */
+ typedef typename BOM_CONTENT::BomKey_T BomKey_T;
+
+ /** Definition allowing to retrieve the associated children type. */
+ typedef boost::mpl::vector<AirlineFeatureStructure<ContentChild_T>, BomStructureDummy> ChildrenBomTypeList_T;
+
+ /** Definition allowing to retrive the default children bom holder type. */
+ typedef BomChildrenHolderImp<BomContentDummy> DefaultChildrenBomHolder_T;
+
+ /** Definition allowing to retrive the children bom holder type. */
+ typedef BomChildrenHolderImp<ContentChild_T> ChildrenBomHolder_T;
+
+ public:
+ // /////////// Getters /////////////
+ /** Get the AirlineFeatureSet key. */
+ const BomKey_T& getKey () const {
+ assert (_content != NULL);
+ return _content->getKey ();
+ }
+
+ /** Get the list of airline features. */
+ const ChildrenBomHolder_T& getChildrenList() const {
+ assert (_childrenList != NULL);
+ return *_childrenList;
+ }
+
+ /** Get the list of airline features. */
+ void getChildrenList (ChildrenBomHolder_T*& ioChildrenList) {
+ ioChildrenList = _childrenList;
+ }
+
+ private:
+ /////////////// Setters ////////////////
+ /** Default children list setter. */
+ void setChildrenList (DefaultChildrenBomHolder_T&) { }
+
+ /** Set the children list. */
+ void setChildrenList (ChildrenBomHolder_T& ioChildrenList) {
+ _childrenList = &ioChildrenList;
+ }
+
+ public:
+ // /////////// Display support methods /////////
+ /** Dump a Business Object into an output stream.
+ @param ostream& the output stream. */
+ void toStream (std::ostream& ioOut) const {
+ ioOut << toString() << std::endl;
+ }
+
+ /** Read a Business Object from an input stream.
+ @param istream& the input stream. */
+ void fromStream (std::istream& ioIn) { }
+
+ /** Get the serialised version of the Business Object. */
+ std::string toString() const { return describeKey(); }
+
+ /** Get a string describing the whole key (differentiating two objects
+ at any level). */
+ const std::string describeKey() const { return getKey().toString(); }
+
+ /** Get a string describing the short key (differentiating two objects
+ at the same level). */
+ const std::string describeShortKey() const { return getKey().toString(); }
+
+ private:
+ /** Constructors are private so as to force the usage of the Factory
+ layer. */
+ /** Default constructors. */
+ AirlineFeatureSetStructure () : _content (NULL), _childrenList (NULL) { };
+ AirlineFeatureSetStructure (const AirlineFeatureSetStructure&);
+
+ /** Destructor. */
+ ~AirlineFeatureSetStructure () { }
+
+ private:
+ // Attributes
+ /** The actual functional (Business Object) content. */
+ BOM_CONTENT* _content;
+
+ /** List of inventories. */
+ ChildrenBomHolder_T* _childrenList;
+ };
+
+}
+#endif // __STDAIR_BOM_AIRLINEFEATURESETSTRUCTURE_HPP
+
Copied: trunk/stdair/stdair/bom/AirlineFeatureSetTypes.hpp (from rev 51, trunk/stdair/stdair/bom/BomRootTypes.hpp)
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureSetTypes.hpp (rev 0)
+++ trunk/stdair/stdair/bom/AirlineFeatureSetTypes.hpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -0,0 +1,19 @@
+// //////////////////////////////////////////////////////////////////////
+#ifndef __STDAIR_BOM_AIRLINEFEATURESETTYPES_HPP
+#define __STDAIR_BOM_AIRLINEFEATURESETTYPES_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+
+namespace stdair {
+ // Forward declarations.
+ template <typename BOM_CONTENT> class AirlineFeatureSetStructure;
+ class AirlineFeatureSet;
+
+ /** Define the AirlineFeatureSetStructure. */
+ typedef AirlineFeatureSetStructure<AirlineFeatureSet> AirlineFeatureSetStructure_T;
+
+}
+#endif // __STDAIR_BOM_AIRLINEFEATURESETTYPES_HPP
+
Copied: trunk/stdair/stdair/bom/AirlineFeatureStructure.hpp (from rev 55, trunk/stdair/stdair/bom/BookingClassStructure.hpp)
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureStructure.hpp (rev 0)
+++ trunk/stdair/stdair/bom/AirlineFeatureStructure.hpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -0,0 +1,112 @@
+#ifndef __STDAIR_BOM_AIRLINEFEATURESTRUCTURE_HPP
+#define __STDAIR_BOM_AIRLINEFEATURESTRUCTURE_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// MPL
+#include <boost/mpl/vector.hpp>
+// STDAIR
+#include <stdair/bom/BomStructureDummy.hpp>
+#include <stdair/bom/BomContentDummy.hpp>
+
+namespace stdair {
+ /** Wrapper class aimed at holding the actual content, modeled
+ by an external specific AirlineFeature class (for instance,
+ in the AIRSCHED library). */
+ template <class BOM_CONTENT>
+ class AirlineFeatureStructure : public BomStructure {
+ friend class FacBomStructure;
+ friend class FacBomContent;
+ friend class BomStructure;
+
+ public:
+ // Type definitions
+ /** Definition allowing to retrieve the associated BOM content type. */
+ typedef BOM_CONTENT Content_T;
+
+ /** Definition allowing to retrieve the associated BOM key type. */
+ typedef typename BOM_CONTENT::BomKey_T BomKey_T;
+
+ /** Definition allowing to retrieve the associated parent
+ BOM structure type. */
+ typedef typename BOM_CONTENT::Parent_T::BomStructure_T ParentBomStructure_T;
+
+ /** Definition allowing to retrieve the associated children type. */
+ typedef boost::mpl::vector <BomStructureDummy,
+ BomStructureDummy> ChildrenBomTypeList_T;
+
+ /** Definition allowing to retrieve the default children bom holder type. */
+ typedef BomChildrenHolderImp<BomContentDummy> DefaultChildrenBomHolder_T;
+
+ public:
+ // /////////// Getters /////////////
+ /** Get the (parent) AirlineFeatureSetStructure object. */
+ ParentBomStructure_T* getAirlineFeatureSetStructurePtr() const {
+ return _parent;
+ }
+
+ /** Get the (parent) AirlineFeatureSetStructure object. */
+ ParentBomStructure_T& getAirlineFeatureSetStructure() const;
+
+ /** Get the segment-cabin key. */
+ const BomKey_T& getKey() const {
+ assert (_content != NULL);
+ return _content->getKey();
+ }
+
+ private:
+ // /////////// Setters /////////////
+ /** Set the (parent) AirlineFeatureSetStructure object. */
+ void setAirlineFeatureSetStructure (ParentBomStructure_T& ioAirlineFeatureSetStructure){
+ _parent = &ioAirlineFeatureSetStructure;
+ }
+
+ /** Default children list setter. */
+ void setChildrenList (DefaultChildrenBomHolder_T&) { }
+
+ public:
+ // /////////// Display support methods /////////
+ /** Dump a Business Object into an output stream.
+ @param ostream& the output stream. */
+ void toStream (std::ostream& ioOut) const {
+ ioOut << toString() << std::endl;
+ }
+
+ /** Read a Business Object from an input stream.
+ @param istream& the input stream. */
+ void fromStream (std::istream& ioIn) { }
+
+ /** Get the serialised version of the Business Object. */
+ std::string toString() const { return describeKey(); }
+
+ /** Get a string describing the whole key (differentiating two objects
+ at any level). */
+ const std::string describeKey() const { return getKey().toString(); }
+
+ /** Get a string describing the short key (differentiating two objects
+ at the same level). */
+ const std::string describeShortKey() const { return getKey().toString(); }
+
+ private:
+ /** Constructors are private so as to force the usage of the Factory
+ layer. */
+ /** Default constructors. */
+ AirlineFeatureStructure () : _parent (NULL), _content (NULL) { }
+ AirlineFeatureStructure (const AirlineFeatureStructure&);
+
+ /** Destructor. */
+ virtual ~AirlineFeatureStructure() { }
+
+ private:
+ // Attributes
+ /** Parent segment-cabin. */
+ ParentBomStructure_T* _parent;
+
+ /** The actual functional (Business Object) content. */
+ BOM_CONTENT* _content;
+
+ };
+
+}
+#endif // __STDAIR_BOM_AIRLINEFEATURESTRUCTURE_HPP
Copied: trunk/stdair/stdair/bom/AirlineFeatureTypes.hpp (from rev 51, trunk/stdair/stdair/bom/BookingClassTypes.hpp)
===================================================================
--- trunk/stdair/stdair/bom/AirlineFeatureTypes.hpp (rev 0)
+++ trunk/stdair/stdair/bom/AirlineFeatureTypes.hpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -0,0 +1,29 @@
+// //////////////////////////////////////////////////////////////////////
+#ifndef __STDAIR_BOM_AIRLINEFEATURETYPES_HPP
+#define __STDAIR_BOM_AIRLINEFEATURETYPES_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STL
+#include <map>
+#include <vector>
+
+namespace stdair {
+
+ // Forward declarations.
+ template <typename BOM_CONTENT> class AirlineFeatureStructure;
+ class AirlineFeature;
+
+ /** Define the AirlineFeature structure. */
+ typedef AirlineFeatureStructure<AirlineFeature> AirlineFeatureStructure_T;
+
+ /** Define the segment-cabin structure list. */
+ typedef std::vector<AirlineFeatureStructure_T*> AirlineFeatureStructureList_T;
+
+ /** Define the segment-cabin structure map. */
+ typedef std::map<const std::string, AirlineFeatureStructure_T*> AirlineFeatureStructureMap_T;
+
+}
+#endif // __STDAIR_BOM_AIRLINEFEATURETYPES_HPP
+
Modified: trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2009-10-26 13:08:42 UTC (rev 55)
+++ trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -61,21 +61,6 @@
at the same level). */
const std::string describeShortKey() const { return std::string (""); }
- /** Dump a Business Object into an output stream.
- @param ostream& the output stream. */
- void describeFull (std::ostringstream& ioOut) const {
- // Initialise the index
- unsigned short lIdx = 0;
-
- for (typename BomChildrenOrderedList_T::const_iterator itChild =
- _bomChildrenOrderedList.begin();
- itChild != _bomChildrenOrderedList.end(); ++itChild, ++lIdx) {
- const BomStructure_T* lCurrentChild_ptr = *itChild;
- ioOut << "[" << lIdx << "]: ";
- lCurrentChild_ptr->describeFull (ioOut);
- }
- }
-
// /////////// Iteration methods //////////
/** Initialise the internal iterators on bom objects:
return the iterator at the begining of the list. */
@@ -124,7 +109,12 @@
MapReverseIterator_T mapREnd () const {
return _bomChildrenList.rend();
}
-
+
+ /** Retrieve, if existing, the bom corresponding to the given key. */
+ MapIterator_T find (const MapKey_T& iKey) const {
+ return _bomChildrenList.find (iKey);
+ }
+
private:
/** Constructors are private so as to force the usage of the Factory
layer. */
Modified: trunk/stdair/stdair/bom/BomRoot.cpp
===================================================================
--- trunk/stdair/stdair/bom/BomRoot.cpp 2009-10-26 13:08:42 UTC (rev 55)
+++ trunk/stdair/stdair/bom/BomRoot.cpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -9,12 +9,6 @@
#include <stdair/bom/Inventory.hpp>
#include <stdair/bom/InventoryList.hpp>
#include <stdair/bom/InventoryMap.hpp>
-#include <stdair/bom/FlightDate.hpp>
-#include <stdair/bom/SegmentDate.hpp>
-#include <stdair/bom/LegDate.hpp>
-#include <stdair/bom/SegmentCabin.hpp>
-#include <stdair/bom/LegCabin.hpp>
-#include <stdair/bom/BookingClass.hpp>
namespace stdair {
Modified: trunk/stdair/stdair/bom/BookingClassStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClassStructure.hpp 2009-10-26 13:08:42 UTC (rev 55)
+++ trunk/stdair/stdair/bom/BookingClassStructure.hpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -73,12 +73,6 @@
ioOut << toString() << std::endl;
}
- /** Dump a Business Object with all its children into an output stream.
- @param ostream& the output stream. */
- void describeFull (std::ostringstream& ioOut) const {
- ioOut << describeShortKey () << std::endl;
- }
-
/** Read a Business Object from an input stream.
@param istream& the input stream. */
void fromStream (std::istream& ioIn) { }
Modified: trunk/stdair/stdair/bom/FlightDateStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-10-26 13:08:42 UTC (rev 55)
+++ trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -122,14 +122,6 @@
ioOut << toString() << std::endl;
}
- /** Dump a Business Object with all its children into an output stream.
- @param ostream& the output stream. */
- void describeFull (std::ostringstream& ioOut) const {
- ioOut << describeShortKey () << std::endl;
- displaySegmentDateList (ioOut);
- displayLegDateList (ioOut);
- }
-
/** Read a Business Object from an input stream.
@param istream& the input stream. */
void fromStream (std::istream& ioIn) { }
@@ -144,23 +136,6 @@
/** Get a string describing the short key (differentiating two objects
at the same level). */
const std::string describeShortKey() const { return getKey().toString(); }
-
- /** Dump the segment-date children list in to an output stream.
- @param ostream& the output stream. */
- void displaySegmentDateList (std::ostringstream& ioOut) const {
- ioOut << "SegmentDates: " << std::endl;
- assert (_childrenList != NULL);
- _childrenList->describeFull (ioOut);
- }
-
- /** Dump the leg-date children list in to an output stream.
- @param ostream& the output stream. */
- void displayLegDateList (std::ostringstream& ioOut) const {
- ioOut << "LegDates: " << std::endl;
- assert (_secondChildrenList != NULL);
- _secondChildrenList->describeFull (ioOut);
- }
-
private:
/** Constructors are private so as to force the usage of the Factory
Modified: trunk/stdair/stdair/bom/Inventory.cpp
===================================================================
--- trunk/stdair/stdair/bom/Inventory.cpp 2009-10-26 13:08:42 UTC (rev 55)
+++ trunk/stdair/stdair/bom/Inventory.cpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -9,11 +9,6 @@
#include <stdair/bom/FlightDate.hpp>
#include <stdair/bom/FlightDateList.hpp>
#include <stdair/bom/FlightDateMap.hpp>
-#include <stdair/bom/SegmentDate.hpp>
-#include <stdair/bom/LegDate.hpp>
-#include <stdair/bom/SegmentCabin.hpp>
-#include <stdair/bom/LegCabin.hpp>
-#include <stdair/bom/BookingClass.hpp>
namespace stdair {
@@ -39,9 +34,6 @@
// //////////////////////////////////////////////////////////////////////
std::string Inventory::toString() const {
std::ostringstream oStr;
-
- _inventoryStructure.describeFull (oStr);
-
return oStr.str();
}
Modified: trunk/stdair/stdair/bom/InventoryStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-10-26 13:08:42 UTC (rev 55)
+++ trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -102,13 +102,6 @@
ioOut << toString() << std::endl;
}
- /** Dump a Business Object with all its children into an output stream.
- @param ostream& the output stream. */
- void describeFull (std::ostringstream& ioOut) const {
- ioOut << describeShortKey () << std::endl;
- displayFlightDateList (ioOut);
- }
-
/** Read a Business Object from an input stream.
@param istream& the input stream. */
void fromStream (std::istream& ioIn) { }
@@ -124,14 +117,6 @@
at the same level). */
const std::string describeShortKey() const { return getKey().toString(); }
- /** Dump the flight-date children list in to an output stream.
- @param ostream& the output stream. */
- void displayFlightDateList (std::ostringstream& ioOut) const {
- ioOut << "FlightDates: " << std::endl;
- assert (_childrenList != NULL);
- _childrenList->describeFull (ioOut);
- }
-
private:
/** Constructors are private so as to force the usage of the Factory
layer. */
Modified: trunk/stdair/stdair/bom/LegCabinStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabinStructure.hpp 2009-10-26 13:08:42 UTC (rev 55)
+++ trunk/stdair/stdair/bom/LegCabinStructure.hpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -74,12 +74,6 @@
ioOut << toString() << std::endl;
}
- /** Dump a Business Object with all its children into an output stream.
- @param ostream& the output stream. */
- void describeFull (std::ostringstream& ioOut) const {
- ioOut << describeShortKey () << std::endl;
- }
-
/** Read a Business Object from an input stream.
@param istream& the input stream. */
void fromStream (std::istream& ioIn) { }
Modified: trunk/stdair/stdair/bom/LegDateStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegDateStructure.hpp 2009-10-26 13:08:42 UTC (rev 55)
+++ trunk/stdair/stdair/bom/LegDateStructure.hpp 2009-10-27 16:23:33 UTC (rev 56)
@@ -96,13 +96,6 @@
ioOut << toString() << std::endl;
}
- /** Dump a Business Object with all its children into an output stream.
- @param ostream& the output stream. */
- void...
[truncated message content] |
|
From: <qua...@us...> - 2009-10-26 13:08:50
|
Revision: 55
http://stdair.svn.sourceforge.net/stdair/?rev=55&view=rev
Author: quannaus
Date: 2009-10-26 13:08:42 +0000 (Mon, 26 Oct 2009)
Log Message:
-----------
[Dev] Moved the key from structure into content.
Modified Paths:
--------------
trunk/stdair/stdair/bom/BomRoot.cpp
trunk/stdair/stdair/bom/BomRoot.hpp
trunk/stdair/stdair/bom/BomRootContent.cpp
trunk/stdair/stdair/bom/BomRootContent.hpp
trunk/stdair/stdair/bom/BomRootStructure.hpp
trunk/stdair/stdair/bom/BookingClass.cpp
trunk/stdair/stdair/bom/BookingClass.hpp
trunk/stdair/stdair/bom/BookingClassContent.cpp
trunk/stdair/stdair/bom/BookingClassContent.hpp
trunk/stdair/stdair/bom/BookingClassStructure.hpp
trunk/stdair/stdair/bom/FlightDate.cpp
trunk/stdair/stdair/bom/FlightDate.hpp
trunk/stdair/stdair/bom/FlightDateContent.cpp
trunk/stdair/stdair/bom/FlightDateContent.hpp
trunk/stdair/stdair/bom/FlightDateStructure.hpp
trunk/stdair/stdair/bom/Inventory.cpp
trunk/stdair/stdair/bom/Inventory.hpp
trunk/stdair/stdair/bom/InventoryContent.cpp
trunk/stdair/stdair/bom/InventoryContent.hpp
trunk/stdair/stdair/bom/InventoryStructure.hpp
trunk/stdair/stdair/bom/LegCabin.cpp
trunk/stdair/stdair/bom/LegCabin.hpp
trunk/stdair/stdair/bom/LegCabinContent.cpp
trunk/stdair/stdair/bom/LegCabinContent.hpp
trunk/stdair/stdair/bom/LegCabinStructure.hpp
trunk/stdair/stdair/bom/LegDate.cpp
trunk/stdair/stdair/bom/LegDate.hpp
trunk/stdair/stdair/bom/LegDateContent.cpp
trunk/stdair/stdair/bom/LegDateContent.hpp
trunk/stdair/stdair/bom/LegDateStructure.hpp
trunk/stdair/stdair/bom/SegmentCabin.cpp
trunk/stdair/stdair/bom/SegmentCabin.hpp
trunk/stdair/stdair/bom/SegmentCabinContent.cpp
trunk/stdair/stdair/bom/SegmentCabinContent.hpp
trunk/stdair/stdair/bom/SegmentCabinStructure.hpp
trunk/stdair/stdair/bom/SegmentDate.cpp
trunk/stdair/stdair/bom/SegmentDate.hpp
trunk/stdair/stdair/bom/SegmentDateContent.cpp
trunk/stdair/stdair/bom/SegmentDateContent.hpp
trunk/stdair/stdair/bom/SegmentDateStructure.hpp
trunk/stdair/stdair/factory/FacBomContent.hpp
trunk/stdair/stdair/factory/FacBomStructure.hpp
Modified: trunk/stdair/stdair/bom/BomRoot.cpp
===================================================================
--- trunk/stdair/stdair/bom/BomRoot.cpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/BomRoot.cpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -19,8 +19,8 @@
namespace stdair {
// ////////////////////////////////////////////////////////////////////
- BomRoot::BomRoot (BomStructure_T& ioBomRootStructure)
- : _bomRootStructure (ioBomRootStructure) {
+ BomRoot::BomRoot (const BomKey_T& iKey, BomStructure_T& ioBomRootStructure)
+ : BomRootContent (iKey), _bomRootStructure (ioBomRootStructure) {
}
// ////////////////////////////////////////////////////////////////////
Modified: trunk/stdair/stdair/bom/BomRoot.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomRoot.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/BomRoot.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -116,7 +116,7 @@
/** Default constructors. */
BomRoot ();
BomRoot (const BomRoot&);
- BomRoot (BomStructure_T&);
+ BomRoot (const BomKey_T&, BomStructure_T&);
/** Destructor. */
virtual ~BomRoot();
Modified: trunk/stdair/stdair/bom/BomRootContent.cpp
===================================================================
--- trunk/stdair/stdair/bom/BomRootContent.cpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/BomRootContent.cpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -9,7 +9,7 @@
namespace stdair {
// ////////////////////////////////////////////////////////////////////
- BomRootContent::BomRootContent () {
+ BomRootContent::BomRootContent (const BomKey_T& iKey) : _key (iKey) {
}
// ////////////////////////////////////////////////////////////////////
Modified: trunk/stdair/stdair/bom/BomRootContent.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomRootContent.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/BomRootContent.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -4,14 +4,115 @@
// //////////////////////////////////////////////////////////////////////
// Import section
// //////////////////////////////////////////////////////////////////////
-// STDAIR
+// STDAIR
+#include <stdair/STDAIR_Types.hpp>
#include <stdair/bom/BomContent.hpp>
+#include <stdair/bom/BomRootKey.hpp>
namespace stdair {
/** Class representing the actual attributes for the Bom root. */
class BomRootContent : public BomContent {
public:
+ /** Definition allowing to retrieve the associated BOM key type. */
+ typedef BomRootKey_T BomKey_T;
+
+ public:
+ // /////////// Getters //////////////
+ /** Get the BomRoot key. */
+ const BomKey_T& getKey() const {
+ return _key;
+ }
+
+ /** Get the update/creation date for the world schedule data. */
+ const Date_T& getUpdateDate() const {
+ return _updateDate;
+ }
+
+ /** Get the number of generated flight dates. */
+ const NbOfFlightDates_T getNumberOfFlightDates() const {
+ return _flightDateCounter;
+ }
+
+ /** Get the booking counter. */
+ const NbOfBookings_T& getBookingCounter () const {
+ return _bookingCounter;
+ }
+
+ /** Get the total revenue of the whole world schedule. */
+ const Revenue_T& getRevenue () const {
+ return _worldScheduleRevenue;
+ }
+
+ /** Get the world schedule average fare. */
+ const Fare_T& getAverageFare() const {
+ return _wScheduleAverageFare;
+ }
+
+ /** Get the Availability Seat Kilometer for the
+ world schedule. */
+ const Distance_T& getASK() const {
+ return _worldScheduleASK;
+ }
+
+ /** Get the yield value for the worldSchedule. */
+ const Revenue_T& getYield () const {
+ return _worldScheduleYield;
+ }
+
+ /** Get the Revenue Passanger Kilometer for the world schedule. */
+ const Distance_T& getRPK() const {
+ return _worldScheduleRPK;
+ }
+
+ /** Get the unit revenue value for the worldSchedule. */
+ const Revenue_T& getUnitRevenue () const {
+ return _wScheduleUnitRevenue;
+ }
+
+ /** Get the load factor value for the world schedule. */
+ const Revenue_T& getLoadFactor () const {
+ return _wScheduleLoadFactor;
+ }
+
+ public:
+ // ///////// Setters //////////
+ /** Set the update/creation date for the world schdule data. */
+ void setUpdateDate (const Date_T& iUpdateDate) {
+ _updateDate = iUpdateDate;
+ }
+
+ /** Set the revenue amount. */
+ void setRevenue (const Revenue_T& iWCRevenue) {
+ _worldScheduleRevenue = iWCRevenue;
+ }
+
+ /** Set the Revenue Passanger Kilometer. */
+ void setRPK (const Distance_T& iWSRPK) {
+ _worldScheduleRPK = iWSRPK;
+ }
+
+ /** Set the unit revenue. */
+ void setUnitRevenue (const Revenue_T& iWSURevenue) {
+ _wScheduleUnitRevenue = iWSURevenue;
+ }
+
+ /** Set the average fare. */
+ void setAverageFare(Fare_T iWSAFare) {
+ _wScheduleAverageFare = iWSAFare;
+ }
+
+ /** Set the yield. */
+ void setYield (const Revenue_T& iWSYield) {
+ _worldScheduleYield = iWSYield;
+ }
+
+ /** Set the load factor. */
+ void setLoadFactor (const Revenue_T& iWSLF) {
+ _wScheduleLoadFactor = iWSLF;
+ }
+
+ public:
// /////////// Display support methods /////////
/** Dump a Business Object into an output stream.
@param ostream& the output stream. */
@@ -36,13 +137,45 @@
/** Default constructors. */
BomRootContent ();
BomRootContent (const BomRootContent&);
+ BomRootContent (const BomKey_T& iKey);
/** Destructor. */
virtual ~BomRootContent();
protected:
// Attributes
+ /** The key of both structure and content objects. */
+ BomKey_T _key;
+ /** Update/creation date for the World Schedule data. */
+ Date_T _updateDate;
+
+ /** Counter of all generated flight dates in the world schedule. */
+ NbOfFlightDates_T _flightDateCounter;
+
+ /** Counter of all bookings into the worldSchedule. */
+ NbOfBookings_T _bookingCounter;
+
+ /** Total amount of money earn with all flight bookings. */
+ Revenue_T _worldScheduleRevenue;
+
+ /** Value of the average fare of the worldcshedule.*/
+ Fare_T _wScheduleAverageFare;
+
+ /** Value of the Available Seat Kilometer for the whole worldSchedule.*/
+ Distance_T _worldScheduleASK;
+
+ /** Value of the Yield (Revenue/ASK). */
+ Revenue_T _worldScheduleYield;
+
+ /** Value of the Revenue Passanger Kilometer for the worldSchedule.*/
+ Distance_T _worldScheduleRPK;
+
+ /** Value of the Unit Revenue (Revenue/RPK). */
+ Revenue_T _wScheduleUnitRevenue;
+
+ /** Value of the Load Factor (ASK/RPK). */
+ Revenue_T _wScheduleLoadFactor;
};
}
Modified: trunk/stdair/stdair/bom/BomRootStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomRootStructure.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/BomRootStructure.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -11,7 +11,6 @@
// STDAIR
#include <stdair/bom/BomStructureDummy.hpp>
#include <stdair/bom/BomContentDummy.hpp>
-#include <stdair/bom/BomRootKey.hpp>
#include <stdair/bom/InventoryStructure.hpp>
namespace stdair {
@@ -35,7 +34,7 @@
private:
// Type definitions
/** Definition allowing to retrieve the associated BOM key type. */
- typedef BomRootKey_T BomKey_T;
+ typedef typename BOM_CONTENT::BomKey_T BomKey_T;
/** Definition allowing to retrieve the associated children type. */
typedef boost::mpl::vector<InventoryStructure<ContentChild_T>, BomStructureDummy> ChildrenBomTypeList_T;
@@ -49,8 +48,9 @@
public:
// /////////// Getters /////////////
/** Get the BomRootStructure key. */
- const BomKey_T& getKey() const {
- return _key;
+ const BomKey_T& getKey () const {
+ assert (_content != NULL);
+ return _content->getKey ();
}
/** Get the list of inventories. */
@@ -91,28 +91,24 @@
/** Get a string describing the whole key (differentiating two objects
at any level). */
- const std::string describeKey() const { return _key.toString(); }
+ const std::string describeKey() const { return getKey().toString(); }
/** Get a string describing the short key (differentiating two objects
at the same level). */
- const std::string describeShortKey() const { return _key.toString(); }
+ const std::string describeShortKey() const { return getKey().toString(); }
private:
/** Constructors are private so as to force the usage of the Factory
layer. */
/** Default constructors. */
- BomRootStructure ();
+ BomRootStructure () : _content (NULL), _childrenList (NULL) { };
BomRootStructure (const BomRootStructure&);
- BomRootStructure (const BomKey_T& iKey) { _key = iKey; }
/** Destructor. */
~BomRootStructure () { }
private:
// Attributes
- /** The key of both the structure and content objects. */
- BomKey_T _key;
-
/** The actual functional (Business Object) content. */
BOM_CONTENT* _content;
Modified: trunk/stdair/stdair/bom/BookingClass.cpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClass.cpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/BookingClass.cpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -10,8 +10,10 @@
namespace stdair {
// ////////////////////////////////////////////////////////////////////
- BookingClass::BookingClass (BomStructure_T& ioBookingClassStructure)
- : _bookingClassStructure (ioBookingClassStructure) {
+ BookingClass::BookingClass (const BomKey_T& iKey,
+ BomStructure_T& ioBookingClassStructure)
+ : BookingClassContent (iKey),
+ _bookingClassStructure (ioBookingClassStructure) {
}
// ////////////////////////////////////////////////////////////////////
Modified: trunk/stdair/stdair/bom/BookingClass.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -72,7 +72,7 @@
/** Default constructors. */
BookingClass ();
BookingClass (const BookingClass&);
- BookingClass (BomStructure_T&);
+ BookingClass (const BomKey_T&, BomStructure_T&);
/** Destructor. */
virtual ~BookingClass();
Modified: trunk/stdair/stdair/bom/BookingClassContent.cpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClassContent.cpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/BookingClassContent.cpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -9,7 +9,7 @@
namespace stdair {
// ////////////////////////////////////////////////////////////////////
- BookingClassContent::BookingClassContent () {
+ BookingClassContent::BookingClassContent (const BomKey_T& iKey) : _key (iKey) {
}
// ////////////////////////////////////////////////////////////////////
Modified: trunk/stdair/stdair/bom/BookingClassContent.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClassContent.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/BookingClassContent.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -6,12 +6,25 @@
// //////////////////////////////////////////////////////////////////////
// STDAIR
#include <stdair/bom/BomContent.hpp>
+#include <stdair/bom/BookingClassKey.hpp>
namespace stdair {
/** Class representing the actual attributes for an airline booking class. */
class BookingClassContent : public BomContent {
public:
+ // Type definitions.
+ /** Definition allowing to retrieve the associated BOM key type. */
+ typedef BookingClassKey_T BomKey_T;
+
+ public:
+ // /////////// Getters ////////////
+ /** Get the booking class key. */
+ const BomKey_T& getKey() const {
+ return _key;
+ }
+
+ public:
// /////////// Display support methods /////////
/** Dump a Business Object into an output stream.
@param ostream& the output stream. */
@@ -35,7 +48,7 @@
protected:
/** Default constructors. */
- BookingClassContent ();
+ BookingClassContent (const BomKey_T&);
BookingClassContent (const BookingClassContent&);
/** Destructor. */
@@ -43,6 +56,8 @@
protected:
// Attributes
+ /** The key of both structure and content objects. */
+ BomKey_T _key;
};
}
Modified: trunk/stdair/stdair/bom/BookingClassStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClassStructure.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/BookingClassStructure.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -9,7 +9,6 @@
// STDAIR
#include <stdair/bom/BomStructureDummy.hpp>
#include <stdair/bom/BomContentDummy.hpp>
-#include <stdair/bom/BookingClassKey.hpp>
namespace stdair {
/** Wrapper class aimed at holding the actual content, modeled
@@ -27,7 +26,7 @@
typedef BOM_CONTENT Content_T;
/** Definition allowing to retrieve the associated BOM key type. */
- typedef BookingClassKey_T BomKey_T;
+ typedef typename BOM_CONTENT::BomKey_T BomKey_T;
/** Definition allowing to retrieve the associated parent
BOM structure type. */
@@ -52,7 +51,8 @@
/** Get the segment-cabin key. */
const BomKey_T& getKey() const {
- return _key;
+ assert (_content != NULL);
+ return _content->getKey();
}
private:
@@ -88,19 +88,18 @@
/** Get a string describing the whole key (differentiating two objects
at any level). */
- const std::string describeKey() const { return _key.toString(); }
+ const std::string describeKey() const { return getKey().toString(); }
/** Get a string describing the short key (differentiating two objects
at the same level). */
- const std::string describeShortKey() const { return _key.toString(); }
+ const std::string describeShortKey() const { return getKey().toString(); }
private:
/** Constructors are private so as to force the usage of the Factory
layer. */
/** Default constructors. */
- BookingClassStructure ();
+ BookingClassStructure () : _parent (NULL), _content (NULL) { }
BookingClassStructure (const BookingClassStructure&);
- BookingClassStructure (const BomKey_T& iKey) : _parent (NULL), _key (iKey){ }
/** Destructor. */
virtual ~BookingClassStructure() { }
@@ -113,9 +112,6 @@
/** The actual functional (Business Object) content. */
BOM_CONTENT* _content;
- /** The key of both the structure and content objects. */
- BomKey_T _key;
-
};
}
Modified: trunk/stdair/stdair/bom/FlightDate.cpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDate.cpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/FlightDate.cpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -19,8 +19,9 @@
namespace stdair {
// ////////////////////////////////////////////////////////////////////
- FlightDate::FlightDate (BomStructure_T& ioFlightStructure)
- : _flightDateStructure (ioFlightStructure) {
+ FlightDate::FlightDate (const BomKey_T& iKey,
+ BomStructure_T& ioFlightStructure)
+ : FlightDateContent (iKey), _flightDateStructure (ioFlightStructure) {
}
// ////////////////////////////////////////////////////////////////////
Modified: trunk/stdair/stdair/bom/FlightDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -97,7 +97,7 @@
/** Default constructors. */
FlightDate ();
FlightDate (const FlightDate&);
- FlightDate (BomStructure_T&);
+ FlightDate (const BomKey_T&, BomStructure_T&);
/** Destructor. */
virtual ~FlightDate();
Modified: trunk/stdair/stdair/bom/FlightDateContent.cpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDateContent.cpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/FlightDateContent.cpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -9,7 +9,7 @@
namespace stdair {
// ////////////////////////////////////////////////////////////////////
- FlightDateContent::FlightDateContent () {
+ FlightDateContent::FlightDateContent (const BomKey_T& iKey) : _key (iKey) {
}
// ////////////////////////////////////////////////////////////////////
Modified: trunk/stdair/stdair/bom/FlightDateContent.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDateContent.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/FlightDateContent.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -6,12 +6,25 @@
// //////////////////////////////////////////////////////////////////////
// STDAIR
#include <stdair/bom/BomContent.hpp>
+#include <stdair/bom/FlightDateKey.hpp>
namespace stdair {
/** Class representing the actual attributes for an airline flight-date. */
class FlightDateContent : public BomContent {
public:
+ // Type definitions.
+ /** Definition allowing to retrieve the associated BOM key type. */
+ typedef FlightDateKey_T BomKey_T;
+
+ public:
+ // /////////// Getters ///////////////
+ /** Get the flight-date key. */
+ const BomKey_T& getKey() const {
+ return _key;
+ }
+
+ public:
// /////////// Display support methods /////////
/** Dump a Business Object into an output stream.
@param ostream& the output stream. */
@@ -35,7 +48,7 @@
protected:
/** Default constructors. */
- FlightDateContent ();
+ FlightDateContent (const BomKey_T&);
FlightDateContent (const FlightDateContent&);
/** Destructor. */
@@ -43,6 +56,9 @@
protected:
// Attributes
+ /** The key of both structure and content objects. */
+ BomKey_T _key;
+
};
}
Modified: trunk/stdair/stdair/bom/FlightDateStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -9,7 +9,6 @@
// STDAIR
#include <stdair/bom/BomStructureDummy.hpp>
#include <stdair/bom/BomContentDummy.hpp>
-#include <stdair/bom/FlightDateKey.hpp>
#include <stdair/bom/SegmentDateStructure.hpp>
#include <stdair/bom/LegDateStructure.hpp>
@@ -29,7 +28,7 @@
typedef BOM_CONTENT Content_T;
/** Definition allowing to retrieve the associated BOM key type. */
- typedef FlightDateKey_T BomKey_T;
+ typedef typename BOM_CONTENT::BomKey_T BomKey_T;
/** Definition allowing to retrieve the associated parent
BOM structure type. */
@@ -71,7 +70,8 @@
/** Get the flight-date key. */
const BomKey_T& getKey() const {
- return _key;
+ assert (_content != NULL);
+ return _content->getKey();
}
/** Get the list of segment-dates. */
@@ -139,11 +139,11 @@
/** Get a string describing the whole key (differentiating two objects
at any level). */
- const std::string describeKey() const { return _key.toString(); }
+ const std::string describeKey() const { return getKey().toString(); }
/** Get a string describing the short key (differentiating two objects
at the same level). */
- const std::string describeShortKey() const { return _key.toString(); }
+ const std::string describeShortKey() const { return getKey().toString(); }
/** Dump the segment-date children list in to an output stream.
@param ostream& the output stream. */
@@ -166,11 +166,10 @@
/** Constructors are private so as to force the usage of the Factory
layer. */
/** Default constructors. */
- FlightDateStructure ();
+ FlightDateStructure () : _parent (NULL), _content (NULL),
+ _childrenList (NULL),
+ _secondChildrenList (NULL) { }
FlightDateStructure (const FlightDateStructure&);
- FlightDateStructure (const BomKey_T& iKey)
- : _parent (NULL), _key (iKey), _childrenList (NULL),
- _secondChildrenList (NULL) { }
/** Destructor. */
virtual ~FlightDateStructure() { }
@@ -183,9 +182,6 @@
/** The actual functional (Business Object) content. */
BOM_CONTENT* _content;
- /** The key of both the structure and content objects. */
- BomKey_T _key;
-
/** List of segment-dates. */
ChildrenBomHolder_T* _childrenList;
Modified: trunk/stdair/stdair/bom/Inventory.cpp
===================================================================
--- trunk/stdair/stdair/bom/Inventory.cpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/Inventory.cpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -18,8 +18,9 @@
namespace stdair {
// ////////////////////////////////////////////////////////////////////
- Inventory::Inventory (BomStructure_T& ioInventoryStructure)
- : _inventoryStructure (ioInventoryStructure) {
+ Inventory::Inventory (const BomKey_T& iKey,
+ BomStructure_T& ioInventoryStructure)
+ : InventoryContent (iKey), _inventoryStructure (ioInventoryStructure) {
}
// ////////////////////////////////////////////////////////////////////
Modified: trunk/stdair/stdair/bom/Inventory.hpp
===================================================================
--- trunk/stdair/stdair/bom/Inventory.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -84,7 +84,7 @@
/** Default constructors. */
Inventory ();
Inventory (const Inventory&);
- Inventory (BomStructure_T&);
+ Inventory (const BomKey_T&, BomStructure_T&);
/** Destructor. */
virtual ~Inventory();
Modified: trunk/stdair/stdair/bom/InventoryContent.cpp
===================================================================
--- trunk/stdair/stdair/bom/InventoryContent.cpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/InventoryContent.cpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -9,7 +9,7 @@
namespace stdair {
// ////////////////////////////////////////////////////////////////////
- InventoryContent::InventoryContent () {
+ InventoryContent::InventoryContent (const BomKey_T& iKey) : _key (iKey) {
}
// ////////////////////////////////////////////////////////////////////
Modified: trunk/stdair/stdair/bom/InventoryContent.hpp
===================================================================
--- trunk/stdair/stdair/bom/InventoryContent.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/InventoryContent.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -7,11 +7,17 @@
// STDAIR
#include <stdair/STDAIR_Types.hpp>
#include <stdair/bom/BomContent.hpp>
+#include <stdair/bom/InventoryKey.hpp>
namespace stdair {
/** Class representing the actual attributes for an airline inventory. */
class InventoryContent : public BomContent {
+ public :
+ // Type definitions
+ /** Definition allowing to retrieve the associated BOM key type. */
+ typedef InventoryKey_T BomKey_T;
+
public:
// /////////// Display support methods /////////
/** Dump a Business Object into an output stream.
@@ -35,6 +41,11 @@
public:
// ////////// Getters ////////////
+ /** Get the inventory key. */
+ const BomKey_T& getKey() const {
+ return _key;
+ }
+
/** Get the booking counter. */
const NbOfBookings_T& getBookingCounter () const {
return _bookingCounter;
@@ -109,7 +120,7 @@
protected:
/** Default constructors. */
- InventoryContent ();
+ InventoryContent (const BomKey_T&);
InventoryContent (const InventoryContent&);
/** Destructor. */
@@ -117,6 +128,9 @@
protected:
// Attributes
+ /** The key of both structure and content objects. */
+ BomKey_T _key;
+
/** Counter of all bookings into the inventory. */
NbOfBookings_T _bookingCounter;
Modified: trunk/stdair/stdair/bom/InventoryStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -11,7 +11,6 @@
// STDAIR
#include <stdair/bom/BomStructureDummy.hpp>
#include <stdair/bom/BomContentDummy.hpp>
-#include <stdair/bom/InventoryKey.hpp>
#include <stdair/bom/FlightDateStructure.hpp>
namespace stdair {
@@ -30,7 +29,7 @@
typedef BOM_CONTENT Content_T;
/** Definition allowing to retrieve the associated BOM key type. */
- typedef InventoryKey_T BomKey_T;
+ typedef typename BOM_CONTENT::BomKey_T BomKey_T;
/** Definition allowing to retrieve the children type of the
BOM_CONTENT. */
@@ -63,9 +62,10 @@
return *_parent;
}
- /** Get the flight-date key. */
+ /** Get the inventory key. */
const BomKey_T& getKey() const {
- return _key;
+ assert (_content != NULL);
+ return _content->getKey ();
}
/** Get the list of flight-dates. */
@@ -118,11 +118,11 @@
/** Get a string describing the whole key (differentiating two objects
at any level). */
- const std::string describeKey() const { return _key.toString(); }
+ const std::string describeKey() const { return getKey().toString(); }
/** Get a string describing the short key (differentiating two objects
at the same level). */
- const std::string describeShortKey() const { return _key.toString(); }
+ const std::string describeShortKey() const { return getKey().toString(); }
/** Dump the flight-date children list in to an output stream.
@param ostream& the output stream. */
@@ -136,11 +136,10 @@
/** Constructors are private so as to force the usage of the Factory
layer. */
/** Default constructors. */
- InventoryStructure ();
- InventoryStructure (const InventoryStructure&);
- InventoryStructure (const BomKey_T& iKey)
- : _parent (NULL), _key (iKey), _childrenList (NULL) { }
+ InventoryStructure () : _parent (NULL), _content (NULL),
+ _childrenList (NULL) { }
+ InventoryStructure (const InventoryStructure&);
/** Destructor. */
virtual ~InventoryStructure() { }
@@ -152,9 +151,6 @@
/** The actual functional (Business Object) content. */
BOM_CONTENT* _content;
- /** The key of both the structure and content objects. */
- BomKey_T _key;
-
/** List of flight-dates. */
ChildrenBomHolder_T* _childrenList;
};
Modified: trunk/stdair/stdair/bom/LegCabin.cpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabin.cpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/LegCabin.cpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -10,8 +10,8 @@
namespace stdair {
// ////////////////////////////////////////////////////////////////////
- LegCabin::LegCabin (BomStructure_T& ioLegStructure)
- : _legCabinStructure (ioLegStructure) {
+ LegCabin::LegCabin (const BomKey_T& iKey, BomStructure_T& ioLegStructure)
+ : LegCabinContent (iKey), _legCabinStructure (ioLegStructure) {
}
// ////////////////////////////////////////////////////////////////////
Modified: trunk/stdair/stdair/bom/LegCabin.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -65,7 +65,7 @@
/** Default constructors. */
LegCabin ();
LegCabin (const LegCabin&);
- LegCabin (BomStructure_T&);
+ LegCabin (const BomKey_T& iKey, BomStructure_T&);
/** Destructor. */
virtual ~LegCabin();
Modified: trunk/stdair/stdair/bom/LegCabinContent.cpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabinContent.cpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/LegCabinContent.cpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -9,7 +9,7 @@
namespace stdair {
// ////////////////////////////////////////////////////////////////////
- LegCabinContent::LegCabinContent () {
+ LegCabinContent::LegCabinContent (const BomKey_T& iKey) : _key (iKey) {
}
// ////////////////////////////////////////////////////////////////////
Modified: trunk/stdair/stdair/bom/LegCabinContent.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabinContent.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/LegCabinContent.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -6,12 +6,25 @@
// //////////////////////////////////////////////////////////////////////
// STDAIR
#include <stdair/bom/BomContent.hpp>
+#include <stdair/bom/LegCabinKey.hpp>
namespace stdair {
/** Class representing the actual attributes for an airline leg-cabin. */
class LegCabinContent : public BomContent {
public:
+ // Type definitions.
+ /** Definition allowing to retrieve the associated BOM key type. */
+ typedef LegCabinKey_T BomKey_T;
+
+ public:
+ // /////////// Getters ////////////
+ /** Get the leg-cabin key. */
+ const BomKey_T& getKey() const {
+ return _key;
+ }
+
+ public:
// /////////// Display support methods /////////
/** Dump a Business Object into an output stream.
@param ostream& the output stream. */
@@ -35,7 +48,7 @@
protected:
/** Default constructors. */
- LegCabinContent ();
+ LegCabinContent (const BomKey_T&);
LegCabinContent (const LegCabinContent&);
/** Destructor. */
@@ -43,6 +56,8 @@
protected:
// Attributes
+ /** The key of both structure and content objects. */
+ BomKey_T _key;
};
}
Modified: trunk/stdair/stdair/bom/LegCabinStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabinStructure.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/LegCabinStructure.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -9,7 +9,6 @@
// STDAIR
#include <stdair/bom/BomStructureDummy.hpp>
#include <stdair/bom/BomContentDummy.hpp>
-#include <stdair/bom/LegCabinKey.hpp>
#include <stdair/bom/BookingClassStructure.hpp>
namespace stdair {
@@ -28,7 +27,7 @@
typedef BOM_CONTENT Content_T;
/** Definition allowing to retrieve the associated BOM key type. */
- typedef LegCabinKey_T BomKey_T;
+ typedef typename BOM_CONTENT::BomKey_T BomKey_T;
/** Definition allowing to retrieve the associated parent
BOM structure type. */
@@ -53,7 +52,8 @@
/** Get the leg-date key. */
const BomKey_T& getKey() const {
- return _key;
+ assert (_content != NULL);
+ return _content->getKey();
}
private:
@@ -89,19 +89,18 @@
/** Get a string describing the whole key (differentiating two objects
at any level). */
- const std::string describeKey() const { return _key.toString(); }
+ const std::string describeKey() const { return getKey().toString(); }
/** Get a string describing the short key (differentiating two objects
at the same level). */
- const std::string describeShortKey() const { return _key.toString(); }
+ const std::string describeShortKey() const { return getKey().toString(); }
private:
/** Constructors are private so as to force the usage of the Factory
layer. */
/** Default constructors. */
- LegCabinStructure ();
+ LegCabinStructure () : _parent (NULL), _content (NULL) { }
LegCabinStructure (const LegCabinStructure&);
- LegCabinStructure (const BomKey_T& iKey) : _parent (NULL), _key (iKey){ }
/** Destructor. */
virtual ~LegCabinStructure() { }
@@ -113,10 +112,6 @@
/** The actual functional (Business Object) content. */
BOM_CONTENT* _content;
-
- /** The key of both the structure and content objects. */
- BomKey_T _key;
-
};
}
Modified: trunk/stdair/stdair/bom/LegDate.cpp
===================================================================
--- trunk/stdair/stdair/bom/LegDate.cpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/LegDate.cpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -13,8 +13,8 @@
namespace stdair {
// ////////////////////////////////////////////////////////////////////
- LegDate::LegDate (BomStructure_T& ioLegStructure)
- : _legDateStructure (ioLegStructure) {
+ LegDate::LegDate (const BomKey_T& iKey, BomStructure_T& ioLegStructure)
+ : LegDateContent (iKey), _legDateStructure (ioLegStructure) {
}
// ////////////////////////////////////////////////////////////////////
Modified: trunk/stdair/stdair/bom/LegDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegDate.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/LegDate.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -80,7 +80,7 @@
/** Default constructors. */
LegDate ();
LegDate (const LegDate&);
- LegDate (BomStructure_T&);
+ LegDate (const BomKey_T&, BomStructure_T&);
/** Destructor. */
virtual ~LegDate();
Modified: trunk/stdair/stdair/bom/LegDateContent.cpp
===================================================================
--- trunk/stdair/stdair/bom/LegDateContent.cpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/LegDateContent.cpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -9,7 +9,7 @@
namespace stdair {
// ////////////////////////////////////////////////////////////////////
- LegDateContent::LegDateContent () {
+ LegDateContent::LegDateContent (const BomKey_T& iKey) : _key (iKey) {
}
// ////////////////////////////////////////////////////////////////////
Modified: trunk/stdair/stdair/bom/LegDateContent.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegDateContent.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/LegDateContent.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -6,12 +6,25 @@
// //////////////////////////////////////////////////////////////////////
// STDAIR
#include <stdair/bom/BomContent.hpp>
+#include <stdair/bom/LegDateKey.hpp>
namespace stdair {
/** Class representing the actual attributes for an airline leg-date. */
class LegDateContent : public BomContent {
public:
+ // Type definitions.
+ /** Definition allowing to retrieve the associated BOM key type. */
+ typedef LegDateKey_T BomKey_T;
+
+ public:
+ // /////////// Getters /////////////
+ /** Get the leg-date key. */
+ const BomKey_T& getKey() const {
+ return _key;
+ }
+
+ public:
// /////////// Display support methods /////////
/** Dump a Business Object into an output stream.
@param ostream& the output stream. */
@@ -35,7 +48,7 @@
protected:
/** Default constructors. */
- LegDateContent ();
+ LegDateContent (const BomKey_T&);
LegDateContent (const LegDateContent&);
/** Destructor. */
@@ -43,6 +56,8 @@
protected:
// Attributes
+ /** The key of both structure and content objects. */
+ BomKey_T _key;
};
}
Modified: trunk/stdair/stdair/bom/LegDateStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegDateStructure.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/LegDateStructure.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -9,7 +9,6 @@
// STDAIR
#include <stdair/bom/BomStructureDummy.hpp>
#include <stdair/bom/BomContentDummy.hpp>
-#include <stdair/bom/LegDateKey.hpp>
#include <stdair/bom/LegCabinStructure.hpp>
namespace stdair {
@@ -28,7 +27,7 @@
typedef BOM_CONTENT Content_T;
/** Definition allowing to retrieve the associated BOM key type. */
- typedef LegDateKey_T BomKey_T;
+ typedef typename BOM_CONTENT::BomKey_T BomKey_T;
/** Definition allowing to retrieve the associated parent
BOM structure type. */
@@ -60,7 +59,8 @@
/** Get the leg-date key. */
const BomKey_T& getKey() const {
- return _key;
+ assert (_content != NULL);
+ return _content->getKey();
}
/** Get the list of leg-cabins. */
@@ -112,11 +112,11 @@
/** Get a string describing the whole key (differentiating two objects
at any level). */
- const std::string describeKey() const { return _key.toString(); }
+ const std::string describeKey() const { return getKey().toString(); }
/** Get a string describing the short key (differentiating two objects
at the same level). */
- const std::string describeShortKey() const { return _key.toString(); }
+ const std::string describeShortKey() const { return getKey().toString(); }
/** Dump the leg-cabin children list in to an output stream.
@param ostream& the output stream. */
@@ -130,9 +130,9 @@
/** Constructors are private so as to force the usage of the Factory
layer. */
/** Default constructors. */
- LegDateStructure ();
+ LegDateStructure () : _parent (NULL), _content (NULL),
+ _childrenList (NULL) { }
LegDateStructure (const LegDateStructure&);
- LegDateStructure (const BomKey_T& iKey) : _parent (NULL), _key (iKey) { }
/** Destructor. */
virtual ~LegDateStructure() { }
@@ -145,9 +145,6 @@
/** The actual functional (Business Object) content. */
BOM_CONTENT* _content;
- /** The key of both the structure and content objects. */
- BomKey_T _key;
-
/** List of leg-cabins. */
ChildrenBomHolder_T* _childrenList;
};
Modified: trunk/stdair/stdair/bom/SegmentCabin.cpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabin.cpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/SegmentCabin.cpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -13,8 +13,9 @@
namespace stdair {
// ////////////////////////////////////////////////////////////////////
- SegmentCabin::SegmentCabin (BomStructure_T& ioSegmentStructure)
- : _segmentCabinStructure (ioSegmentStructure) {
+ SegmentCabin::SegmentCabin (const BomKey_T& iKey,
+ BomStructure_T& ioSegmentStructure)
+ : SegmentCabinContent (iKey), _segmentCabinStructure (ioSegmentStructure) {
}
// ////////////////////////////////////////////////////////////////////
Modified: trunk/stdair/stdair/bom/SegmentCabin.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -80,7 +80,7 @@
/** Default constructors. */
SegmentCabin ();
SegmentCabin (const SegmentCabin&);
- SegmentCabin (BomStructure_T&);
+ SegmentCabin (const BomKey_T&, BomStructure_T&);
/** Destructor. */
virtual ~SegmentCabin();
Modified: trunk/stdair/stdair/bom/SegmentCabinContent.cpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabinContent.cpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/SegmentCabinContent.cpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -9,7 +9,7 @@
namespace stdair {
// ////////////////////////////////////////////////////////////////////
- SegmentCabinContent::SegmentCabinContent () {
+ SegmentCabinContent::SegmentCabinContent (const BomKey_T& iKey) : _key (iKey) {
}
// ////////////////////////////////////////////////////////////////////
Modified: trunk/stdair/stdair/bom/SegmentCabinContent.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabinContent.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/SegmentCabinContent.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -6,12 +6,25 @@
// //////////////////////////////////////////////////////////////////////
// STDAIR
#include <stdair/bom/BomContent.hpp>
+#include <stdair/bom/SegmentCabinKey.hpp>
namespace stdair {
/** Class representing the actual attributes for an airline segment-cabin. */
class SegmentCabinContent : public BomContent {
public:
+ // Type definitions.
+ /** Definition allowing to retrieve the associated BOM key type. */
+ typedef SegmentCabinKey_T BomKey_T;
+
+ public:
+ // /////////// Getters /////////////
+ /** Get the segment-cabin key. */
+ const BomKey_T& getKey() const {
+ return _key;
+ }
+
+ public:
// /////////// Display support methods /////////
/** Dump a Business Object into an output stream.
@param ostream& the output stream. */
@@ -35,7 +48,7 @@
protected:
/** Default constructors. */
- SegmentCabinContent ();
+ SegmentCabinContent (const BomKey_T&);
SegmentCabinContent (const SegmentCabinContent&);
/** Destructor. */
@@ -43,6 +56,9 @@
protected:
// Attributes
+ /** The key of both structure and content objects. */
+ BomKey_T _key;
+
};
}
Modified: trunk/stdair/stdair/bom/SegmentCabinStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabinStructure.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/SegmentCabinStructure.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -9,7 +9,6 @@
// STDAIR
#include <stdair/bom/BomStructureDummy.hpp>
#include <stdair/bom/BomContentDummy.hpp>
-#include <stdair/bom/SegmentCabinKey.hpp>
#include <stdair/bom/BookingClassStructure.hpp>
namespace stdair {
@@ -28,7 +27,7 @@
typedef BOM_CONTENT Content_T;
/** Definition allowing to retrieve the associated BOM key type. */
- typedef SegmentCabinKey_T BomKey_T;
+ typedef typename BOM_CONTENT::BomKey_T BomKey_T;
/** Definition allowing to retrieve the associated parent
BOM structure type. */
@@ -60,7 +59,8 @@
/** Get the segment-date key. */
const BomKey_T& getKey() const {
- return _key;
+ assert (_content != NULL);
+ return _content->getKey();
}
/** Get the list of segment-cabins. */
@@ -112,11 +112,11 @@
/** Get a string describing the whole key (differentiating two objects
at any level). */
- const std::string describeKey() const { return _key.toString(); }
+ const std::string describeKey() const { return getKey().toString(); }
/** Get a string describing the short key (differentiating two objects
at the same level). */
- const std::string describeShortKey() const { return _key.toString(); }
+ const std::string describeShortKey() const { return getKey().toString(); }
/** Dump the segment-cabin children list in to an output stream.
@param ostream& the output stream. */
@@ -130,9 +130,9 @@
/** Constructors are private so as to force the usage of the Factory
layer. */
/** Default constructors. */
- SegmentCabinStructure ();
+ SegmentCabinStructure () : _parent (NULL), _content (NULL),
+ _childrenList (NULL) { }
SegmentCabinStructure (const SegmentCabinStructure&);
- SegmentCabinStructure (const BomKey_T& iKey) : _parent (NULL), _key (iKey){ }
/** Destructor. */
virtual ~SegmentCabinStructure() { }
@@ -144,9 +144,6 @@
/** The actual functional (Business Object) content. */
BOM_CONTENT* _content;
-
- /** The key of both the structure and content objects. */
- BomKey_T _key;
/** List of segment-cabins. */
ChildrenBomHolder_T* _childrenList;
Modified: trunk/stdair/stdair/bom/SegmentDate.cpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDate.cpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/SegmentDate.cpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -13,8 +13,9 @@
namespace stdair {
// ////////////////////////////////////////////////////////////////////
- SegmentDate::SegmentDate (BomStructure_T& ioSegmentStructure)
- : _segmentDateStructure (ioSegmentStructure) {
+ SegmentDate::SegmentDate (const BomKey_T& iKey,
+ BomStructure_T& ioSegmentStructure)
+ : SegmentDateContent (iKey), _segmentDateStructure (ioSegmentStructure) {
}
// ////////////////////////////////////////////////////////////////////
Modified: trunk/stdair/stdair/bom/SegmentDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -80,7 +80,7 @@
/** Default constructors. */
SegmentDate ();
SegmentDate (const SegmentDate&);
- SegmentDate (BomStructure_T&);
+ SegmentDate (const BomKey_T&, BomStructure_T&);
/** Destructor. */
virtual ~SegmentDate();
Modified: trunk/stdair/stdair/bom/SegmentDateContent.cpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDateContent.cpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/SegmentDateContent.cpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -9,7 +9,7 @@
namespace stdair {
// ////////////////////////////////////////////////////////////////////
- SegmentDateContent::SegmentDateContent () {
+ SegmentDateContent::SegmentDateContent (const BomKey_T& iKey) : _key (iKey) {
}
// ////////////////////////////////////////////////////////////////////
Modified: trunk/stdair/stdair/bom/SegmentDateContent.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDateContent.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/SegmentDateContent.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -6,12 +6,24 @@
// //////////////////////////////////////////////////////////////////////
// STDAIR
#include <stdair/bom/BomContent.hpp>
+#include <stdair/bom/SegmentDateKey.hpp>
namespace stdair {
/** Class representing the actual attributes for an airline segment-date. */
class SegmentDateContent : public BomContent {
public:
+ // Type definitions.
+ /** Definition allowing to retrieve the associated BOM key type. */
+ typedef SegmentDateKey_T BomKey_T;
+ public:
+ // /////////// Getters /////////////
+ /** Get the segment-date key. */
+ const BomKey_T& getKey() const {
+ return _key;
+ }
+
+ public:
// /////////// Display support methods /////////
/** Dump a Business Object into an output stream.
@param ostream& the output stream. */
@@ -35,7 +47,7 @@
protected:
/** Default constructors. */
- SegmentDateContent ();
+ SegmentDateContent (const BomKey_T&);
SegmentDateContent (const SegmentDateContent&);
/** Destructor. */
@@ -43,6 +55,10 @@
protected:
// Attributes
+ /** The key of both structure and content objects. */
+ BomKey_T _key;
+
+
};
}
Modified: trunk/stdair/stdair/bom/SegmentDateStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDateStructure.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/bom/SegmentDateStructure.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -9,7 +9,6 @@
// STDAIR
#include <stdair/bom/BomStructureDummy.hpp>
#include <stdair/bom/BomContentDummy.hpp>
-#include <stdair/bom/SegmentDateKey.hpp>
#include <stdair/bom/SegmentCabinStructure.hpp>
namespace stdair {
@@ -28,7 +27,7 @@
typedef BOM_CONTENT Content_T;
/** Definition allowing to retrieve the associated BOM key type. */
- typedef SegmentDateKey_T BomKey_T;
+ typedef typename BOM_CONTENT::BomKey_T BomKey_T;
/** Definition allowing to retrieve the associated parent
BOM structure type. */
@@ -60,7 +59,8 @@
/** Get the segment-date key. */
const BomKey_T& getKey() const {
- return _key;
+ assert (_content != NULL);
+ return _content->getKey ();
}
/** Get the list of segment-cabins. */
@@ -112,11 +112,11 @@
/** Get a string describing the whole key (differentiating two objects
at any level). */
- const std::string describeKey() const { return _key.toString(); }
+ const std::string describeKey() const { return getKey().toString(); }
/** Get a string describing the short key (differentiating two objects
at the same level). */
- const std::string describeShortKey() const { return _key.toString(); }
+ const std::string describeShortKey() const { return getKey().toString(); }
/** Dump the segment-cabin children list in to an output stream.
@param ostream& the output stream. */
@@ -130,9 +130,9 @@
/** Constructors are private so as to force the usage of the Factory
layer. */
/** Default constructors. */
- SegmentDateStructure ();
+ SegmentDateStructure () : _parent (NULL), _content (NULL),
+ _childrenList (NULL) { }
SegmentDateStructure (const SegmentDateStructure&);
- SegmentDateStructure (const BomKey_T& iKey) : _parent (NULL), _key (iKey) { }
/** Destructor. */
virtual ~SegmentDateStructure() { }
@@ -145,9 +145,6 @@
/** The actual functional (Business Object) content. */
BOM_CONTENT* _content;
- /** The key of both the structure and content objects. */
- BomKey_T _key;
-
/** List of segment-cabins. */
ChildrenBomHolder_T* _childrenList;
};
Modified: trunk/stdair/stdair/factory/FacBomContent.hpp
===================================================================
--- trunk/stdair/stdair/factory/FacBomContent.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/factory/FacBomContent.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -88,12 +88,11 @@
// Create the structure/holder object
typedef typename BOM_CONTENT::BomStructure_T BOM_STRUCTURE_T;
BOM_STRUCTURE_T& lBomStructure =
- FacBomStructure::instance().
- create<typename BOM_CONTENT::BomKey_T, BOM_STRUCTURE_T> (iKey);
+ FacBomStructure::instance().create<BOM_STRUCTURE_T> ();
// The created flight-date content (BomContent) object gets a constant
// reference on its corresponding flight-date structure/holder object
- BOM_CONTENT* aBomContent_ptr = new BOM_CONTENT (lBomStructure);
+ BOM_CONTENT* aBomContent_ptr = new BOM_CONTENT (iKey, lBomStructure);
assert (aBomContent_ptr != NULL);
// The new object is added to the pool of content objects
Modified: trunk/stdair/stdair/factory/FacBomStructure.hpp
===================================================================
--- trunk/stdair/stdair/factory/FacBomStructure.hpp 2009-10-20 15:01:20 UTC (rev 54)
+++ trunk/stdair/stdair/factory/FacBomStructure.hpp 2009-10-26 13:08:42 UTC (rev 55)
@@ -51,11 +51,11 @@
static FacBomStructure& instance();
/** Create a structure object with the given key. */
- template <typename BOM_KEY, typename BOM_STRUCTURE>
- BOM_STRUCTURE& create (const BOM_KEY& iKey) {
+ template <typename BOM_STRUCTURE>
+ BOM_STRUCTURE& create () {
BOM_STRUCTURE* aBomStructure_ptr = NULL;
- aBomStructure_ptr = new BOM_STRUCTURE (iKey);
+ aBomStructure_ptr = new BOM_STRUCTURE ();
assert (aBomStructure_ptr != NULL);
// Initialise the children list of the BOM structure.
@@ -74,8 +74,9 @@
the parent structure object. .
@return bool Whether or not the operation succeeded. */
template <typename BOM_STRUCTURE_CHILD>
- static bool linkBomParentWithBomChild (typename BOM_STRUCTURE_CHILD::ParentBomStructure_T& ioBomParent,
- BOM_STRUCTURE_CHILD& ioBomChild) {
+ static bool linkBomParentWithBomChild
+ (typename BOM_STRUCTURE_CHILD::ParentBomStructure_T& ioBomParent,
+ BOM_STRUCTURE_CHILD& ioBomChild) {
// Set the parent of the child structure object
ioBomChild._parent = &ioBomParent;
@@ -109,7 +110,7 @@
private:
/** Create a bom children holder object with the given children type. */
template <typename BOM_CONTENT_CHILD>
- BomChildrenHolderImp<BOM_CONTENT_CHILD>& create () {
+ BomChildrenHolderImp<BOM_CONTENT_CHILD>& createBomHolder () {
BomChildrenHolderImp<BOM_CONTENT_CHILD>* aBomChildrenHolder_ptr = NULL;
@@ -134,7 +135,7 @@
typedef typename CHILDREN_TYPE_T::Content_T CONTENT_CHILDREN_T;
BomChildrenHolderImp<CONTENT_CHILDREN_T>& lBomChildrenHolder=
- instance().create<CONTENT_CHILDREN_T>();
+ instance().createBomHolder<CONTENT_CHILDREN_T>();
ioBomStructure.setChildrenList (lBomChildrenHolder);
@@ -142,7 +143,7 @@
typedef typename SECOND_CHILDREN_TYPE_T::Content_T SECOND_CONTENT_CHILDREN_T;
BomChildrenHolderImp<SECOND_CONTENT_CHILDREN_T>& lSecondBomChildrenHolder =
- instance().create<SECOND_CONTENT_CHILDREN_T>();
+ instance().createBomHolder<SECOND_CONTENT_CHILDREN_T>();
ioBomStructure.setChildrenList (lSecondBomChildrenHolder);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qua...@us...> - 2009-10-20 15:01:35
|
Revision: 54
http://stdair.svn.sourceforge.net/stdair/?rev=54&view=rev
Author: quannaus
Date: 2009-10-20 15:01:20 +0000 (Tue, 20 Oct 2009)
Log Message:
-----------
[Dev] Changed some includes.
Modified Paths:
--------------
trunk/stdair/stdair/bom/BookingClass.cpp
trunk/stdair/stdair/bom/BookingClass.hpp
trunk/stdair/stdair/bom/FlightDate.cpp
trunk/stdair/stdair/bom/FlightDate.hpp
trunk/stdair/stdair/bom/Inventory.cpp
trunk/stdair/stdair/bom/Inventory.hpp
trunk/stdair/stdair/bom/LegCabin.cpp
trunk/stdair/stdair/bom/LegCabin.hpp
trunk/stdair/stdair/bom/LegDate.cpp
trunk/stdair/stdair/bom/LegDate.hpp
trunk/stdair/stdair/bom/SegmentCabin.cpp
trunk/stdair/stdair/bom/SegmentCabin.hpp
trunk/stdair/stdair/bom/SegmentDate.cpp
trunk/stdair/stdair/bom/SegmentDate.hpp
Modified: trunk/stdair/stdair/bom/BookingClass.cpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClass.cpp 2009-10-20 14:47:18 UTC (rev 53)
+++ trunk/stdair/stdair/bom/BookingClass.cpp 2009-10-20 15:01:20 UTC (rev 54)
@@ -5,8 +5,6 @@
#include <assert.h>
// STDAIR
#include <stdair/bom/BookingClassStructure.hpp>
-#include <stdair/bom/SegmentCabin.hpp>
-#include <stdair/bom/LegCabin.hpp>
#include <stdair/bom/BookingClass.hpp>
namespace stdair {
Modified: trunk/stdair/stdair/bom/BookingClass.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-20 14:47:18 UTC (rev 53)
+++ trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-20 15:01:20 UTC (rev 54)
@@ -5,6 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
+#include <stdair/bom/SegmentCabin.hpp>
#include <stdair/bom/BookingClassStructure.hpp>
#include <stdair/bom/BookingClassContent.hpp>
#include <stdair/bom/SegmentCabinTypes.hpp>
@@ -13,7 +14,6 @@
namespace stdair {
// Forward declarations
class FacBomContent;
- class SegmentCabin;
struct BookingClassKey_T;
struct BookingClassList_T;
struct BookingClassMap_T;
Modified: trunk/stdair/stdair/bom/FlightDate.cpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDate.cpp 2009-10-20 14:47:18 UTC (rev 53)
+++ trunk/stdair/stdair/bom/FlightDate.cpp 2009-10-20 15:01:20 UTC (rev 54)
@@ -8,7 +8,6 @@
#include <algorithm>
// STDAIR
#include <stdair/bom/FlightDateStructure.hpp>
-#include <stdair/bom/Inventory.hpp>
#include <stdair/bom/FlightDate.hpp>
#include <stdair/bom/SegmentDate.hpp>
#include <stdair/bom/SegmentDateList.hpp>
Modified: trunk/stdair/stdair/bom/FlightDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-20 14:47:18 UTC (rev 53)
+++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-20 15:01:20 UTC (rev 54)
@@ -5,6 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
+#include <stdair/bom/Inventory.hpp>
#include <stdair/bom/FlightDateStructure.hpp>
#include <stdair/bom/FlightDateTypes.hpp>
#include <stdair/bom/SegmentDateTypes.hpp>
@@ -14,7 +15,6 @@
namespace stdair {
// Forward declarations
class FacBomContent;
- class Inventory;
struct FlightDateKey_T;
struct SegmentDateList_T;
struct SegmentDateMap_T;
Modified: trunk/stdair/stdair/bom/Inventory.cpp
===================================================================
--- trunk/stdair/stdair/bom/Inventory.cpp 2009-10-20 14:47:18 UTC (rev 53)
+++ trunk/stdair/stdair/bom/Inventory.cpp 2009-10-20 15:01:20 UTC (rev 54)
@@ -5,7 +5,6 @@
#include <cassert>
// STDAIR
#include <stdair/bom/InventoryStructure.hpp>
-#include <stdair/bom/BomRoot.hpp>
#include <stdair/bom/Inventory.hpp>
#include <stdair/bom/FlightDate.hpp>
#include <stdair/bom/FlightDateList.hpp>
Modified: trunk/stdair/stdair/bom/Inventory.hpp
===================================================================
--- trunk/stdair/stdair/bom/Inventory.hpp 2009-10-20 14:47:18 UTC (rev 53)
+++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-20 15:01:20 UTC (rev 54)
@@ -5,6 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
+#include <stdair/bom/BomRoot.hpp>
#include <stdair/bom/InventoryStructure.hpp>
#include <stdair/bom/InventoryTypes.hpp>
#include <stdair/bom/FlightDateTypes.hpp>
@@ -13,7 +14,6 @@
namespace stdair {
// Forward declarations
class FacBomContent;
- class BomRoot;
struct InventoryKey_T;
struct FlightDateList_T;
struct FlightDateMap_T;
Modified: trunk/stdair/stdair/bom/LegCabin.cpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabin.cpp 2009-10-20 14:47:18 UTC (rev 53)
+++ trunk/stdair/stdair/bom/LegCabin.cpp 2009-10-20 15:01:20 UTC (rev 54)
@@ -5,7 +5,6 @@
#include <assert.h>
// STDAIR
#include <stdair/bom/LegCabinStructure.hpp>
-#include <stdair/bom/LegDate.hpp>
#include <stdair/bom/LegCabin.hpp>
namespace stdair {
Modified: trunk/stdair/stdair/bom/LegCabin.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-20 14:47:18 UTC (rev 53)
+++ trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-20 15:01:20 UTC (rev 54)
@@ -5,6 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
+#include <stdair/bom/LegDate.hpp>
#include <stdair/bom/LegCabinStructure.hpp>
#include <stdair/bom/LegCabinContent.hpp>
#include <stdair/bom/LegCabinTypes.hpp>
@@ -12,7 +13,6 @@
namespace stdair {
// Forward declarations
class FacBomContent;
- class LegDate;
struct LegCabinKey_T;
/** Class representing the actual functional/business content for a
Modified: trunk/stdair/stdair/bom/LegDate.cpp
===================================================================
--- trunk/stdair/stdair/bom/LegDate.cpp 2009-10-20 14:47:18 UTC (rev 53)
+++ trunk/stdair/stdair/bom/LegDate.cpp 2009-10-20 15:01:20 UTC (rev 54)
@@ -5,7 +5,6 @@
#include <assert.h>
// STDAIR
#include <stdair/bom/LegDateStructure.hpp>
-#include <stdair/bom/FlightDate.hpp>
#include <stdair/bom/LegDate.hpp>
#include <stdair/bom/LegCabin.hpp>
#include <stdair/bom/LegCabinList.hpp>
Modified: trunk/stdair/stdair/bom/LegDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegDate.hpp 2009-10-20 14:47:18 UTC (rev 53)
+++ trunk/stdair/stdair/bom/LegDate.hpp 2009-10-20 15:01:20 UTC (rev 54)
@@ -5,6 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
+#include <stdair/bom/FlightDate.hpp>
#include <stdair/bom/LegDateStructure.hpp>
#include <stdair/bom/LegDateContent.hpp>
#include <stdair/bom/LegDateTypes.hpp>
@@ -13,7 +14,6 @@
namespace stdair {
// Forward declarations
class FacBomContent;
- class FlightDate;
struct LegDateKey_T;
struct LegCabinList_T;
struct LegCabinMap_T;
Modified: trunk/stdair/stdair/bom/SegmentCabin.cpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabin.cpp 2009-10-20 14:47:18 UTC (rev 53)
+++ trunk/stdair/stdair/bom/SegmentCabin.cpp 2009-10-20 15:01:20 UTC (rev 54)
@@ -5,7 +5,6 @@
#include <assert.h>
// STDAIR
#include <stdair/bom/SegmentCabinStructure.hpp>
-#include <stdair/bom/SegmentDate.hpp>
#include <stdair/bom/SegmentCabin.hpp>
#include <stdair/bom/BookingClass.hpp>
#include <stdair/bom/BookingClassList.hpp>
Modified: trunk/stdair/stdair/bom/SegmentCabin.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-20 14:47:18 UTC (rev 53)
+++ trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-20 15:01:20 UTC (rev 54)
@@ -5,6 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
+#include <stdair/bom/SegmentDate.hpp>
#include <stdair/bom/SegmentCabinStructure.hpp>
#include <stdair/bom/SegmentCabinContent.hpp>
#include <stdair/bom/SegmentCabinTypes.hpp>
@@ -13,7 +14,6 @@
namespace stdair {
// Forward declarations
class FacBomContent;
- class SegmentDate;
struct SegmentCabinKey_T;
struct BookingClassList_T;
struct BookingClassMap_T;
Modified: trunk/stdair/stdair/bom/SegmentDate.cpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDate.cpp 2009-10-20 14:47:18 UTC (rev 53)
+++ trunk/stdair/stdair/bom/SegmentDate.cpp 2009-10-20 15:01:20 UTC (rev 54)
@@ -5,7 +5,6 @@
#include <assert.h>
// STDAIR
#include <stdair/bom/SegmentDateStructure.hpp>
-#include <stdair/bom/FlightDate.hpp>
#include <stdair/bom/SegmentDate.hpp>
#include <stdair/bom/SegmentCabin.hpp>
#include <stdair/bom/SegmentCabinList.hpp>
Modified: trunk/stdair/stdair/bom/SegmentDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-20 14:47:18 UTC (rev 53)
+++ trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-20 15:01:20 UTC (rev 54)
@@ -5,6 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
+#include <stdair/bom/FlightDate.hpp>
#include <stdair/bom/SegmentDateStructure.hpp>
#include <stdair/bom/SegmentDateTypes.hpp>
#include <stdair/bom/SegmentCabinTypes.hpp>
@@ -13,7 +14,6 @@
namespace stdair {
// Forward declarations
class FacBomContent;
- class FlightDate;
struct SegmentDateKey_T;
struct SegmentCabinList_T;
struct SegmentCabinMap_T;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qua...@us...> - 2009-10-20 14:47:29
|
Revision: 53
http://stdair.svn.sourceforge.net/stdair/?rev=53&view=rev
Author: quannaus
Date: 2009-10-20 14:47:18 +0000 (Tue, 20 Oct 2009)
Log Message:
-----------
[Dev] Changed some includes.
Modified Paths:
--------------
trunk/stdair/stdair/bom/BomRoot.hpp
trunk/stdair/stdair/bom/BookingClass.hpp
trunk/stdair/stdair/bom/FlightDate.hpp
trunk/stdair/stdair/bom/Inventory.hpp
trunk/stdair/stdair/bom/LegCabin.hpp
trunk/stdair/stdair/bom/LegDate.hpp
trunk/stdair/stdair/bom/SegmentCabin.hpp
trunk/stdair/stdair/bom/SegmentDate.hpp
Modified: trunk/stdair/stdair/bom/BomRoot.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomRoot.hpp 2009-10-20 14:39:49 UTC (rev 52)
+++ trunk/stdair/stdair/bom/BomRoot.hpp 2009-10-20 14:47:18 UTC (rev 53)
@@ -5,7 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
-#include <stdair/bom/BomStructure.hpp>
+#include <stdair/bom/BomRootStructure.hpp>
#include <stdair/bom/BomRootContent.hpp>
#include <stdair/bom/BomRootTypes.hpp>
#include <stdair/bom/InventoryTypes.hpp>
Modified: trunk/stdair/stdair/bom/BookingClass.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-20 14:39:49 UTC (rev 52)
+++ trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-20 14:47:18 UTC (rev 53)
@@ -5,7 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
-#include <stdair/bom/BomStructure.hpp>
+#include <stdair/bom/BookingClassStructure.hpp>
#include <stdair/bom/BookingClassContent.hpp>
#include <stdair/bom/SegmentCabinTypes.hpp>
#include <stdair/bom/BookingClassTypes.hpp>
Modified: trunk/stdair/stdair/bom/FlightDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-20 14:39:49 UTC (rev 52)
+++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-20 14:47:18 UTC (rev 53)
@@ -5,7 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
-#include <stdair/bom/BomStructure.hpp>
+#include <stdair/bom/FlightDateStructure.hpp>
#include <stdair/bom/FlightDateTypes.hpp>
#include <stdair/bom/SegmentDateTypes.hpp>
#include <stdair/bom/LegDateTypes.hpp>
Modified: trunk/stdair/stdair/bom/Inventory.hpp
===================================================================
--- trunk/stdair/stdair/bom/Inventory.hpp 2009-10-20 14:39:49 UTC (rev 52)
+++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-20 14:47:18 UTC (rev 53)
@@ -5,7 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
-#include <stdair/bom/BomStructure.hpp>
+#include <stdair/bom/InventoryStructure.hpp>
#include <stdair/bom/InventoryTypes.hpp>
#include <stdair/bom/FlightDateTypes.hpp>
#include <stdair/bom/InventoryContent.hpp>
Modified: trunk/stdair/stdair/bom/LegCabin.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-20 14:39:49 UTC (rev 52)
+++ trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-20 14:47:18 UTC (rev 53)
@@ -5,7 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
-#include <stdair/bom/BomStructure.hpp>
+#include <stdair/bom/LegCabinStructure.hpp>
#include <stdair/bom/LegCabinContent.hpp>
#include <stdair/bom/LegCabinTypes.hpp>
Modified: trunk/stdair/stdair/bom/LegDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegDate.hpp 2009-10-20 14:39:49 UTC (rev 52)
+++ trunk/stdair/stdair/bom/LegDate.hpp 2009-10-20 14:47:18 UTC (rev 53)
@@ -5,7 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
-#include <stdair/bom/BomStructure.hpp>
+#include <stdair/bom/LegDateStructure.hpp>
#include <stdair/bom/LegDateContent.hpp>
#include <stdair/bom/LegDateTypes.hpp>
#include <stdair/bom/LegCabinTypes.hpp>
Modified: trunk/stdair/stdair/bom/SegmentCabin.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-20 14:39:49 UTC (rev 52)
+++ trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-20 14:47:18 UTC (rev 53)
@@ -5,7 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
-#include <stdair/bom/BomStructure.hpp>
+#include <stdair/bom/SegmentCabinStructure.hpp>
#include <stdair/bom/SegmentCabinContent.hpp>
#include <stdair/bom/SegmentCabinTypes.hpp>
#include <stdair/bom/BookingClassTypes.hpp>
Modified: trunk/stdair/stdair/bom/SegmentDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-20 14:39:49 UTC (rev 52)
+++ trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-20 14:47:18 UTC (rev 53)
@@ -5,7 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
-#include <stdair/bom/BomStructure.hpp>
+#include <stdair/bom/SegmentDateStructure.hpp>
#include <stdair/bom/SegmentDateTypes.hpp>
#include <stdair/bom/SegmentCabinTypes.hpp>
#include <stdair/bom/SegmentDateContent.hpp>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qua...@us...> - 2009-10-20 14:40:00
|
Revision: 52
http://stdair.svn.sourceforge.net/stdair/?rev=52&view=rev
Author: quannaus
Date: 2009-10-20 14:39:49 +0000 (Tue, 20 Oct 2009)
Log Message:
-----------
[Dev] Added LegCabinKey in sources.
Modified Paths:
--------------
trunk/stdair/stdair/bom/sources.mk
Modified: trunk/stdair/stdair/bom/sources.mk
===================================================================
--- trunk/stdair/stdair/bom/sources.mk 2009-10-20 14:04:45 UTC (rev 51)
+++ trunk/stdair/stdair/bom/sources.mk 2009-10-20 14:39:49 UTC (rev 52)
@@ -4,6 +4,7 @@
$(top_srcdir)/stdair/bom/InventoryKey.hpp \
$(top_srcdir)/stdair/bom/FlightDateKey.hpp \
$(top_srcdir)/stdair/bom/LegDateKey.hpp \
+ $(top_srcdir)/stdair/bom/LegCabinKey.hpp \
$(top_srcdir)/stdair/bom/SegmentDateKey.hpp \
$(top_srcdir)/stdair/bom/SegmentCabinKey.hpp \
$(top_srcdir)/stdair/bom/BookingClassKey.hpp \
@@ -65,6 +66,7 @@
$(top_srcdir)/stdair/bom/InventoryKey.cpp \
$(top_srcdir)/stdair/bom/FlightDateKey.cpp \
$(top_srcdir)/stdair/bom/LegDateKey.cpp \
+ $(top_srcdir)/stdair/bom/LegCabinKey.cpp \
$(top_srcdir)/stdair/bom/SegmentDateKey.cpp \
$(top_srcdir)/stdair/bom/SegmentCabinKey.cpp \
$(top_srcdir)/stdair/bom/BookingClassKey.cpp \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qua...@us...> - 2009-10-20 14:04:56
|
Revision: 51
http://stdair.svn.sourceforge.net/stdair/?rev=51&view=rev
Author: quannaus
Date: 2009-10-20 14:04:45 +0000 (Tue, 20 Oct 2009)
Log Message:
-----------
[Dev] Changed the key from class template to struct.
Modified Paths:
--------------
trunk/stdair/stdair/bom/BomKey.hpp
trunk/stdair/stdair/bom/BomRoot.hpp
trunk/stdair/stdair/bom/BomRootKey.hpp
trunk/stdair/stdair/bom/BomRootStructure.hpp
trunk/stdair/stdair/bom/BomRootTypes.hpp
trunk/stdair/stdair/bom/BomStructureDummy.hpp
trunk/stdair/stdair/bom/BookingClass.hpp
trunk/stdair/stdair/bom/BookingClassKey.hpp
trunk/stdair/stdair/bom/BookingClassStructure.hpp
trunk/stdair/stdair/bom/BookingClassTypes.hpp
trunk/stdair/stdair/bom/FlightDate.hpp
trunk/stdair/stdair/bom/FlightDateKey.hpp
trunk/stdair/stdair/bom/FlightDateStructure.hpp
trunk/stdair/stdair/bom/FlightDateTypes.hpp
trunk/stdair/stdair/bom/Inventory.hpp
trunk/stdair/stdair/bom/InventoryKey.hpp
trunk/stdair/stdair/bom/InventoryStructure.hpp
trunk/stdair/stdair/bom/InventoryTypes.hpp
trunk/stdair/stdair/bom/LegCabin.hpp
trunk/stdair/stdair/bom/LegCabinKey.hpp
trunk/stdair/stdair/bom/LegCabinStructure.hpp
trunk/stdair/stdair/bom/LegCabinTypes.hpp
trunk/stdair/stdair/bom/LegDate.hpp
trunk/stdair/stdair/bom/LegDateKey.hpp
trunk/stdair/stdair/bom/LegDateStructure.hpp
trunk/stdair/stdair/bom/LegDateTypes.hpp
trunk/stdair/stdair/bom/SegmentCabin.hpp
trunk/stdair/stdair/bom/SegmentCabinKey.hpp
trunk/stdair/stdair/bom/SegmentCabinStructure.hpp
trunk/stdair/stdair/bom/SegmentCabinTypes.hpp
trunk/stdair/stdair/bom/SegmentDate.hpp
trunk/stdair/stdair/bom/SegmentDateKey.hpp
trunk/stdair/stdair/bom/SegmentDateStructure.hpp
trunk/stdair/stdair/bom/SegmentDateTypes.hpp
trunk/stdair/stdair/bom/sources.mk
trunk/stdair/stdair/factory/FacBomContent.hpp
trunk/stdair/stdair/factory/FacBomStructure.hpp
Added Paths:
-----------
trunk/stdair/stdair/bom/BomRootKey.cpp
trunk/stdair/stdair/bom/BookingClassKey.cpp
trunk/stdair/stdair/bom/FlightDateKey.cpp
trunk/stdair/stdair/bom/InventoryKey.cpp
trunk/stdair/stdair/bom/LegCabinKey.cpp
trunk/stdair/stdair/bom/LegDateKey.cpp
trunk/stdair/stdair/bom/SegmentCabinKey.cpp
trunk/stdair/stdair/bom/SegmentDateKey.cpp
Modified: trunk/stdair/stdair/bom/BomKey.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomKey.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/BomKey.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -17,7 +17,7 @@
at the same level only. For instance, the segment-date key allows
to differentiate two segment-dates under a given flight-date,
but does not allow to differentiate two segemnt-dates in general. */
- class BomKey {
+ struct BomKey_T {
public:
// /////////// Display support methods /////////
@@ -48,7 +48,7 @@
inline
std::basic_ostream<charT, traits>&
operator<< (std::basic_ostream<charT, traits>& ioOut,
- const stdair::BomKey& iBom) {
+ const stdair::BomKey_T& iBom) {
/**
string stream:
- with same format
@@ -76,7 +76,7 @@
inline
std::basic_istream<charT, traits>&
operator>> (std::basic_istream<charT, traits>& ioIn,
- stdair::BomKey& ioBom) {
+ stdair::BomKey_T& ioBom) {
// Fill Bom object with input stream
ioBom.fromStream (ioIn);
return ioIn;
Modified: trunk/stdair/stdair/bom/BomRoot.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomRoot.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/BomRoot.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -13,6 +13,7 @@
namespace stdair {
// Forward declarations.
class FacBomContent;
+ struct BomRootKey_T;
struct InventoryList_T;
struct InventoryMap_T;
Added: trunk/stdair/stdair/bom/BomRootKey.cpp
===================================================================
--- trunk/stdair/stdair/bom/BomRootKey.cpp (rev 0)
+++ trunk/stdair/stdair/bom/BomRootKey.cpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -0,0 +1,33 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/BomRootKey.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ BomRootKey_T::BomRootKey_T () {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ BomRootKey_T::~BomRootKey_T () {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ void BomRootKey_T::toStream (std::ostream& ioOut) const {
+ ioOut << "BomRootStructureKey: " << toString() << std::endl;
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ void BomRootKey_T::fromStream (std::istream& ioIn) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ std::string BomRootKey_T::toString() const {
+ std::ostringstream oStr;
+ oStr << " -- ROOT -- ";
+ return oStr.str();
+ }
+
+}
Modified: trunk/stdair/stdair/bom/BomRootKey.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomRootKey.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/BomRootKey.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -9,53 +9,33 @@
#include <stdair/bom/BomKey.hpp>
namespace stdair {
-
- // Forward declarations
- template <typename BOM_CONTENT>
- class BomRootStructure;
-
/** Key of the BOM structure root. */
- template <typename BOM_CONTENT>
- class BomRootKey : public BomKey {
- friend class FacBomStructure;
- friend class FacBomContent;
-
- private:
- // Type definitions
- /** Definition allowing to retrieve the associated BOM structure type. */
- typedef BomRootStructure<BOM_CONTENT> BomStructure_T;
+ struct BomRootKey_T : public BomKey_T {
public:
// /////////// Construction ///////////
/** Constructor. */
- BomRootKey () {}
+ BomRootKey_T ();
/** Destructor. */
- ~BomRootKey () {}
+ ~BomRootKey_T ();
// /////////// Display support methods /////////
/** Dump a Business Object Key into an output stream.
@param ostream& the output stream. */
- void toStream (std::ostream& ioOut) const {
- ioOut << "BomRootStructureKey: " << toString() << std::endl;
- }
+ void toStream (std::ostream& ioOut) const;
/** Read a Business Object Key from an input stream.
@param istream& the input stream. */
- void fromStream (std::istream& ioIn) { }
+ void fromStream (std::istream& ioIn);
/** Get the serialised version of the Business Object Key.
<br>That string is unique, at the level of a given Business Object,
when among children of a given parent Business Object.
<br>For instance, "H" and "K" allow to differentiate among two
marketing classes for the same segment-date. */
- std::string toString() const {
- std::ostringstream oStr;
- oStr << " -- ROOT -- ";
- return oStr.str();
- }
-
+ std::string toString() const;
private:
// Attributes
Modified: trunk/stdair/stdair/bom/BomRootStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomRootStructure.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/BomRootStructure.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -35,7 +35,7 @@
private:
// Type definitions
/** Definition allowing to retrieve the associated BOM key type. */
- typedef BomRootKey<BOM_CONTENT> BomKey_T;
+ typedef BomRootKey_T BomKey_T;
/** Definition allowing to retrieve the associated children type. */
typedef boost::mpl::vector<InventoryStructure<ContentChild_T>, BomStructureDummy> ChildrenBomTypeList_T;
Modified: trunk/stdair/stdair/bom/BomRootTypes.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomRootTypes.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/BomRootTypes.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -9,15 +9,11 @@
namespace stdair {
// Forward declarations.
template <typename BOM_CONTENT> class BomRootStructure;
- template <typename BOM_CONTENT> class BomRootKey;
class BomRoot;
/** Define the BomRootStructure. */
typedef BomRootStructure<BomRoot> BomRootStructure_T;
- /** Define the BomRootStructureKey. */
- typedef BomRootKey<BomRoot> BomRootKey_T;
-
}
#endif // __STDAIR_BOM_BOMROOTTYPES_HPP
Modified: trunk/stdair/stdair/bom/BomStructureDummy.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomStructureDummy.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/BomStructureDummy.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -26,9 +26,6 @@
/** Definition allowing to retrieve the associated BOM content type. */
typedef BomContentDummy Content_T;
- /** Definition allowing to retrieve the associated BOM key type. */
- typedef BomKey BomKey_T;
-
/** Definition allowing to retrieve the associated children type. */
typedef boost::mpl::vector<> ChildrenBomTypeList_T;
Modified: trunk/stdair/stdair/bom/BookingClass.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -14,6 +14,7 @@
// Forward declarations
class FacBomContent;
class SegmentCabin;
+ struct BookingClassKey_T;
struct BookingClassList_T;
struct BookingClassMap_T;
Added: trunk/stdair/stdair/bom/BookingClassKey.cpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClassKey.cpp (rev 0)
+++ trunk/stdair/stdair/bom/BookingClassKey.cpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -0,0 +1,34 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/BookingClassKey.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ BookingClassKey_T::BookingClassKey_T (const ClassCode_T& iClassCode)
+ : _classCode (iClassCode) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ BookingClassKey_T::~BookingClassKey_T () {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ void BookingClassKey_T::toStream (std::ostream& ioOut) const {
+ ioOut << "BookingClassKey: " << toString() << std::endl;
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ void BookingClassKey_T::fromStream (std::istream& ioIn) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ std::string BookingClassKey_T::toString() const {
+ std::ostringstream oStr;
+ oStr << _classCode;
+ return oStr.str();
+ }
+
+}
Modified: trunk/stdair/stdair/bom/BookingClassKey.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClassKey.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/BookingClassKey.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -9,60 +9,36 @@
#include <stdair/bom/BomKey.hpp>
namespace stdair {
-
- // Forward declarations
- template <typename BOM_CONTENT>
- class BookingClassStructure;
-
/** Key of segment-cabin. */
- template <typename BOM_CONTENT>
- class BookingClassKey : public BomKey {
- friend class FacBomStructure;
- friend class FacBomContent;
-
- private:
- // Type definitions
- /** Definition allowing to retrieve the associated BOM structure type. */
- typedef BookingClassStructure<BOM_CONTENT> BomStructure_T;
+ struct BookingClassKey_T : public BomKey_T {
public:
// /////////// Construction ///////////
/** Constructor. */
- BookingClassKey (const ClassCode_T& iClassCode)
- : _classCode (iClassCode) {
- }
+ BookingClassKey_T (const ClassCode_T& iClassCode);
/** Destructor. */
- ~BookingClassKey () { }
+ ~BookingClassKey_T ();
// /////////// Getters //////////
/** Get the cabin code. */
- const ClassCode_T& getClassCode () const {
- return _classCode;
- }
+ const ClassCode_T& getClassCode () const;
// /////////// Display support methods /////////
/** Dump a Business Object Key into an output stream.
@param ostream& the output stream. */
- void toStream (std::ostream& ioOut) const {
- ioOut << "BookingClassKey: " << toString() << std::endl;
- }
+ void toStream (std::ostream& ioOut) const;
/** Read a Business Object Key from an input stream.
@param istream& the input stream. */
- void fromStream (std::istream& ioIn) { }
+ void fromStream (std::istream& ioIn);
/** Get the serialised version of the Business Object Key.
<br>That string is unique, at the level of a given Business Object,
when among children of a given parent Business Object.
<br>For instance, "H" and "K" allow to differentiate among two
marketing classes for the same segment-cabin. */
- std::string toString() const {
- std::ostringstream oStr;
- oStr << _classCode;
- return oStr.str();
- }
-
+ std::string toString() const;
private:
// Attributes
Modified: trunk/stdair/stdair/bom/BookingClassStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClassStructure.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/BookingClassStructure.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -27,7 +27,7 @@
typedef BOM_CONTENT Content_T;
/** Definition allowing to retrieve the associated BOM key type. */
- typedef BookingClassKey<BOM_CONTENT> BomKey_T;
+ typedef BookingClassKey_T BomKey_T;
/** Definition allowing to retrieve the associated parent
BOM structure type. */
Modified: trunk/stdair/stdair/bom/BookingClassTypes.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClassTypes.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/BookingClassTypes.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -13,15 +13,11 @@
// Forward declarations.
template <typename BOM_CONTENT> class BookingClassStructure;
- template <typename BOM_CONTENT> class BookingClassKey;
class BookingClass;
/** Define the BookingClass structure. */
typedef BookingClassStructure<BookingClass> BookingClassStructure_T;
- /** Define the BookingClass key. */
- typedef BookingClassKey<BookingClass> BookingClassKey_T;
-
/** Define the segment-cabin structure list. */
typedef std::vector<BookingClassStructure_T*> BookingClassStructureList_T;
Modified: trunk/stdair/stdair/bom/FlightDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -15,6 +15,7 @@
// Forward declarations
class FacBomContent;
class Inventory;
+ struct FlightDateKey_T;
struct SegmentDateList_T;
struct SegmentDateMap_T;
struct LegDateList_T;
Added: trunk/stdair/stdair/bom/FlightDateKey.cpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDateKey.cpp (rev 0)
+++ trunk/stdair/stdair/bom/FlightDateKey.cpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -0,0 +1,35 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/FlightDateKey.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ FlightDateKey_T::FlightDateKey_T (const FlightNumber_T& iFlightNumber,
+ const Date_T& iFlightDate)
+ : _flightNumber (iFlightNumber), _flightDate (iFlightDate) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ FlightDateKey_T::~FlightDateKey_T () {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ void FlightDateKey_T::toStream (std::ostream& ioOut) const {
+ ioOut << "FlightDateKey: " << toString() << std::endl;
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ void FlightDateKey_T::fromStream (std::istream& ioIn) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ std::string FlightDateKey_T::toString() const {
+ std::ostringstream oStr;
+ oStr << _flightNumber << ", " << _flightDate;
+ return oStr.str();
+ }
+
+}
Modified: trunk/stdair/stdair/bom/FlightDateKey.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDateKey.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/FlightDateKey.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -9,32 +9,16 @@
#include <stdair/bom/BomKey.hpp>
namespace stdair {
-
- // Forward declarations
- template <typename BOM_CONTENT>
- class FlightDateStructure;
-
/** Key of flight-date. */
- template <typename BOM_CONTENT>
- class FlightDateKey : public BomKey {
- friend class FacBomStructure;
- friend class FacBomContent;
-
- private:
- // Type definitions
- /** Definition allowing to retrieve the associated BOM structure type. */
- typedef FlightDateStructure<BOM_CONTENT> BomStructure_T;
+ struct FlightDateKey_T : public BomKey_T {
public:
// /////////// Construction ///////////
/** Constructor. */
- FlightDateKey (const FlightNumber_T& iFlightNumber,
- const Date_T& iFlightDate)
- : _flightNumber (iFlightNumber), _flightDate (iFlightDate) {
- }
+ FlightDateKey_T (const FlightNumber_T&, const Date_T&);
/** Destructor. */
- ~FlightDateKey () { }
+ ~FlightDateKey_T ();
// /////////// Getters //////////
/** Get the flight number. */
@@ -50,24 +34,18 @@
// /////////// Display support methods /////////
/** Dump a Business Object Key into an output stream.
@param ostream& the output stream. */
- void toStream (std::ostream& ioOut) const {
- ioOut << "FlightDateKey: " << toString() << std::endl;
- }
+ void toStream (std::ostream& ioOut) const;
/** Read a Business Object Key from an input stream.
@param istream& the input stream. */
- void fromStream (std::istream& ioIn) { }
+ void fromStream (std::istream& ioIn);
/** Get the serialised version of the Business Object Key.
<br>That string is unique, at the level of a given Business Object,
when among children of a given parent Business Object.
<br>For instance, "H" and "K" allow to differentiate among two
marketing classes for the same segment-date. */
- std::string toString() const {
- std::ostringstream oStr;
- oStr << _flightNumber << ", " << _flightDate;
- return oStr.str();
- }
+ std::string toString() const;
private:
// Attributes
Modified: trunk/stdair/stdair/bom/FlightDateStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -29,7 +29,7 @@
typedef BOM_CONTENT Content_T;
/** Definition allowing to retrieve the associated BOM key type. */
- typedef FlightDateKey<BOM_CONTENT> BomKey_T;
+ typedef FlightDateKey_T BomKey_T;
/** Definition allowing to retrieve the associated parent
BOM structure type. */
Modified: trunk/stdair/stdair/bom/FlightDateTypes.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDateTypes.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/FlightDateTypes.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -13,15 +13,11 @@
// Forward declarations.
template <typename BOM_CONTENT> class FlightDateStructure;
- template <typename BOM_CONTENT> class FlightDateKey;
class FlightDate;
/** Define the FlightDate structure. */
typedef FlightDateStructure<FlightDate> FlightDateStructure_T;
- /** Define the FlightDate key. */
- typedef FlightDateKey<FlightDate> FlightDateKey_T;
-
/** Define the flight-date structure list. */
typedef std::vector<FlightDateStructure_T*> FlightDateStructureList_T;
Modified: trunk/stdair/stdair/bom/Inventory.hpp
===================================================================
--- trunk/stdair/stdair/bom/Inventory.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -14,6 +14,7 @@
// Forward declarations
class FacBomContent;
class BomRoot;
+ struct InventoryKey_T;
struct FlightDateList_T;
struct FlightDateMap_T;
Added: trunk/stdair/stdair/bom/InventoryKey.cpp
===================================================================
--- trunk/stdair/stdair/bom/InventoryKey.cpp (rev 0)
+++ trunk/stdair/stdair/bom/InventoryKey.cpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -0,0 +1,34 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/InventoryKey.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ InventoryKey_T::InventoryKey_T (const AirlineCode_T& iAirlineCode)
+ : _airlineCode (iAirlineCode) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ InventoryKey_T::~InventoryKey_T () {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ void InventoryKey_T::toStream (std::ostream& ioOut) const {
+ ioOut << "InventoryKey: " << toString() << std::endl;
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ void InventoryKey_T::fromStream (std::istream& ioIn) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ std::string InventoryKey_T::toString() const {
+ std::ostringstream oStr;
+ oStr << _airlineCode;
+ return oStr.str();
+ }
+
+}
Modified: trunk/stdair/stdair/bom/InventoryKey.hpp
===================================================================
--- trunk/stdair/stdair/bom/InventoryKey.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/InventoryKey.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -9,58 +9,36 @@
#include <stdair/bom/BomKey.hpp>
namespace stdair {
+ /** Key of inventory. */
+ struct InventoryKey_T : public BomKey_T {
- // Forward declarations
- template<typename BOM_CONTENT> class InventoryStructure;
-
- /** Key of flight-date. */
- template <typename BOM_CONTENT>
- class InventoryKey : public BomKey {
- friend class FacBomStructure;
- friend class FacBomContent;
-
- private:
- // Type definitions
- /** Definition allowing to retrieve the associated BOM structure type. */
- typedef InventoryStructure<BOM_CONTENT> BomStructure_T;
-
public:
// /////////// Construction ///////////
/** Constructor. */
- InventoryKey (const AirlineCode_T& iAirlineCode)
- : _airlineCode (iAirlineCode) {
- }
+ InventoryKey_T (const AirlineCode_T& iAirlineCode);
/** Destructor. */
- ~InventoryKey () { }
+ ~InventoryKey_T ();
// /////////// Getters //////////
/** Get the airline code. */
- const AirlineCode_T& getAirlineCode() const {
- return _airlineCode;
- }
+ const AirlineCode_T& getAirlineCode() const;
// /////////// Display support methods /////////
/** Dump a Business Object Key into an output stream.
@param ostream& the output stream. */
- void toStream (std::ostream& ioOut) const {
- ioOut << "InventoryKey: " << toString() << std::endl;
- }
+ void toStream (std::ostream& ioOut) const;
/** Read a Business Object Key from an input stream.
@param istream& the input stream. */
- void fromStream (std::istream& ioIn) { }
-
+ void fromStream (std::istream& ioIn);
+
/** Get the serialised version of the Business Object Key.
<br>That string is unique, at the level of a given Business Object,
when among children of a given parent Business Object.
<br>For instance, "H" and "K" allow to differentiate among two
marketing classes for the same segment-date. */
- std::string toString() const {
- std::ostringstream oStr;
- oStr << _airlineCode;
- return oStr.str();
- }
+ std::string toString() const;
private:
// Attributes
Modified: trunk/stdair/stdair/bom/InventoryStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -30,7 +30,7 @@
typedef BOM_CONTENT Content_T;
/** Definition allowing to retrieve the associated BOM key type. */
- typedef InventoryKey<BOM_CONTENT> BomKey_T;
+ typedef InventoryKey_T BomKey_T;
/** Definition allowing to retrieve the children type of the
BOM_CONTENT. */
Modified: trunk/stdair/stdair/bom/InventoryTypes.hpp
===================================================================
--- trunk/stdair/stdair/bom/InventoryTypes.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/InventoryTypes.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -13,15 +13,11 @@
// Forward declarations.
template <typename BOM_CONTENT> class InventoryStructure;
- template <typename BOM_CONTENT> class InventoryKey;
class Inventory;
/** Define the Inventory structure. */
typedef InventoryStructure<Inventory> InventoryStructure_T;
- /** Define the Inventory key. */
- typedef InventoryKey<Inventory> InventoryKey_T;
-
/** Define the Inventory structure list. */
typedef std::vector<InventoryStructure_T*> InventoryStructureList_T;
Modified: trunk/stdair/stdair/bom/LegCabin.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -13,7 +13,8 @@
// Forward declarations
class FacBomContent;
class LegDate;
-
+ struct LegCabinKey_T;
+
/** Class representing the actual functional/business content for a
leg-date. */
class LegCabin : public LegCabinContent {
Added: trunk/stdair/stdair/bom/LegCabinKey.cpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabinKey.cpp (rev 0)
+++ trunk/stdair/stdair/bom/LegCabinKey.cpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -0,0 +1,34 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/LegCabinKey.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ LegCabinKey_T::LegCabinKey_T (const CabinCode_T& iCabinCode)
+ : _cabinCode (iCabinCode) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ LegCabinKey_T::~LegCabinKey_T () {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ void LegCabinKey_T::toStream (std::ostream& ioOut) const {
+ ioOut << "LegCabinKey: " << toString() << std::endl;
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ void LegCabinKey_T::fromStream (std::istream& ioIn) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ std::string LegCabinKey_T::toString() const {
+ std::ostringstream oStr;
+ oStr << _cabinCode;
+ return oStr.str();
+ }
+
+}
Modified: trunk/stdair/stdair/bom/LegCabinKey.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabinKey.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/LegCabinKey.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -9,31 +9,16 @@
#include <stdair/bom/BomKey.hpp>
namespace stdair {
-
- // Forward declarations
- template <typename BOM_CONTENT>
- class LegCabinStructure;
-
/** Key of leg-cabin. */
- template <typename BOM_CONTENT>
- class LegCabinKey : public BomKey {
- friend class FacBomStructure;
- friend class FacBomContent;
-
- private:
- // Type definitions
- /** Definition allowing to retrieve the associated BOM structure type. */
- typedef LegCabinStructure<BOM_CONTENT> BomStructure_T;
+ struct LegCabinKey_T : public BomKey_T {
public:
// /////////// Construction ///////////
/** Constructor. */
- LegCabinKey (const CabinCode_T& iCabinCode)
- : _cabinCode (iCabinCode) {
- }
+ LegCabinKey_T (const CabinCode_T& iCabinCode);
/** Destructor. */
- ~LegCabinKey () { }
+ ~LegCabinKey_T ();
// /////////// Getters //////////
/** Get the cabin code. */
@@ -44,25 +29,18 @@
// /////////// Display support methods /////////
/** Dump a Business Object Key into an output stream.
@param ostream& the output stream. */
- void toStream (std::ostream& ioOut) const {
- ioOut << "LegCabinKey: " << toString() << std::endl;
- }
+ void toStream (std::ostream& ioOut) const;
/** Read a Business Object Key from an input stream.
@param istream& the input stream. */
- void fromStream (std::istream& ioIn) { }
+ void fromStream (std::istream& ioIn);
/** Get the serialised version of the Business Object Key.
<br>That string is unique, at the level of a given Business Object,
when among children of a given parent Business Object.
<br>For instance, "H" and "K" allow to differentiate among two
marketing classes for the same leg-cabin. */
- std::string toString() const {
- std::ostringstream oStr;
- oStr << _cabinCode;
- return oStr.str();
- }
-
+ std::string toString() const;
private:
// Attributes
Modified: trunk/stdair/stdair/bom/LegCabinStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabinStructure.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/LegCabinStructure.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -28,7 +28,7 @@
typedef BOM_CONTENT Content_T;
/** Definition allowing to retrieve the associated BOM key type. */
- typedef LegCabinKey<BOM_CONTENT> BomKey_T;
+ typedef LegCabinKey_T BomKey_T;
/** Definition allowing to retrieve the associated parent
BOM structure type. */
Modified: trunk/stdair/stdair/bom/LegCabinTypes.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabinTypes.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/LegCabinTypes.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -13,15 +13,11 @@
// Forward declarations.
template <typename BOM_CONTENT> class LegCabinStructure;
- template <typename BOM_CONTENT> class LegCabinKey;
class LegCabin;
/** Define the LegCabin structure. */
typedef LegCabinStructure<LegCabin> LegCabinStructure_T;
- /** Define the LegCabin key. */
- typedef LegCabinKey<LegCabin> LegCabinKey_T;
-
/** Define the leg-cabin structure list. */
typedef std::vector<LegCabinStructure_T*> LegCabinStructureList_T;
Modified: trunk/stdair/stdair/bom/LegDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegDate.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/LegDate.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -14,6 +14,7 @@
// Forward declarations
class FacBomContent;
class FlightDate;
+ struct LegDateKey_T;
struct LegCabinList_T;
struct LegCabinMap_T;
Added: trunk/stdair/stdair/bom/LegDateKey.cpp
===================================================================
--- trunk/stdair/stdair/bom/LegDateKey.cpp (rev 0)
+++ trunk/stdair/stdair/bom/LegDateKey.cpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -0,0 +1,34 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/LegDateKey.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ LegDateKey_T::LegDateKey_T (const AirportCode_T& iBoardPoint)
+ : _boardPoint (iBoardPoint) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ LegDateKey_T::~LegDateKey_T () {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ void LegDateKey_T::toStream (std::ostream& ioOut) const {
+ ioOut << "LegDateKey: " << toString() << std::endl;
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ void LegDateKey_T::fromStream (std::istream& ioIn) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ std::string LegDateKey_T::toString() const {
+ std::ostringstream oStr;
+ oStr << _boardPoint;
+ return oStr.str();
+ }
+
+}
Modified: trunk/stdair/stdair/bom/LegDateKey.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegDateKey.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/LegDateKey.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -9,30 +9,16 @@
#include <stdair/bom/BomKey.hpp>
namespace stdair {
-
- // Forward declarations
- template <typename BOM_CONTENT>
- class LegDateStructure;
-
/** Key of leg-date. */
- template <typename BOM_CONTENT>
- class LegDateKey : public BomKey {
- friend class FacBomStructure;
- friend class FacBomContent;
-
- private:
- // Type definitions
- /** Definition allowing to retrieve the associated BOM structure type. */
- typedef LegDateStructure<BOM_CONTENT> BomStructure_T;
+ struct LegDateKey_T : public BomKey_T {
public:
// /////////// Construction ///////////
/** Constructor. */
- LegDateKey (const AirportCode_T& iBoardPoint) : _boardPoint (iBoardPoint) {
- }
+ LegDateKey_T (const AirportCode_T& iBoardPoint);
/** Destructor. */
- ~LegDateKey () { }
+ ~LegDateKey_T ();
// /////////// Getters //////////
/** Get the boarding point. */
@@ -43,24 +29,18 @@
// /////////// Display support methods /////////
/** Dump a Business Object Key into an output stream.
@param ostream& the output stream. */
- void toStream (std::ostream& ioOut) const {
- ioOut << "LegDateKey: " << toString() << std::endl;
- }
+ void toStream (std::ostream& ioOut) const;
/** Read a Business Object Key from an input stream.
@param istream& the input stream. */
- void fromStream (std::istream& ioIn) { }
+ void fromStream (std::istream& ioIn);
/** Get the serialised version of the Business Object Key.
<br>That string is unique, at the level of a given Business Object,
when among children of a given parent Business Object.
<br>For instance, "H" and "K" allow to differentiate among two
marketing classes for the same leg-date. */
- std::string toString() const {
- std::ostringstream oStr;
- oStr << _boardPoint;
- return oStr.str();
- }
+ std::string toString() const;
private:
// Attributes
Modified: trunk/stdair/stdair/bom/LegDateStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegDateStructure.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/LegDateStructure.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -28,7 +28,7 @@
typedef BOM_CONTENT Content_T;
/** Definition allowing to retrieve the associated BOM key type. */
- typedef LegDateKey<BOM_CONTENT> BomKey_T;
+ typedef LegDateKey_T BomKey_T;
/** Definition allowing to retrieve the associated parent
BOM structure type. */
Modified: trunk/stdair/stdair/bom/LegDateTypes.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegDateTypes.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/LegDateTypes.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -13,15 +13,11 @@
// Forward declarations.
template <typename BOM_CONTENT> class LegDateStructure;
- template <typename BOM_CONTENT> class LegDateKey;
class LegDate;
/** Define the LegDate structure. */
typedef LegDateStructure<LegDate> LegDateStructure_T;
- /** Define the LegDate key. */
- typedef LegDateKey<LegDate> LegDateKey_T;
-
/** Define the leg-date structure list. */
typedef std::vector<LegDateStructure_T*> LegDateStructureList_T;
Modified: trunk/stdair/stdair/bom/SegmentCabin.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -14,6 +14,7 @@
// Forward declarations
class FacBomContent;
class SegmentDate;
+ struct SegmentCabinKey_T;
struct BookingClassList_T;
struct BookingClassMap_T;
Added: trunk/stdair/stdair/bom/SegmentCabinKey.cpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabinKey.cpp (rev 0)
+++ trunk/stdair/stdair/bom/SegmentCabinKey.cpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -0,0 +1,34 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/SegmentCabinKey.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ SegmentCabinKey_T::SegmentCabinKey_T (const CabinCode_T& iCabinCode)
+ : _cabinCode (iCabinCode) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ SegmentCabinKey_T::~SegmentCabinKey_T () {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ void SegmentCabinKey_T::toStream (std::ostream& ioOut) const {
+ ioOut << "SegmentCabinKey: " << toString() << std::endl;
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ void SegmentCabinKey_T::fromStream (std::istream& ioIn) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ std::string SegmentCabinKey_T::toString() const {
+ std::ostringstream oStr;
+ oStr << _cabinCode;
+ return oStr.str();
+ }
+
+}
Modified: trunk/stdair/stdair/bom/SegmentCabinKey.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabinKey.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/SegmentCabinKey.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -9,31 +9,16 @@
#include <stdair/bom/BomKey.hpp>
namespace stdair {
-
- // Forward declarations
- template <typename BOM_CONTENT>
- class SegmentCabinStructure;
-
/** Key of segment-cabin. */
- template <typename BOM_CONTENT>
- class SegmentCabinKey : public BomKey {
- friend class FacBomStructure;
- friend class FacBomContent;
-
- private:
- // Type definitions
- /** Definition allowing to retrieve the associated BOM structure type. */
- typedef SegmentCabinStructure<BOM_CONTENT> BomStructure_T;
+ struct SegmentCabinKey_T : public BomKey_T {
public:
// /////////// Construction ///////////
/** Constructor. */
- SegmentCabinKey (const CabinCode_T& iCabinCode)
- : _cabinCode (iCabinCode) {
- }
+ SegmentCabinKey_T (const CabinCode_T& iCabinCode);
/** Destructor. */
- ~SegmentCabinKey () { }
+ ~SegmentCabinKey_T ();
// /////////// Getters //////////
/** Get the cabin code. */
@@ -44,25 +29,18 @@
// /////////// Display support methods /////////
/** Dump a Business Object Key into an output stream.
@param ostream& the output stream. */
- void toStream (std::ostream& ioOut) const {
- ioOut << "SegmentCabinKey: " << toString() << std::endl;
- }
+ void toStream (std::ostream& ioOut) const;
/** Read a Business Object Key from an input stream.
@param istream& the input stream. */
- void fromStream (std::istream& ioIn) { }
+ void fromStream (std::istream& ioIn);
/** Get the serialised version of the Business Object Key.
<br>That string is unique, at the level of a given Business Object,
when among children of a given parent Business Object.
<br>For instance, "H" and "K" allow to differentiate among two
marketing classes for the same segment-cabin. */
- std::string toString() const {
- std::ostringstream oStr;
- oStr << _cabinCode;
- return oStr.str();
- }
-
+ std::string toString() const;
private:
// Attributes
Modified: trunk/stdair/stdair/bom/SegmentCabinStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabinStructure.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/SegmentCabinStructure.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -28,7 +28,7 @@
typedef BOM_CONTENT Content_T;
/** Definition allowing to retrieve the associated BOM key type. */
- typedef SegmentCabinKey<BOM_CONTENT> BomKey_T;
+ typedef SegmentCabinKey_T BomKey_T;
/** Definition allowing to retrieve the associated parent
BOM structure type. */
Modified: trunk/stdair/stdair/bom/SegmentCabinTypes.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabinTypes.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/SegmentCabinTypes.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -13,15 +13,11 @@
// Forward declarations.
template <typename BOM_CONTENT> class SegmentCabinStructure;
- template <typename BOM_CONTENT> class SegmentCabinKey;
class SegmentCabin;
/** Define the SegmentCabin structure. */
typedef SegmentCabinStructure<SegmentCabin> SegmentCabinStructure_T;
- /** Define the SegmentCabin key. */
- typedef SegmentCabinKey<SegmentCabin> SegmentCabinKey_T;
-
/** Define the segment-cabin structure list. */
typedef std::vector<SegmentCabinStructure_T*> SegmentCabinStructureList_T;
Modified: trunk/stdair/stdair/bom/SegmentDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -14,6 +14,7 @@
// Forward declarations
class FacBomContent;
class FlightDate;
+ struct SegmentDateKey_T;
struct SegmentCabinList_T;
struct SegmentCabinMap_T;
Added: trunk/stdair/stdair/bom/SegmentDateKey.cpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDateKey.cpp (rev 0)
+++ trunk/stdair/stdair/bom/SegmentDateKey.cpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -0,0 +1,35 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/SegmentDateKey.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ SegmentDateKey_T::SegmentDateKey_T (const AirportCode_T& iBoardPoint,
+ const AirportCode_T& iOffPoint)
+ : _boardPoint (iBoardPoint), _offPoint (iOffPoint) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ SegmentDateKey_T::~SegmentDateKey_T () {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ void SegmentDateKey_T::toStream (std::ostream& ioOut) const {
+ ioOut << "SegmentDateKey: " << toString() << std::endl;
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ void SegmentDateKey_T::fromStream (std::istream& ioIn) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ std::string SegmentDateKey_T::toString() const {
+ std::ostringstream oStr;
+ oStr << _boardPoint << "-" << _offPoint;
+ return oStr.str();
+ }
+
+}
Modified: trunk/stdair/stdair/bom/SegmentDateKey.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDateKey.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/SegmentDateKey.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -9,32 +9,16 @@
#include <stdair/bom/BomKey.hpp>
namespace stdair {
-
- // Forward declarations
- template <typename BOM_CONTENT>
- class SegmentDateStructure;
-
/** Key of segment-date. */
- template <typename BOM_CONTENT>
- class SegmentDateKey : public BomKey {
- friend class FacBomStructure;
- friend class FacBomContent;
-
- private:
- // Type definitions
- /** Definition allowing to retrieve the associated BOM structure type. */
- typedef SegmentDateStructure<BOM_CONTENT> BomStructure_T;
+ struct SegmentDateKey_T : public BomKey_T {
public:
// /////////// Construction ///////////
/** Constructor. */
- SegmentDateKey (const AirportCode_T& iBoardPoint,
- const AirportCode_T& iOffPoint)
- : _boardPoint (iBoardPoint), _offPoint (iOffPoint) {
- }
+ SegmentDateKey_T (const AirportCode_T&, const AirportCode_T&);
/** Destructor. */
- ~SegmentDateKey () { }
+ ~SegmentDateKey_T ();
// /////////// Getters //////////
/** Get the boarding point. */
@@ -50,25 +34,18 @@
// /////////// Display support methods /////////
/** Dump a Business Object Key into an output stream.
@param ostream& the output stream. */
- void toStream (std::ostream& ioOut) const {
- ioOut << "SegmentDateKey: " << toString() << std::endl;
- }
+ void toStream (std::ostream& ioOut) const;
/** Read a Business Object Key from an input stream.
@param istream& the input stream. */
- void fromStream (std::istream& ioIn) { }
+ void fromStream (std::istream& ioIn);
/** Get the serialised version of the Business Object Key.
<br>That string is unique, at the level of a given Business Object,
when among children of a given parent Business Object.
<br>For instance, "H" and "K" allow to differentiate among two
marketing classes for the same segment-date. */
- std::string toString() const {
- std::ostringstream oStr;
- oStr << _boardPoint << "-" << _offPoint;
- return oStr.str();
- }
-
+ std::string toString() const;
private:
// Attributes
Modified: trunk/stdair/stdair/bom/SegmentDateStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDateStructure.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/SegmentDateStructure.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -28,7 +28,7 @@
typedef BOM_CONTENT Content_T;
/** Definition allowing to retrieve the associated BOM key type. */
- typedef SegmentDateKey<BOM_CONTENT> BomKey_T;
+ typedef SegmentDateKey_T BomKey_T;
/** Definition allowing to retrieve the associated parent
BOM structure type. */
Modified: trunk/stdair/stdair/bom/SegmentDateTypes.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDateTypes.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/SegmentDateTypes.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -13,15 +13,11 @@
// Forward declarations.
template <typename BOM_CONTENT> class SegmentDateStructure;
- template <typename BOM_CONTENT> class SegmentDateKey;
class SegmentDate;
/** Define the SegmentDate structure. */
typedef SegmentDateStructure<SegmentDate> SegmentDateStructure_T;
- /** Define the SegmentDate key. */
- typedef SegmentDateKey<SegmentDate> SegmentDateKey_T;
-
/** Define the segment-date structure list. */
typedef std::vector<SegmentDateStructure_T*> SegmentDateStructureList_T;
Modified: trunk/stdair/stdair/bom/sources.mk
===================================================================
--- trunk/stdair/stdair/bom/sources.mk 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/bom/sources.mk 2009-10-20 14:04:45 UTC (rev 51)
@@ -61,6 +61,13 @@
$(top_srcdir)/stdair/bom/BomChildrenHolderImp.hpp \
$(top_srcdir)/stdair/bom/BomIterator.hpp
bom_cc_sources = \
+ $(top_srcdir)/stdair/bom/BomRootKey.cpp \
+ $(top_srcdir)/stdair/bom/InventoryKey.cpp \
+ $(top_srcdir)/stdair/bom/FlightDateKey.cpp \
+ $(top_srcdir)/stdair/bom/LegDateKey.cpp \
+ $(top_srcdir)/stdair/bom/SegmentDateKey.cpp \
+ $(top_srcdir)/stdair/bom/SegmentCabinKey.cpp \
+ $(top_srcdir)/stdair/bom/BookingClassKey.cpp \
$(top_srcdir)/stdair/bom/BomRoot.cpp \
$(top_srcdir)/stdair/bom/BomRootContent.cpp \
$(top_srcdir)/stdair/bom/Inventory.cpp \
Modified: trunk/stdair/stdair/factory/FacBomContent.hpp
===================================================================
--- trunk/stdair/stdair/factory/FacBomContent.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/factory/FacBomContent.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -89,7 +89,7 @@
typedef typename BOM_CONTENT::BomStructure_T BOM_STRUCTURE_T;
BOM_STRUCTURE_T& lBomStructure =
FacBomStructure::instance().
- create<typename BOM_CONTENT::BomKey_T> (iKey);
+ create<typename BOM_CONTENT::BomKey_T, BOM_STRUCTURE_T> (iKey);
// The created flight-date content (BomContent) object gets a constant
// reference on its corresponding flight-date structure/holder object
Modified: trunk/stdair/stdair/factory/FacBomStructure.hpp
===================================================================
--- trunk/stdair/stdair/factory/FacBomStructure.hpp 2009-10-20 09:41:29 UTC (rev 50)
+++ trunk/stdair/stdair/factory/FacBomStructure.hpp 2009-10-20 14:04:45 UTC (rev 51)
@@ -51,18 +51,15 @@
static FacBomStructure& instance();
/** Create a structure object with the given key. */
- template <typename BOM_KEY>
- typename BOM_KEY::BomStructure_T& create (const BOM_KEY& iKey) {
- // Type for the BOM structure.
- typedef typename BOM_KEY::BomStructure_T BOM_STRUCTURE_T;
+ template <typename BOM_KEY, typename BOM_STRUCTURE>
+ BOM_STRUCTURE& create (const BOM_KEY& iKey) {
+ BOM_STRUCTURE* aBomStructure_ptr = NULL;
- BOM_STRUCTURE_T* aBomStructure_ptr = NULL;
-
- aBomStructure_ptr = new BOM_STRUCTURE_T (iKey);
+ aBomStructure_ptr = new BOM_STRUCTURE (iKey);
assert (aBomStructure_ptr != NULL);
// Initialise the children list of the BOM structure.
- initChildrenList<BOM_STRUCTURE_T> (*aBomStructure_ptr);
+ initChildrenList<BOM_STRUCTURE> (*aBomStructure_ptr);
// The new object is added to the pool of structure objects
_structurePool.push_back (aBomStructure_ptr);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qua...@us...> - 2009-10-20 09:41:42
|
Revision: 50
http://stdair.svn.sourceforge.net/stdair/?rev=50&view=rev
Author: quannaus
Date: 2009-10-20 09:41:29 +0000 (Tue, 20 Oct 2009)
Log Message:
-----------
[Dev] Changed includes.
Modified Paths:
--------------
trunk/stdair/stdair/bom/BomRootStructure.hpp
trunk/stdair/stdair/bom/BookingClassStructure.hpp
trunk/stdair/stdair/bom/FlightDateStructure.hpp
trunk/stdair/stdair/bom/InventoryStructure.hpp
trunk/stdair/stdair/bom/LegCabinStructure.hpp
trunk/stdair/stdair/bom/LegDateStructure.hpp
trunk/stdair/stdair/bom/SegmentCabinStructure.hpp
trunk/stdair/stdair/bom/SegmentDateStructure.hpp
Modified: trunk/stdair/stdair/bom/BomRootStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomRootStructure.hpp 2009-10-19 09:43:20 UTC (rev 49)
+++ trunk/stdair/stdair/bom/BomRootStructure.hpp 2009-10-20 09:41:29 UTC (rev 50)
@@ -9,16 +9,12 @@
// MPL
#include <boost/mpl/vector.hpp>
// STDAIR
-#include <stdair/bom/BomStructure.hpp>
+#include <stdair/bom/BomStructureDummy.hpp>
+#include <stdair/bom/BomContentDummy.hpp>
#include <stdair/bom/BomRootKey.hpp>
-#include <stdair/bom/BomChildrenHolderImp.hpp>
#include <stdair/bom/InventoryStructure.hpp>
namespace stdair {
- // Forward declarations.
- class BomStructureDummy;
- class BomContentDummy;
-
/** Wrapper class aimed at holding the actual content, modeled
by a specific BomContentRoot class. */
template <typename BOM_CONTENT>
Modified: trunk/stdair/stdair/bom/BookingClassStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClassStructure.hpp 2009-10-19 09:43:20 UTC (rev 49)
+++ trunk/stdair/stdair/bom/BookingClassStructure.hpp 2009-10-20 09:41:29 UTC (rev 50)
@@ -6,18 +6,12 @@
// //////////////////////////////////////////////////////////////////////
// MPL
#include <boost/mpl/vector.hpp>
-// STDAIR
-#include <stdair/bom/BomStructure.hpp>
+// STDAIR
+#include <stdair/bom/BomStructureDummy.hpp>
+#include <stdair/bom/BomContentDummy.hpp>
#include <stdair/bom/BookingClassKey.hpp>
-#include <stdair/bom/BomChildrenHolderImp.hpp>
namespace stdair {
-
- // Forward declarations
- template <typename BOM_CONTENT> class SegmentCabinStructure;
- class BomStructureDummy;
- class BomContentDummy;
-
/** Wrapper class aimed at holding the actual content, modeled
by an external specific BookingClass class (for instance,
in the AIRSCHED library). */
Modified: trunk/stdair/stdair/bom/FlightDateStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-10-19 09:43:20 UTC (rev 49)
+++ trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-10-20 09:41:29 UTC (rev 50)
@@ -7,17 +7,13 @@
// MPL
#include <boost/mpl/vector.hpp>
// STDAIR
-#include <stdair/bom/BomStructure.hpp>
+#include <stdair/bom/BomStructureDummy.hpp>
+#include <stdair/bom/BomContentDummy.hpp>
#include <stdair/bom/FlightDateKey.hpp>
#include <stdair/bom/SegmentDateStructure.hpp>
#include <stdair/bom/LegDateStructure.hpp>
-#include <stdair/bom/BomChildrenHolderImp.hpp>
namespace stdair {
-
- // Forward declaration
- class BomContentDummy;
-
/** Wrapper class aimed at holding the actual content, modeled
by an external specific FlightDate class (for instance,
in the AIRSCHED library). */
Modified: trunk/stdair/stdair/bom/InventoryStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-10-19 09:43:20 UTC (rev 49)
+++ trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-10-20 09:41:29 UTC (rev 50)
@@ -9,17 +9,12 @@
// (Boost) MPL
#include <boost/mpl/vector.hpp>
// STDAIR
-#include <stdair/bom/BomStructure.hpp>
+#include <stdair/bom/BomStructureDummy.hpp>
+#include <stdair/bom/BomContentDummy.hpp>
#include <stdair/bom/InventoryKey.hpp>
-#include <stdair/bom/BomChildrenHolderImp.hpp>
#include <stdair/bom/FlightDateStructure.hpp>
namespace stdair {
-
- // Forward declaration
- class BomStructureDummy;
- class BomContentDummy;
-
/** Wrapper class aimed at holding the actual content, modeled
by an external specific Inventory class (for instance,
in the AIRSCHED library). */
Modified: trunk/stdair/stdair/bom/LegCabinStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabinStructure.hpp 2009-10-19 09:43:20 UTC (rev 49)
+++ trunk/stdair/stdair/bom/LegCabinStructure.hpp 2009-10-20 09:41:29 UTC (rev 50)
@@ -7,18 +7,12 @@
// MPL
#include <boost/mpl/vector.hpp>
// STDAIR
-#include <stdair/bom/BomStructure.hpp>
+#include <stdair/bom/BomStructureDummy.hpp>
+#include <stdair/bom/BomContentDummy.hpp>
#include <stdair/bom/LegCabinKey.hpp>
#include <stdair/bom/BookingClassStructure.hpp>
-#include <stdair/bom/BomChildrenHolderImp.hpp>
namespace stdair {
-
- // Forward declarations
- template <typename BOM_CONTENT> class LegDateStructure;
- class BomStructureDummy;
- class BomContentDummy;
-
/** Wrapper class aimed at holding the actual content, modeled
by an external specific LegCabin class (for instance,
in the AIRSCHED library). */
Modified: trunk/stdair/stdair/bom/LegDateStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegDateStructure.hpp 2009-10-19 09:43:20 UTC (rev 49)
+++ trunk/stdair/stdair/bom/LegDateStructure.hpp 2009-10-20 09:41:29 UTC (rev 50)
@@ -7,18 +7,12 @@
// MPL
#include <boost/mpl/vector.hpp>
// STDAIR
-#include <stdair/bom/BomStructure.hpp>
+#include <stdair/bom/BomStructureDummy.hpp>
+#include <stdair/bom/BomContentDummy.hpp>
#include <stdair/bom/LegDateKey.hpp>
#include <stdair/bom/LegCabinStructure.hpp>
-#include <stdair/bom/BomChildrenHolderImp.hpp>
-namespace stdair {
-
- // Forward declarations
- template <typename BOM_CONTENT> class FlightDateStructure;
- class BomStructureDummy;
- class BomContentDummy;
-
+namespace stdair {
/** Wrapper class aimed at holding the actual content, modeled
by an external specific LegDate class (for instance,
in the AIRSCHED library). */
Modified: trunk/stdair/stdair/bom/SegmentCabinStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabinStructure.hpp 2009-10-19 09:43:20 UTC (rev 49)
+++ trunk/stdair/stdair/bom/SegmentCabinStructure.hpp 2009-10-20 09:41:29 UTC (rev 50)
@@ -7,18 +7,12 @@
// MPL
#include <boost/mpl/vector.hpp>
// STDAIR
-#include <stdair/bom/BomStructure.hpp>
+#include <stdair/bom/BomStructureDummy.hpp>
+#include <stdair/bom/BomContentDummy.hpp>
#include <stdair/bom/SegmentCabinKey.hpp>
#include <stdair/bom/BookingClassStructure.hpp>
-#include <stdair/bom/BomChildrenHolderImp.hpp>
namespace stdair {
-
- // Forward declarations
- template <typename BOM_CONTENT> class SegmentDateStructure;
- class BomStructureDummy;
- class BomContentDummy;
-
/** Wrapper class aimed at holding the actual content, modeled
by an external specific SegmentCabin class (for instance,
in the AIRSCHED library). */
Modified: trunk/stdair/stdair/bom/SegmentDateStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDateStructure.hpp 2009-10-19 09:43:20 UTC (rev 49)
+++ trunk/stdair/stdair/bom/SegmentDateStructure.hpp 2009-10-20 09:41:29 UTC (rev 50)
@@ -7,18 +7,12 @@
// MPL
#include <boost/mpl/vector.hpp>
// STDAIR
-#include <stdair/bom/BomStructure.hpp>
+#include <stdair/bom/BomStructureDummy.hpp>
+#include <stdair/bom/BomContentDummy.hpp>
#include <stdair/bom/SegmentDateKey.hpp>
#include <stdair/bom/SegmentCabinStructure.hpp>
-#include <stdair/bom/BomChildrenHolderImp.hpp>
namespace stdair {
-
- // Forward declarations
- template <typename BOM_CONTENT> class FlightDateStructure;
- class BomStructureDummy;
- class BomContentDummy;
-
/** Wrapper class aimed at holding the actual content, modeled
by an external specific SegmentDate class (for instance,
in the AIRSCHED library). */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qua...@us...> - 2009-10-19 09:43:29
|
Revision: 49
http://stdair.svn.sourceforge.net/stdair/?rev=49&view=rev
Author: quannaus
Date: 2009-10-19 09:43:20 +0000 (Mon, 19 Oct 2009)
Log Message:
-----------
[Dev] Added some includes.
Modified Paths:
--------------
trunk/stdair/stdair/bom/BomRoot.hpp
trunk/stdair/stdair/bom/BookingClass.hpp
trunk/stdair/stdair/bom/FlightDate.cpp
trunk/stdair/stdair/bom/FlightDate.hpp
trunk/stdair/stdair/bom/Inventory.hpp
trunk/stdair/stdair/bom/InventoryTypes.hpp
trunk/stdair/stdair/bom/LegCabin.hpp
trunk/stdair/stdair/bom/LegDate.hpp
trunk/stdair/stdair/bom/SegmentCabin.hpp
trunk/stdair/stdair/bom/SegmentDate.hpp
Modified: trunk/stdair/stdair/bom/BomRoot.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomRoot.hpp 2009-10-19 08:50:43 UTC (rev 48)
+++ trunk/stdair/stdair/bom/BomRoot.hpp 2009-10-19 09:43:20 UTC (rev 49)
@@ -5,6 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
+#include <stdair/bom/BomStructure.hpp>
#include <stdair/bom/BomRootContent.hpp>
#include <stdair/bom/BomRootTypes.hpp>
#include <stdair/bom/InventoryTypes.hpp>
@@ -12,7 +13,6 @@
namespace stdair {
// Forward declarations.
class FacBomContent;
- class Inventory;
struct InventoryList_T;
struct InventoryMap_T;
Modified: trunk/stdair/stdair/bom/BookingClass.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-19 08:50:43 UTC (rev 48)
+++ trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-19 09:43:20 UTC (rev 49)
@@ -5,6 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
+#include <stdair/bom/BomStructure.hpp>
#include <stdair/bom/BookingClassContent.hpp>
#include <stdair/bom/SegmentCabinTypes.hpp>
#include <stdair/bom/BookingClassTypes.hpp>
Modified: trunk/stdair/stdair/bom/FlightDate.cpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDate.cpp 2009-10-19 08:50:43 UTC (rev 48)
+++ trunk/stdair/stdair/bom/FlightDate.cpp 2009-10-19 09:43:20 UTC (rev 49)
@@ -8,7 +8,6 @@
#include <algorithm>
// STDAIR
#include <stdair/bom/FlightDateStructure.hpp>
-#include <stdair/bom/BomRoot.hpp>
#include <stdair/bom/Inventory.hpp>
#include <stdair/bom/FlightDate.hpp>
#include <stdair/bom/SegmentDate.hpp>
Modified: trunk/stdair/stdair/bom/FlightDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-19 08:50:43 UTC (rev 48)
+++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-19 09:43:20 UTC (rev 49)
@@ -5,15 +5,15 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
-#include <stdair/bom/FlightDateContent.hpp>
+#include <stdair/bom/BomStructure.hpp>
#include <stdair/bom/FlightDateTypes.hpp>
#include <stdair/bom/SegmentDateTypes.hpp>
#include <stdair/bom/LegDateTypes.hpp>
+#include <stdair/bom/FlightDateContent.hpp>
namespace stdair {
// Forward declarations
class FacBomContent;
- class BomStructure;
class Inventory;
struct SegmentDateList_T;
struct SegmentDateMap_T;
Modified: trunk/stdair/stdair/bom/Inventory.hpp
===================================================================
--- trunk/stdair/stdair/bom/Inventory.hpp 2009-10-19 08:50:43 UTC (rev 48)
+++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-19 09:43:20 UTC (rev 49)
@@ -5,17 +5,15 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
-#include <stdair/bom/BomRootTypes.hpp>
+#include <stdair/bom/BomStructure.hpp>
#include <stdair/bom/InventoryTypes.hpp>
#include <stdair/bom/FlightDateTypes.hpp>
#include <stdair/bom/InventoryContent.hpp>
namespace stdair {
-
// Forward declarations
class FacBomContent;
class BomRoot;
- class FlightDate;
struct FlightDateList_T;
struct FlightDateMap_T;
Modified: trunk/stdair/stdair/bom/InventoryTypes.hpp
===================================================================
--- trunk/stdair/stdair/bom/InventoryTypes.hpp 2009-10-19 08:50:43 UTC (rev 48)
+++ trunk/stdair/stdair/bom/InventoryTypes.hpp 2009-10-19 09:43:20 UTC (rev 49)
@@ -6,8 +6,8 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STL
+#include <map>
#include <vector>
-#include <map>
namespace stdair {
@@ -22,10 +22,10 @@
/** Define the Inventory key. */
typedef InventoryKey<Inventory> InventoryKey_T;
- /** Define the flight-date structure list. */
+ /** Define the Inventory structure list. */
typedef std::vector<InventoryStructure_T*> InventoryStructureList_T;
- /** Define the flight-date structure map. */
+ /** Define the Inventory structure map. */
typedef std::map<const std::string, InventoryStructure_T*> InventoryStructureMap_T;
}
Modified: trunk/stdair/stdair/bom/LegCabin.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-19 08:50:43 UTC (rev 48)
+++ trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-19 09:43:20 UTC (rev 49)
@@ -5,6 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
+#include <stdair/bom/BomStructure.hpp>
#include <stdair/bom/LegCabinContent.hpp>
#include <stdair/bom/LegCabinTypes.hpp>
Modified: trunk/stdair/stdair/bom/LegDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegDate.hpp 2009-10-19 08:50:43 UTC (rev 48)
+++ trunk/stdair/stdair/bom/LegDate.hpp 2009-10-19 09:43:20 UTC (rev 49)
@@ -5,6 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
+#include <stdair/bom/BomStructure.hpp>
#include <stdair/bom/LegDateContent.hpp>
#include <stdair/bom/LegDateTypes.hpp>
#include <stdair/bom/LegCabinTypes.hpp>
Modified: trunk/stdair/stdair/bom/SegmentCabin.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-19 08:50:43 UTC (rev 48)
+++ trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-19 09:43:20 UTC (rev 49)
@@ -5,6 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
+#include <stdair/bom/BomStructure.hpp>
#include <stdair/bom/SegmentCabinContent.hpp>
#include <stdair/bom/SegmentCabinTypes.hpp>
#include <stdair/bom/BookingClassTypes.hpp>
Modified: trunk/stdair/stdair/bom/SegmentDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-19 08:50:43 UTC (rev 48)
+++ trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-19 09:43:20 UTC (rev 49)
@@ -5,9 +5,10 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
-#include <stdair/bom/SegmentDateContent.hpp>
+#include <stdair/bom/BomStructure.hpp>
#include <stdair/bom/SegmentDateTypes.hpp>
#include <stdair/bom/SegmentCabinTypes.hpp>
+#include <stdair/bom/SegmentDateContent.hpp>
namespace stdair {
// Forward declarations
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qua...@us...> - 2009-10-19 08:50:50
|
Revision: 48
http://stdair.svn.sourceforge.net/stdair/?rev=48&view=rev
Author: quannaus
Date: 2009-10-19 08:50:43 +0000 (Mon, 19 Oct 2009)
Log Message:
-----------
[Dev] Changed constructors from private to protected.
Modified Paths:
--------------
trunk/stdair/stdair/bom/BomRoot.hpp
trunk/stdair/stdair/bom/BookingClass.hpp
trunk/stdair/stdair/bom/FlightDate.hpp
trunk/stdair/stdair/bom/Inventory.hpp
trunk/stdair/stdair/bom/LegCabin.hpp
trunk/stdair/stdair/bom/LegDate.hpp
trunk/stdair/stdair/bom/SegmentCabin.hpp
trunk/stdair/stdair/bom/SegmentDate.hpp
Modified: trunk/stdair/stdair/bom/BomRoot.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomRoot.hpp 2009-10-15 15:11:19 UTC (rev 47)
+++ trunk/stdair/stdair/bom/BomRoot.hpp 2009-10-19 08:50:43 UTC (rev 48)
@@ -109,7 +109,7 @@
return _bomRootStructure;
}
- private:
+ protected:
/** Constructors are private so as to force the usage of the Factory
layer. */
/** Default constructors. */
Modified: trunk/stdair/stdair/bom/BookingClass.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-15 15:11:19 UTC (rev 47)
+++ trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-19 08:50:43 UTC (rev 48)
@@ -64,7 +64,7 @@
return _bookingClassStructure;
}
- private:
+ protected:
/** Constructors are private so as to force the usage of the Factory
layer. */
/** Default constructors. */
Modified: trunk/stdair/stdair/bom/FlightDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-15 15:11:19 UTC (rev 47)
+++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-19 08:50:43 UTC (rev 48)
@@ -90,7 +90,7 @@
return _flightDateStructure;
}
- private:
+ protected:
/** Constructors are private so as to force the usage of the Factory
layer. */
/** Default constructors. */
Modified: trunk/stdair/stdair/bom/Inventory.hpp
===================================================================
--- trunk/stdair/stdair/bom/Inventory.hpp 2009-10-15 15:11:19 UTC (rev 47)
+++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-19 08:50:43 UTC (rev 48)
@@ -79,7 +79,7 @@
return _inventoryStructure;
}
- private:
+ protected:
/** Constructors are private so as to force the usage of the Factory
layer. */
/** Default constructors. */
Modified: trunk/stdair/stdair/bom/LegCabin.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-15 15:11:19 UTC (rev 47)
+++ trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-19 08:50:43 UTC (rev 48)
@@ -57,7 +57,7 @@
return _legCabinStructure;
}
- private:
+ protected:
/** Constructors are private so as to force the usage of the Factory
layer. */
/** Default constructors. */
Modified: trunk/stdair/stdair/bom/LegDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegDate.hpp 2009-10-15 15:11:19 UTC (rev 47)
+++ trunk/stdair/stdair/bom/LegDate.hpp 2009-10-19 08:50:43 UTC (rev 48)
@@ -72,7 +72,7 @@
return _legDateStructure;
}
- private:
+ protected:
/** Constructors are private so as to force the usage of the Factory
layer. */
/** Default constructors. */
Modified: trunk/stdair/stdair/bom/SegmentCabin.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-15 15:11:19 UTC (rev 47)
+++ trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-19 08:50:43 UTC (rev 48)
@@ -72,7 +72,7 @@
return _segmentCabinStructure;
}
- private:
+ protected:
/** Constructors are private so as to force the usage of the Factory
layer. */
/** Default constructors. */
Modified: trunk/stdair/stdair/bom/SegmentDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-15 15:11:19 UTC (rev 47)
+++ trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-19 08:50:43 UTC (rev 48)
@@ -72,7 +72,7 @@
return _segmentDateStructure;
}
- private:
+ protected:
/** Constructors are private so as to force the usage of the Factory
layer. */
/** Default constructors. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qua...@us...> - 2009-10-15 15:11:33
|
Revision: 47
http://stdair.svn.sourceforge.net/stdair/?rev=47&view=rev
Author: quannaus
Date: 2009-10-15 15:11:19 +0000 (Thu, 15 Oct 2009)
Log Message:
-----------
[Dev] Transformed BomRoot from a template class to a normal class.
Modified Paths:
--------------
trunk/stdair/stdair/STDAIR_Types.hpp
trunk/stdair/stdair/basic/BasTypes.hpp
trunk/stdair/stdair/bom/BomRootTypes.hpp
trunk/stdair/stdair/bom/BomStructureDummy.hpp
trunk/stdair/stdair/bom/BookingClass.hpp
trunk/stdair/stdair/bom/BookingClassStructure.hpp
trunk/stdair/stdair/bom/FlightDate.cpp
trunk/stdair/stdair/bom/FlightDate.hpp
trunk/stdair/stdair/bom/FlightDateStructure.hpp
trunk/stdair/stdair/bom/Inventory.cpp
trunk/stdair/stdair/bom/Inventory.hpp
trunk/stdair/stdair/bom/InventoryContent.hpp
trunk/stdair/stdair/bom/InventoryStructure.hpp
trunk/stdair/stdair/bom/LegCabin.hpp
trunk/stdair/stdair/bom/LegCabinStructure.hpp
trunk/stdair/stdair/bom/LegDate.hpp
trunk/stdair/stdair/bom/LegDateStructure.hpp
trunk/stdair/stdair/bom/SegmentCabin.hpp
trunk/stdair/stdair/bom/SegmentCabinStructure.hpp
trunk/stdair/stdair/bom/SegmentDate.hpp
trunk/stdair/stdair/bom/SegmentDateStructure.hpp
trunk/stdair/stdair/bom/sources.mk
trunk/stdair/stdair/factory/FacBomContent.cpp
trunk/stdair/stdair/factory/FacBomContent.hpp
trunk/stdair/stdair/factory/FacBomStructure.hpp
Added Paths:
-----------
trunk/stdair/stdair/bom/BomRoot.cpp
trunk/stdair/stdair/bom/BomRoot.hpp
trunk/stdair/stdair/bom/BomRootContent.cpp
trunk/stdair/stdair/bom/BomRootContent.hpp
trunk/stdair/stdair/bom/BomRootKey.hpp
trunk/stdair/stdair/bom/BomRootStructure.hpp
Removed Paths:
-------------
trunk/stdair/stdair/bom/BomContentRoot.hpp
trunk/stdair/stdair/bom/BomStructureRoot.hpp
trunk/stdair/stdair/bom/BomStructureRootKey.hpp
Modified: trunk/stdair/stdair/STDAIR_Types.hpp
===================================================================
--- trunk/stdair/stdair/STDAIR_Types.hpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/STDAIR_Types.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -11,6 +11,7 @@
// Boost (Extended STL)
#include <boost/date_time/gregorian/gregorian.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
+#include <boost/tuple/tuple.hpp>
namespace stdair {
@@ -48,18 +49,6 @@
}
// //////// Type definitions /////////
- /** Define the type for airline codes. */
- typedef std::string AirlineCode_T;
-
- /** Define the type for flight numbers. */
- typedef unsigned int FlightNumber_T;
-
- /** Define the type for cabin codes. */
- typedef std::string CabinCode_T;
-
- /** Define the type for class codes. */
- typedef std::string ClassCode_T;
-
/** Define the type for durations (e.g., elapsed in-flight time). */
typedef boost::posix_time::time_duration Duration_T;
@@ -68,6 +57,291 @@
/** Define the type for airport codes. */
typedef std::string AirportCode_T;
+
+ /** Define the type for flight numbers. */
+ typedef unsigned short FlightNumber_T;
+
+ /** Define the file address type (e.g. "a_directory/a_filename")*/
+ typedef std::string FileAddress_T;
+
+ /** Define the replication number. */
+ typedef unsigned int ReplicationNumber_T;
+
+ /** Define the seed type of an Exponential function. */
+ typedef unsigned long int ExponentialSeed_T;
+
+ /** Define the seed type of an Uniform function. */
+ typedef unsigned long int UniformSeed_T;
+
+ /** Define the Airline Code type (2-letter-code, e.g., BA). */
+ typedef std::string AirlineCode_T;
+
+ /** Define the Airport Code type (3-letter-code, e.g., LHR). */
+ typedef std::string AirportCode_T;
+
+ /** Define the Request status for booking (1-letter-code, e.g.,
+ B: booked, C: cancelled, R: Rejected). */
+ typedef std::string RequestStatus_T;
+
+ /** Define the Date (e.g., flight-date departure date). */
+ typedef boost::gregorian::date Date_T;
+
+ /** Define the Duration (e.g., elapsed in-flight time). */
+ typedef boost::posix_time::time_duration Duration_T;
+
+ /** Define an accurate time (date +time). */
+ typedef boost::posix_time::ptime DateTime_T;
+
+ /** Define a distance (kilometers). */
+ typedef long int Distance_T;
+
+ /** Define the Period (e.g., period during which flights depart). */
+ typedef boost::gregorian::date_period DatePeriod_T;
+
+ /** Define the Day-Of-the-Week as a string. */
+ typedef std::string DOW_String_T;
+
+ /** Define the Date Off-Set (e.g., -1 ). */
+ typedef boost::gregorian::date_duration DateOffSet_T;
+
+ /** Define a duration in number of days. */
+ typedef long DayDuration_T;
+
+ /** Define the Saturday stay status of a travel. */
+ typedef bool SaturdayStay_T;
+
+ /** Define the availability option allowing the ticket change. */
+ typedef bool ChangeFees_T;
+
+ /** Define the refundable availability of a tickets. */
+ typedef bool NonRefundable_T;
+
+ /** Define the average ratio (between 0 and 100) of demand with
+ a saturday stay status equal to TRUE. */
+ typedef unsigned int SaturdayStayRatio_T;
+
+ /** Define the average ratio of demand with change fee
+ availability. */
+ typedef unsigned int ChangeFeesRatio_T;
+
+ /** Define the average ratio of demand with non-refundable
+ availability. */
+ typedef unsigned int NonRefundableRatio_T;
+
+ /** Define the passenger characteristics, leisure or business
+ for instance (1-letter-code, e.g., L or B). */
+ typedef std::string PassengerType_T;
+
+ /** Define the identifier of a distribution pattern (e.g., 1). */
+ typedef std::string DistributionPatternId_T;
+
+ /** Define the identifier of a cancellation rate curve (e.g., C1). */
+ typedef std::string CancellationRateCurveId_T;
+
+ /** Define the identifier of an airline preference set list (e.g., AP1). */
+ typedef std::string AirlinePreferenceId_T;
+
+ /** Define a percentage value (between 0 and 100%). */
+ typedef double Percentage_T;
+
+ /** Define a cancellation & and no-show rate pair. */
+ typedef std::pair<Percentage_T, Percentage_T> CancellationNoShowRatePair_T;
+
+ /** Define the identifier of a demand characteristics pattern
+ (e.g. Ch12); for a customer choice model */
+ typedef std::string CharacteristicsPatternId_T;
+
+ /** Define characteristics component index (e.g. W for WTP) */
+ typedef std::string CharacteristicsIndex_T;
+
+ /** Define the cabin code (class of service, e.g., first, business,
+ economy). */
+ typedef std::string CabinCode_T;
+
+ /** Define a price value (e.g., 1000.0 Euros). */
+ typedef double PriceValue_T;
+
+ /** Define a price currency (e.g., EUR for Euros). */
+ typedef std::string PriceCurrency_T;
+
+ /** Define the number of seats required by a demand. */
+ typedef unsigned short NbOfSeats_T;
+
+ /** Define a mean value (e.g., 20.2). */
+ typedef double MeanValue_T;
+
+ /** Define a standard deviation value (e.g., 1.5). */
+ typedef double StandardDeviationValue_T;
+
+ /** Define the cabin capacity (resource, e.g., 200 seats).
+ <br>The capacity is expressed as a double to cope with overbooking. */
+ typedef double CabinCapacity_T;
+
+ /** Define the number of seat which could not be used for the booking. */
+ typedef double BlockSpace_T;
+
+ /** Define the code of the fare family (e.g., 1, 2, 3, etc.). */
+ typedef std::string FamilyCode_T;
+
+ /** Define the booking class code (product segment class, e.g., H,
+ B, K, etc.). */
+ typedef std::string ClassCode_T;
+
+ /** Define the flight path code (code made by a suite of flight numbers). */
+ typedef std::string FlightPathCode_T;
+
+ /** Define an availability. */
+ typedef double Availability_T;
+
+ /** Define an availability. */
+ typedef bool AvailabilityStatus_T;
+
+ /** Define a list of availabilities. */
+ typedef std::vector<Availability_T> BucketAvailabilities_T;
+
+ /** Define a identity number. */
+ typedef unsigned long Identity_T;
+
+ /** Define a map between a BookingID and a TravelSolutionID. */
+ typedef std::map<Identity_T, Identity_T> BookingTSIDMap_T;
+
+ /** Define a number of requests. */
+ typedef double NbOfRequests_T;
+
+ /** Define a number of bookings. */
+ typedef NbOfRequests_T NbOfBookings_T;
+
+ /** Define a number of cancellations (travellers). */
+ typedef NbOfRequests_T NbOfCancellations_T;
+
+ /** Define a number of no-shows. */
+ typedef NbOfRequests_T NbOfNoShows_T;
+
+ /** Define a number of fare rules. */
+ typedef double NbOfFareRules_T;
+
+ /** Define a number of yields. */
+ typedef double NbOfYields_T;
+
+ /** Define a number of InventoryControlRules. */
+ typedef double NbOfInventoryControlRules_T;
+
+ /** Define a number of flight dates. */
+ typedef double NbOfFlightDates_T;
+
+ /** Define a number of commited spaces in a cabin. */
+ typedef double CommitedSpace_T;
+
+ /** Define availibility of booking limit. */
+ typedef bool CensorshipFlag_T;
+
+ /** Define the list of censorship flags (une list per booking
+ class, one censorship flag per DCP). */
+ typedef std::vector<bool> CensorshipFlagList_T;
+
+ /** Define the value of the booking limit. */
+ typedef double BookingLimit_T;
+
+ /** Define the value of the authorization level. */
+ typedef double AuthorizationLevel_T;
+
+ /** Define the rate of overbooking */
+ typedef double OverbookingRate_T;
+
+ /** Define the bookingRatio (for instance OnD bookings
+ over whole class bookings). */
+ typedef double BookingRatio_T;
+
+ /** Define the list of class codes as a string. */
+ typedef std::string ClassList_String_T;
+
+ /** Define a number of segment-dates (in a path). */
+ typedef unsigned short NbOfSegments_T;
+
+ /** Define a number of airlines (in a path). */
+ typedef unsigned short NbOfAirlines_T;
+
+ /** Define the fare of a travel solution. */
+ typedef double Fare_T;
+
+ /** Define the yield of a virtual class. */
+ typedef double Yield_T;
+
+ /** Define the Bid-Price. */
+ typedef double BidPrice_T;
+
+ /** Define a Bid-Price Vector. */
+ typedef std::vector<BidPrice_T> BidPriceVector_T;
+
+ /** Define a number of travel solutions
+ (in a travel solution block). */
+ typedef unsigned short NbOfTravelSolutions_T;
+
+ /** Define a indicator of demand to class matching. */
+ typedef double MatchingIndicator_T;
+
+ /** Define an amount of revenue. */
+ typedef double Revenue_T;
+
+ /** Define the name of an event. */
+ typedef std::string EventName_T;
+
+ /** Define the name of an database connection. */
+ typedef std::string DBConnectionName_T;
+
+ /** Define a number of events. */
+ typedef double NbOfEvents_T;
+
+ /** Frequency of the Data Collection Point description (daily, monthly or
+ detailed). */
+ typedef std::string DCPModeFrequency_T;
+
+ /** Mode of the Data Collection Point description (Forecaster only,
+ Optimizer only or both of them). */
+ typedef std::string DCPMode_T;
+
+ /** Mode of the forecaster. */
+ typedef std::string ForecasterMode_T;
+
+ /** Limit of similar flight-dates used in the forecaster. */
+ typedef short HistoricalDataLimit_T;
+
+ /** Mode of the forecaster. */
+ typedef std::string OptimizerMode_T;
+
+ /** Mode of the forecaster. */
+ typedef std::string DicoOptimizerMode_T;
+
+ /** Mode of inventory control. */
+ typedef std::string ControlMode_T;
+
+ /** Analysis status (true or false). */
+ typedef bool AnalysisStatus_T;
+
+ /** Define the name of a multiplier. */
+ typedef double Multiplier_T;
+
+ /** Define the name of a WTP-component of characteristics pattern. */
+ typedef boost::tuples::tuple<double, double> CharacteristicsWTP_tuple_T;
+
+ /** Define the name of sell-up probability flag for RMS optimizer. */
+ typedef bool SellupFlagForOptimizer_T;
+
+ /** Define the name of sell-up probability for RMS optimizer. */
+ typedef double SellupProbabilityForOptimizer_T;
+
+ /** Define the name of sell-up probability vector for RMS optimizer. */
+ typedef std::vector<SellupProbabilityForOptimizer_T>
+ SellupProbabilityVector_T;
+
+ /** Define the demand for a policy. */
+ typedef NbOfBookings_T PolicyDemand_T;
+
+ /** Define the total revenue of an unconstrained policy. */
+ typedef double PolicyRevenue_T;
+
+ /** Define the total revenue of an unconstrained policy. */
+ typedef double PolicyRevenue_T;
}
#endif // __STDAIR_STDAIR_TYPES_HPP
Modified: trunk/stdair/stdair/basic/BasTypes.hpp
===================================================================
--- trunk/stdair/stdair/basic/BasTypes.hpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/basic/BasTypes.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -12,6 +12,5 @@
/** Key of a STL map. */
typedef std::string MapKey_T;
-
}
#endif // __STDAIR_BAS_BASTYPES_HPP
Deleted: trunk/stdair/stdair/bom/BomContentRoot.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomContentRoot.hpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/bom/BomContentRoot.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -1,122 +0,0 @@
-#ifndef __STDAIR_BOM_BOMCONTENTROOT_HPP
-#define __STDAIR_BOM_BOMCONTENTROOT_HPP
-
-// //////////////////////////////////////////////////////////////////////
-// Import section
-// //////////////////////////////////////////////////////////////////////
-// STDAIR
-#include <stdair/bom/BomContent.hpp>
-
-namespace stdair {
- // Forward declarations.
- template <typename BOM_CONTENT> class BomStructureRoot;
- template <typename BOM_CONTENT> class BomStructureRootKey;
-
- /** Class representing the actual functional/business content
- for the Bom root.
- <br>That class is just an utility tool to mark the root
- of the Bom tree. */
- template <typename BOM_CHILD>
- class BomContentRoot : public BomContent {
- friend class FacBomContent;
-
- // /////////////////////////////////////////////////////////////////////////
- // Type definitions, compulsary for the STDAIR library to work correctly
- // /////////////////////////////////////////////////////////////////////////
- /** The following types must be defined:
- <ul>
- <li>ParentBomContent_T: Type corresponding to the parent BOM
- class within that namespace (e.g., AIRSCHED here)</li>
- <li>BomStructure_T: Type of the corresponding BOM class within
- the stdair namespace</li>
- <li>BomKey_T: Type of the corresponding BOM Key structure within
- the stdair namespace</li>
- <li>ContentChild_T: Type corresponding to the child BOM
- class within that namespace (e.g., AIRSCHED here)</li>
- </ul>
- <br><br>
- Note that the BomContentRoot has no parent. So, there is no need for
- that class to define a ParentBomContent_T type.
- <br><br>
- Note that when there is a second type of children (for instance,
- the FlightDate object contains two types of children, namely LegDate
- and SegmentDate), an additional type definition must be given, namely
- SecondContentChild_T. As, by default, there is a single type of
- children, there is no need to specify "First" in the ContentChild_T
- type.
- */
-
- public:
- // /////////////////////////////////////////////////////////////////////////
- /** Definition allowing to retrieve the associated BOM structure type. */
- typedef BomStructureRoot<BomContentRoot> BomStructure_T;
-
- /** Definition allowing to retrieve the associated BOM key type. */
- typedef BomStructureRootKey<BomContentRoot> BomKey_T;
-
- /** Definition allowing to retrieve the associated
- BOM content child type. */
- typedef BOM_CHILD ContentChild_T;
- // /////////////////////////////////////////////////////////////////////////
-
-
- // /////////////////////////////////////////////////////////////////////////
- // In order to enable STL-iterator-like browsing of children objects,
- // extra type definitions may be specified, such as the ones commented
- // below. Hence, although those type definitions may appear not so simple
- // (some will say "idiomatic"), they allow for a very simple use.
- // /////////////////////////////////////////////////////////////////////////
- /** Define the const iterator on the list of children objects . */
- // typedef stdair::BomIterator_T<BomContent,
- // BomStructureList_T::const_iterator> const_iterator;
- // where BomStructureList_T is defined as std::vector<BomStructure_T*>
- // /////////////////////////////////////////////////////////////////////////
-
-
- public:
- // /////////// Display support methods /////////
- /** Dump a Business Object into an output stream.
- @param ostream& the output stream. */
- void toStream (std::ostream& ioOut) const { ioOut << toString(); }
-
- /** Read a Business Object from an input stream.
- @param istream& the input stream. */
- void fromStream (std::istream& ioIn) { }
-
- /** Get the serialised version of the Business Object. */
- std::string toString() const { return describeKey(); }
-
- /** Get a string describing the whole key (differentiating two objects
- at any level). */
- const std::string describeKey() const { return std::string (""); }
-
- /** Get a string describing the short key (differentiating two objects
- at the same level). */
- const std::string describeShortKey() const { return std::string (""); }
-
- private:
- /** Retrieve the BOM structure object. */
- BomStructure_T& getBomStructure () {
- return _bomStructure;
- }
-
- private:
- /** Constructors are private so as to force the usage of the Factory
- layer. */
- /** Default constructors. */
- BomContentRoot ();
- BomContentRoot (const BomContentRoot&);
- BomContentRoot (BomStructure_T& ioBomStructure)
- : _bomStructure (ioBomStructure) { }
-
- /** Destructor. */
- virtual ~BomContentRoot() { }
-
- private:
- // Attributes
- /** Reference structure. */
- BomStructure_T& _bomStructure;
- };
-
-}
-#endif // __STDAIR_BOM_BOMCONTENTROOT_HPP
Added: trunk/stdair/stdair/bom/BomRoot.cpp
===================================================================
--- trunk/stdair/stdair/bom/BomRoot.cpp (rev 0)
+++ trunk/stdair/stdair/bom/BomRoot.cpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -0,0 +1,39 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STL
+#include <cassert>
+// STDAIR
+#include <stdair/bom/BomRootStructure.hpp>
+#include <stdair/bom/BomRoot.hpp>
+#include <stdair/bom/Inventory.hpp>
+#include <stdair/bom/InventoryList.hpp>
+#include <stdair/bom/InventoryMap.hpp>
+#include <stdair/bom/FlightDate.hpp>
+#include <stdair/bom/SegmentDate.hpp>
+#include <stdair/bom/LegDate.hpp>
+#include <stdair/bom/SegmentCabin.hpp>
+#include <stdair/bom/LegCabin.hpp>
+#include <stdair/bom/BookingClass.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ BomRoot::BomRoot (BomStructure_T& ioBomRootStructure)
+ : _bomRootStructure (ioBomRootStructure) {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ BomRoot::~BomRoot () {
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ InventoryList_T BomRoot::getInventoryList () const {
+ return _bomRootStructure.getChildrenList();
+ }
+
+ // //////////////////////////////////////////////////////////////////////
+ InventoryMap_T BomRoot::getInventoryMap () const {
+ return _bomRootStructure.getChildrenList();
+ }
+}
Copied: trunk/stdair/stdair/bom/BomRoot.hpp (from rev 45, trunk/stdair/stdair/bom/BomContentRoot.hpp)
===================================================================
--- trunk/stdair/stdair/bom/BomRoot.hpp (rev 0)
+++ trunk/stdair/stdair/bom/BomRoot.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -0,0 +1,129 @@
+#ifndef __STDAIR_BOM_BOMROOT_HPP
+#define __STDAIR_BOM_BOMROOT_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/BomRootContent.hpp>
+#include <stdair/bom/BomRootTypes.hpp>
+#include <stdair/bom/InventoryTypes.hpp>
+
+namespace stdair {
+ // Forward declarations.
+ class FacBomContent;
+ class Inventory;
+ struct InventoryList_T;
+ struct InventoryMap_T;
+
+ /** Class representing the actual functional/business content
+ for the Bom root. */
+ class BomRoot : public BomRootContent {
+ friend class FacBomContent;
+
+ // /////////////////////////////////////////////////////////////////////////
+ // Type definitions, compulsary for the STDAIR library to work correctly
+ // /////////////////////////////////////////////////////////////////////////
+ /** The following types must be defined:
+ <ul>
+ <li>Parent_T: Type corresponding to the parent BOM
+ class within that namespace (e.g., AIRSCHED here)</li>
+ <li>BomStructure_T: Type of the corresponding BOM class within
+ the stdair namespace</li>
+ <li>BomKey_T: Type of the corresponding BOM Key structure within
+ the stdair namespace</li>
+ <li>ContentChild_T: Type corresponding to the child BOM
+ class within that namespace (e.g., AIRSCHED here)</li>
+ </ul>
+ <br><br>
+ Note that the BomRoot has no parent. So, there is no need for
+ that class to define a Parent_T type.
+ <br><br>
+ Note that when there is a second type of children (for instance,
+ the FlightDate object contains two types of children, namely LegDate
+ and SegmentDate), an additional type definition must be given, namely
+ SecondContentChild_T. As, by default, there is a single type of
+ children, there is no need to specify "First" in the ContentChild_T
+ type.
+ */
+
+ public:
+ // /////////////////////////////////////////////////////////////////////////
+ /** Definition allowing to retrieve the associated BOM structure type. */
+ typedef BomRootStructure_T BomStructure_T;
+
+ /** Definition allowing to retrieve the associated BOM key type. */
+ typedef BomRootKey_T BomKey_T;
+
+ /** Definition allowing to retrieve the associated
+ BOM content child type. */
+ typedef Inventory ContentChild_T;
+ // /////////////////////////////////////////////////////////////////////////
+
+
+ // /////////////////////////////////////////////////////////////////////////
+ // In order to enable STL-iterator-like browsing of children objects,
+ // extra type definitions may be specified, such as the ones commented
+ // below. Hence, although those type definitions may appear not so simple
+ // (some will say "idiomatic"), they allow for a very simple use.
+ // /////////////////////////////////////////////////////////////////////////
+ /** Define the const iterator on the list of children objects . */
+ // typedef stdair::BomIterator_T<BomContent,
+ // BomStructureList_T::const_iterator> const_iterator;
+ // where BomStructureList_T is defined as std::vector<BomStructure_T*>
+ // /////////////////////////////////////////////////////////////////////////
+
+
+ public:
+ // /////////// Display support methods /////////
+ /** Dump a Business Object into an output stream.
+ @param ostream& the output stream. */
+ void toStream (std::ostream& ioOut) const { ioOut << toString(); }
+
+ /** Read a Business Object from an input stream.
+ @param istream& the input stream. */
+ void fromStream (std::istream& ioIn) { }
+
+ /** Get the serialised version of the Business Object. */
+ std::string toString() const { return describeKey(); }
+
+ /** Get a string describing the whole key (differentiating two objects
+ at any level). */
+ const std::string describeKey() const { return std::string (""); }
+
+ /** Get a string describing the short key (differentiating two objects
+ at the same level). */
+ const std::string describeShortKey() const { return std::string (""); }
+
+ public:
+ // /////////// Getters /////////////
+ /** Get a InventoryList_T for iteration methods. */
+ InventoryList_T getInventoryList () const;
+
+ /** Get a InventoryMap_T for iteration methods. */
+ InventoryMap_T getInventoryMap () const;
+
+ private:
+ /** Retrieve the BOM structure object. */
+ BomStructure_T& getBomStructure () {
+ return _bomRootStructure;
+ }
+
+ private:
+ /** Constructors are private so as to force the usage of the Factory
+ layer. */
+ /** Default constructors. */
+ BomRoot ();
+ BomRoot (const BomRoot&);
+ BomRoot (BomStructure_T&);
+ /** Destructor. */
+ virtual ~BomRoot();
+
+ private:
+ // Attributes
+ /** Reference structure. */
+ BomStructure_T& _bomRootStructure;
+ };
+
+}
+#endif // __STDAIR_BOM_BOMROOT_HPP
Added: trunk/stdair/stdair/bom/BomRootContent.cpp
===================================================================
--- trunk/stdair/stdair/bom/BomRootContent.cpp (rev 0)
+++ trunk/stdair/stdair/bom/BomRootContent.cpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -0,0 +1,19 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STL
+#include <cassert>
+// STDAIR
+#include <stdair/bom/BomRootContent.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ BomRootContent::BomRootContent () {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ BomRootContent::~BomRootContent () {
+ }
+
+}
Copied: trunk/stdair/stdair/bom/BomRootContent.hpp (from rev 45, trunk/stdair/stdair/bom/BomContentRoot.hpp)
===================================================================
--- trunk/stdair/stdair/bom/BomRootContent.hpp (rev 0)
+++ trunk/stdair/stdair/bom/BomRootContent.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -0,0 +1,49 @@
+#ifndef __STDAIR_BOM_BOMROOTCONTENT_HPP
+#define __STDAIR_BOM_BOMROOTCONTENT_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/BomContent.hpp>
+
+namespace stdair {
+ /** Class representing the actual attributes for the Bom root. */
+ class BomRootContent : public BomContent {
+
+ public:
+ // /////////// Display support methods /////////
+ /** Dump a Business Object into an output stream.
+ @param ostream& the output stream. */
+ virtual void toStream (std::ostream& ioOut) const = 0;
+
+ /** Read a Business Object from an input stream.
+ @param istream& the input stream. */
+ virtual void fromStream (std::istream& ioIn) = 0;
+
+ /** Get the serialised version of the Business Object. */
+ virtual std::string toString() const = 0;
+
+ /** Get a string describing the whole key (differentiating two objects
+ at any level). */
+ virtual const std::string describeKey() const = 0;
+
+ /** Get a string describing the short key (differentiating two objects
+ at the same level). */
+ virtual const std::string describeShortKey() const = 0;
+
+ protected:
+ /** Default constructors. */
+ BomRootContent ();
+ BomRootContent (const BomRootContent&);
+
+ /** Destructor. */
+ virtual ~BomRootContent();
+
+ protected:
+ // Attributes
+
+ };
+
+}
+#endif // __STDAIR_BOM_BOMROOTCONTENT_HPP
Copied: trunk/stdair/stdair/bom/BomRootKey.hpp (from rev 45, trunk/stdair/stdair/bom/BomStructureRootKey.hpp)
===================================================================
--- trunk/stdair/stdair/bom/BomRootKey.hpp (rev 0)
+++ trunk/stdair/stdair/bom/BomRootKey.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -0,0 +1,66 @@
+#ifndef __STDAIR_BOM_BOMROOTKEY_HPP
+#define __STDAIR_BOM_BOMROOTKEY_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/STDAIR_Types.hpp>
+#include <stdair/bom/BomKey.hpp>
+
+namespace stdair {
+
+ // Forward declarations
+ template <typename BOM_CONTENT>
+ class BomRootStructure;
+
+ /** Key of the BOM structure root. */
+ template <typename BOM_CONTENT>
+ class BomRootKey : public BomKey {
+ friend class FacBomStructure;
+ friend class FacBomContent;
+
+ private:
+ // Type definitions
+ /** Definition allowing to retrieve the associated BOM structure type. */
+ typedef BomRootStructure<BOM_CONTENT> BomStructure_T;
+
+ public:
+ // /////////// Construction ///////////
+ /** Constructor. */
+ BomRootKey () {}
+
+ /** Destructor. */
+ ~BomRootKey () {}
+
+
+ // /////////// Display support methods /////////
+ /** Dump a Business Object Key into an output stream.
+ @param ostream& the output stream. */
+ void toStream (std::ostream& ioOut) const {
+ ioOut << "BomRootStructureKey: " << toString() << std::endl;
+ }
+
+ /** Read a Business Object Key from an input stream.
+ @param istream& the input stream. */
+ void fromStream (std::istream& ioIn) { }
+
+ /** Get the serialised version of the Business Object Key.
+ <br>That string is unique, at the level of a given Business Object,
+ when among children of a given parent Business Object.
+ <br>For instance, "H" and "K" allow to differentiate among two
+ marketing classes for the same segment-date. */
+ std::string toString() const {
+ std::ostringstream oStr;
+ oStr << " -- ROOT -- ";
+ return oStr.str();
+ }
+
+
+ private:
+ // Attributes
+ // No attributes, as that class corresponds to the root of Bom structure.
+ };
+
+}
+#endif // __STDAIR_BOM_BOMROOTKEY_HPP
Copied: trunk/stdair/stdair/bom/BomRootStructure.hpp (from rev 46, trunk/stdair/stdair/bom/BomStructureRoot.hpp)
===================================================================
--- trunk/stdair/stdair/bom/BomRootStructure.hpp (rev 0)
+++ trunk/stdair/stdair/bom/BomRootStructure.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -0,0 +1,129 @@
+#ifndef __STDAIR_BOM_BOMROOTSTRUCTURE_HPP
+#define __STDAIR_BOM_BOMROOTSTRUCTURE_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STL
+#include <cassert>
+// MPL
+#include <boost/mpl/vector.hpp>
+// STDAIR
+#include <stdair/bom/BomStructure.hpp>
+#include <stdair/bom/BomRootKey.hpp>
+#include <stdair/bom/BomChildrenHolderImp.hpp>
+#include <stdair/bom/InventoryStructure.hpp>
+
+namespace stdair {
+ // Forward declarations.
+ class BomStructureDummy;
+ class BomContentDummy;
+
+ /** Wrapper class aimed at holding the actual content, modeled
+ by a specific BomContentRoot class. */
+ template <typename BOM_CONTENT>
+ class BomRootStructure : public BomStructure {
+ friend class FacBomStructure;
+ friend class FacBomContent;
+ friend class BomStructure;
+
+ public:
+ // Type definitions
+ /** Definition allowing to retrieve the associated BOM content type. */
+ typedef BOM_CONTENT Content_T;
+
+ /** Definition allowing to retrieve the children type of the
+ BOM_CONTENT. */
+ typedef typename BOM_CONTENT::ContentChild_T ContentChild_T;
+
+ private:
+ // Type definitions
+ /** Definition allowing to retrieve the associated BOM key type. */
+ typedef BomRootKey<BOM_CONTENT> BomKey_T;
+
+ /** Definition allowing to retrieve the associated children type. */
+ typedef boost::mpl::vector<InventoryStructure<ContentChild_T>, BomStructureDummy> ChildrenBomTypeList_T;
+
+ /** Definition allowing to retrive the default children bom holder type. */
+ typedef BomChildrenHolderImp<BomContentDummy> DefaultChildrenBomHolder_T;
+
+ /** Definition allowing to retrive the children bom holder type. */
+ typedef BomChildrenHolderImp<ContentChild_T> ChildrenBomHolder_T;
+
+ public:
+ // /////////// Getters /////////////
+ /** Get the BomRootStructure key. */
+ const BomKey_T& getKey() const {
+ return _key;
+ }
+
+ /** Get the list of inventories. */
+ const ChildrenBomHolder_T& getChildrenList() const {
+ assert (_childrenList != NULL);
+ return *_childrenList;
+ }
+
+ /** Get the list of inventories. */
+ void getChildrenList (ChildrenBomHolder_T*& ioChildrenList) {
+ ioChildrenList = _childrenList;
+ }
+
+ private:
+ /////////////// Setters ////////////////
+ /** Default children list setter. */
+ void setChildrenList (DefaultChildrenBomHolder_T&) { }
+
+ /** Set the children list. */
+ void setChildrenList (ChildrenBomHolder_T& ioChildrenList) {
+ _childrenList = &ioChildrenList;
+ }
+
+ public:
+ // /////////// Display support methods /////////
+ /** Dump a Business Object into an output stream.
+ @param ostream& the output stream. */
+ void toStream (std::ostream& ioOut) const {
+ ioOut << toString() << std::endl;
+ }
+
+ /** Read a Business Object from an input stream.
+ @param istream& the input stream. */
+ void fromStream (std::istream& ioIn) { }
+
+ /** Get the serialised version of the Business Object. */
+ std::string toString() const { return describeKey(); }
+
+ /** Get a string describing the whole key (differentiating two objects
+ at any level). */
+ const std::string describeKey() const { return _key.toString(); }
+
+ /** Get a string describing the short key (differentiating two objects
+ at the same level). */
+ const std::string describeShortKey() const { return _key.toString(); }
+
+ private:
+ /** Constructors are private so as to force the usage of the Factory
+ layer. */
+ /** Default constructors. */
+ BomRootStructure ();
+ BomRootStructure (const BomRootStructure&);
+ BomRootStructure (const BomKey_T& iKey) { _key = iKey; }
+
+ /** Destructor. */
+ ~BomRootStructure () { }
+
+ private:
+ // Attributes
+ /** The key of both the structure and content objects. */
+ BomKey_T _key;
+
+ /** The actual functional (Business Object) content. */
+ BOM_CONTENT* _content;
+
+ /** List of inventories. */
+ ChildrenBomHolder_T* _childrenList;
+ };
+
+}
+#endif // __STDAIR_BOM_BOMROOTSTRUCTURE_HPP
+
Modified: trunk/stdair/stdair/bom/BomRootTypes.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomRootTypes.hpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/bom/BomRootTypes.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -8,20 +8,16 @@
namespace stdair {
// Forward declarations.
- template <typename BOM_CONTENT> class BomStructureRoot;
- template <typename BOM_CONTENT> class BomStructureRootKey;
- template <typename BOM_CHILD> class BomContentRoot;
- class Inventory;
+ template <typename BOM_CONTENT> class BomRootStructure;
+ template <typename BOM_CONTENT> class BomRootKey;
+ class BomRoot;
+
+ /** Define the BomRootStructure. */
+ typedef BomRootStructure<BomRoot> BomRootStructure_T;
- /** Define the BomContentRoot. */
- typedef BomContentRoot<Inventory> BomContentRoot_T;
+ /** Define the BomRootStructureKey. */
+ typedef BomRootKey<BomRoot> BomRootKey_T;
- /** Define the BomStructureRoot. */
- typedef BomStructureRoot<BomContentRoot_T> BomStructureRoot_T;
-
- /** Define the BomStructureRootKey. */
- typedef BomStructureRootKey<BomContentRoot_T> BomStructureRootKey_T;
-
}
#endif // __STDAIR_BOM_BOMROOTTYPES_HPP
Modified: trunk/stdair/stdair/bom/BomStructureDummy.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomStructureDummy.hpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/bom/BomStructureDummy.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -6,6 +6,7 @@
// //////////////////////////////////////////////////////////////////////
// STDAIR
#include <stdair/bom/BomStructure.hpp>
+#include <stdair/bom/BomKey.hpp>
#include <stdair/bom/BomChildrenHolderImp.hpp>
// MPL
#include <boost/mpl/vector.hpp>
@@ -13,7 +14,6 @@
namespace stdair {
// Forward declarations.
class BomContentDummy;
- class BomKey;
/** Wrapper class aimed at holding the actual content, modeled
by a specific BomContentDummy class. */
Deleted: trunk/stdair/stdair/bom/BomStructureRoot.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomStructureRoot.hpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/bom/BomStructureRoot.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -1,125 +0,0 @@
-#ifndef __STDAIR_BOM_BOMSTRUCTUREROOT_HPP
-#define __STDAIR_BOM_BOMSTRUCTUREROOT_HPP
-
-// //////////////////////////////////////////////////////////////////////
-// Import section
-// //////////////////////////////////////////////////////////////////////
-// STDAIR
-#include <stdair/bom/BomStructure.hpp>
-#include <stdair/bom/BomStructureRootKey.hpp>
-#include <stdair/bom/BomChildrenHolderImp.hpp>
-// MPL
-#include <boost/mpl/vector.hpp>
-
-namespace stdair {
- // Forward declarations.
- template <typename BOM_CONTENT> class InventoryStructure;
- class BomStructureDummy;
- class BomContentDummy;
-
- /** Wrapper class aimed at holding the actual content, modeled
- by a specific BomContentRoot class. */
- template <typename BOM_CONTENT>
- class BomStructureRoot : public BomStructure {
- friend class FacBomStructure;
- friend class FacBomContent;
-
- // Type definitions
- /** Definition allowing to retrieve the associated BOM content type. */
- typedef BOM_CONTENT Content_T;
-
- /** Definition allowing to retrieve the children type of the
- BOM_CONTENT. */
- typedef typename BOM_CONTENT::ContentChild_T ContentChild_T;
-
- private:
- // Type definitions
- /** Definition allowing to retrieve the associated BOM key type. */
- typedef BomStructureRootKey<BOM_CONTENT> BomKey_T;
-
- /** Definition allowing to retrieve the associated children type. */
- typedef boost::mpl::vector<InventoryStructure<ContentChild_T>, BomStructureDummy> ChildrenBomTypeList_T;
-
- /** Definition allowing to retrive the default children bom holder type. */
- typedef BomChildrenHolderImp<BomContentDummy> DefaultChildrenBomHolder_T;
-
- /** Definition allowing to retrive the children bom holder type. */
- typedef BomChildrenHolderImp<ContentChild_T> ChildrenBomHolder_T;
-
- public:
-
- // /////////// Getters /////////////
- /** Get the BomStructureRoot key. */
- const BomKey_T& getKey() const {
- return _key;
- }
-
- /** Get the list of inventories. */
- const ChildrenBomHolder_T& getChildrenList() const {
- return *_childrenList;
- }
-
- /** Get the list of inventories. */
- void getChildrenList (ChildrenBomHolder_T*& ioChildrenList) {
- ioChildrenList = _childrenList;
- }
-
- private:
- /////////////// Setters ////////////////
- /** Default children list setter. */
- void setChildrenList (DefaultChildrenBomHolder_T&) { }
-
- /** Set the children list. */
- void setChildrenList (ChildrenBomHolder_T& ioChildrenList) {
- _childrenList = &ioChildrenList;
- }
-
- public:
- // /////////// Display support methods /////////
- /** Dump a Business Object into an output stream.
- @param ostream& the output stream. */
- void toStream (std::ostream& ioOut) const {
- ioOut << toString() << std::endl;
- }
-
- /** Read a Business Object from an input stream.
- @param istream& the input stream. */
- void fromStream (std::istream& ioIn) { }
-
- /** Get the serialised version of the Business Object. */
- std::string toString() const { return describeKey(); }
-
- /** Get a string describing the whole key (differentiating two objects
- at any level). */
- const std::string describeKey() const { return _key.toString(); }
-
- /** Get a string describing the short key (differentiating two objects
- at the same level). */
- const std::string describeShortKey() const { return _key.toString(); }
-
- private:
- /** Constructors are private so as to force the usage of the Factory
- layer. */
- /** Default constructors. */
- BomStructureRoot ();
- BomStructureRoot (const BomStructureRoot&);
- BomStructureRoot (const BomKey_T& iKey) { _key = iKey; }
-
- /** Destructor. */
- ~BomStructureRoot () { }
-
- private:
- // Attributes
- /** The key of both the structure and content objects. */
- BomKey_T _key;
-
- /** The actual functional (Business Object) content. */
- BOM_CONTENT* _content;
-
- /** List of inventories. */
- ChildrenBomHolder_T* _childrenList;
- };
-
-}
-#endif // __STDAIR_BOM_BOMSTRUCTUREROOT_HPP
-
Deleted: trunk/stdair/stdair/bom/BomStructureRootKey.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomStructureRootKey.hpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/bom/BomStructureRootKey.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -1,66 +0,0 @@
-#ifndef __STDAIR_BOM_BOMSTRUCTUREROOTKEY_HPP
-#define __STDAIR_BOM_BOMSTRUCTUREROOTKEY_HPP
-
-// //////////////////////////////////////////////////////////////////////
-// Import section
-// //////////////////////////////////////////////////////////////////////
-// STDAIR
-#include <stdair/STDAIR_Types.hpp>
-#include <stdair/bom/BomKey.hpp>
-
-namespace stdair {
-
- // Forward declarations
- template <typename BOM_CONTENT>
- class BomStructureRoot;
-
- /** Key of the BOM structure root. */
- template <typename BOM_CONTENT>
- class BomStructureRootKey : public BomKey {
- friend class FacBomStructure;
- friend class FacBomContent;
-
- private:
- // Type definitions
- /** Definition allowing to retrieve the associated BOM structure type. */
- typedef BomStructureRoot<BOM_CONTENT> BomStructure_T;
-
- public:
- // /////////// Construction ///////////
- /** Constructor. */
- BomStructureRootKey () {}
-
- /** Destructor. */
- ~BomStructureRootKey () {}
-
-
- // /////////// Display support methods /////////
- /** Dump a Business Object Key into an output stream.
- @param ostream& the output stream. */
- void toStream (std::ostream& ioOut) const {
- ioOut << "BomStructureRootKey: " << toString() << std::endl;
- }
-
- /** Read a Business Object Key from an input stream.
- @param istream& the input stream. */
- void fromStream (std::istream& ioIn) { }
-
- /** Get the serialised version of the Business Object Key.
- <br>That string is unique, at the level of a given Business Object,
- when among children of a given parent Business Object.
- <br>For instance, "H" and "K" allow to differentiate among two
- marketing classes for the same segment-date. */
- std::string toString() const {
- std::ostringstream oStr;
- oStr << " -- ROOT -- ";
- return oStr.str();
- }
-
-
- private:
- // Attributes
- // No attributes, as that class corresponds to the root of Bom structure.
- };
-
-}
-#endif // __STDAIR_BOM_BOMSTRUCTUREROOTKEY_HPP
Modified: trunk/stdair/stdair/bom/BookingClass.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -25,7 +25,7 @@
// Type definitions
/** Definition allowing to retrieve the associated parent
BOM content type. */
- typedef SegmentCabin ParentBomContent_T;
+ typedef SegmentCabin Parent_T;
/** Definition allowing to retrieve the associated BOM structure type. */
typedef BookingClassStructure_T BomStructure_T;
Modified: trunk/stdair/stdair/bom/BookingClassStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClassStructure.hpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/bom/BookingClassStructure.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -37,7 +37,7 @@
/** Definition allowing to retrieve the associated parent
BOM structure type. */
- typedef typename BOM_CONTENT::ParentBomContent_T::BomStructure_T ParentBomStructure_T;
+ typedef typename BOM_CONTENT::Parent_T::BomStructure_T ParentBomStructure_T;
/** Definition allowing to retrieve the associated children type. */
typedef boost::mpl::vector <BomStructureDummy,
Modified: trunk/stdair/stdair/bom/FlightDate.cpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDate.cpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/bom/FlightDate.cpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -7,8 +7,9 @@
#include <iostream>
#include <algorithm>
// STDAIR
+#include <stdair/bom/FlightDateStructure.hpp>
+#include <stdair/bom/BomRoot.hpp>
#include <stdair/bom/Inventory.hpp>
-#include <stdair/bom/FlightDateStructure.hpp>
#include <stdair/bom/FlightDate.hpp>
#include <stdair/bom/SegmentDate.hpp>
#include <stdair/bom/SegmentDateList.hpp>
Modified: trunk/stdair/stdair/bom/FlightDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -28,12 +28,12 @@
public:
// Type definitions
// /////////////////////////////////////////////////////////////////////////
- // See the explanations, within the BomContentRoot class, for all
+ // See the explanations, within the BomRoot class, for all
// the types which require to be specified below
// /////////////////////////////////////////////////////////////////////////
/** Definition allowing to retrieve the associated parent
BOM content type. */
- typedef Inventory ParentBomContent_T;
+ typedef Inventory Parent_T;
/** Definition allowing to retrieve the associated BOM structure type. */
typedef FlightDateStructure_T BomStructure_T;
Modified: trunk/stdair/stdair/bom/FlightDateStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -16,7 +16,6 @@
namespace stdair {
// Forward declaration
- template <typename BOM_CONTENT> class InventoryStructure;
class BomContentDummy;
/** Wrapper class aimed at holding the actual content, modeled
@@ -38,7 +37,7 @@
/** Definition allowing to retrieve the associated parent
BOM structure type. */
- typedef typename BOM_CONTENT::ParentBomContent_T::BomStructure_T ParentBomStructure_T;
+ typedef typename BOM_CONTENT::Parent_T::BomStructure_T ParentBomStructure_T;
/** Definition allowing to retrieve the children type of the
BOM_CONTENT. */
Modified: trunk/stdair/stdair/bom/Inventory.cpp
===================================================================
--- trunk/stdair/stdair/bom/Inventory.cpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/bom/Inventory.cpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -5,6 +5,7 @@
#include <cassert>
// STDAIR
#include <stdair/bom/InventoryStructure.hpp>
+#include <stdair/bom/BomRoot.hpp>
#include <stdair/bom/Inventory.hpp>
#include <stdair/bom/FlightDate.hpp>
#include <stdair/bom/FlightDateList.hpp>
Modified: trunk/stdair/stdair/bom/Inventory.hpp
===================================================================
--- trunk/stdair/stdair/bom/Inventory.hpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -5,16 +5,16 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
-#include <stdair/bom/BomContentRoot.hpp>
-#include <stdair/bom/InventoryContent.hpp>
#include <stdair/bom/BomRootTypes.hpp>
#include <stdair/bom/InventoryTypes.hpp>
#include <stdair/bom/FlightDateTypes.hpp>
+#include <stdair/bom/InventoryContent.hpp>
namespace stdair {
// Forward declarations
class FacBomContent;
+ class BomRoot;
class FlightDate;
struct FlightDateList_T;
struct FlightDateMap_T;
@@ -26,12 +26,12 @@
public:
// /////////////////////////////////////////////////////////////////////////
- // See the explanations, within the BomContentRoot class, for all
+ // See the explanations, within the BomRoot class, for all
// the types which require to be specified below
// /////////////////////////////////////////////////////////////////////////
/** Definition allowing to retrieve the associated parent
BOM content type. */
- typedef BomContentRoot_T ParentBomContent_T;
+ typedef BomRoot Parent_T;
/** Definition allowing to retrieve the associated BOM structure type. */
typedef InventoryStructure_T BomStructure_T;
Modified: trunk/stdair/stdair/bom/InventoryContent.hpp
===================================================================
--- trunk/stdair/stdair/bom/InventoryContent.hpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/bom/InventoryContent.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -4,7 +4,8 @@
// //////////////////////////////////////////////////////////////////////
// Import section
// //////////////////////////////////////////////////////////////////////
-// STDAIR
+// STDAIR
+#include <stdair/STDAIR_Types.hpp>
#include <stdair/bom/BomContent.hpp>
namespace stdair {
@@ -32,7 +33,80 @@
at the same level). */
virtual const std::string describeShortKey() const = 0;
-
+ public:
+ // ////////// Getters ////////////
+ /** Get the booking counter. */
+ const NbOfBookings_T& getBookingCounter () const {
+ return _bookingCounter;
+ }
+
+ /** Get the total inventory revenue. */
+ const Revenue_T& getRevenue () const {
+ return _inventoryRevenue;
+ }
+
+ /** Get the inventory average fare. */
+ const Fare_T& getAverageFare() const {
+ return _inventoryAverageFare;
+ }
+
+ /** Get the Availability Seat Kilometer for the inventory. */
+ const Distance_T& getASK() const {
+ return _inventoryASK;
+ }
+
+ /** Get the yield value for the inventory. */
+ const Revenue_T& getYield () const {
+ return _inventoryYield;
+ }
+
+ /** Get the Revenue Passanger Kilometer for the whole inventory. */
+ const Distance_T& getRPK() const {
+ return _inventoryRPK;
+ }
+
+ /** Get the unit revenue value for the whole inventory. */
+ const Revenue_T& getUnitRevenue () const {
+ return _inventoryUnitRevenue;
+ }
+
+ /** Get the load factor value for this inventory. */
+ const Revenue_T& getLoadFactor () const {
+ return _inventoryLoadFactor;
+ }
+
+ public:
+ // ///////// Setters //////////
+ /** Set the revenue amount. */
+ void setRevenue (const Revenue_T& iInventoryRevenue) {
+ _inventoryRevenue = iInventoryRevenue;
+ }
+
+ /** Set the Revenue Passanger Kilometer. */
+ void setRPK (const Distance_T& iInventoryRPK) {
+ _inventoryRPK = iInventoryRPK;
+ }
+
+ /** Set the unit revenue. */
+ void setUnitRevenue (const Revenue_T& iInventoryURevenue) {
+ _inventoryUnitRevenue = iInventoryURevenue;
+ }
+
+ /** Set the average fare. */
+ void setAverageFare(Fare_T iIAFare) {
+ _inventoryAverageFare = iIAFare;
+ }
+
+ /** Set the yield. */
+ void setYield (const Revenue_T& iInvYield) {
+ _inventoryYield = iInvYield;
+ }
+
+ /** Set the load factor. */
+ void setLoadFactor (const Revenue_T& iInventoryLF) {
+ _inventoryLoadFactor = iInventoryLF;
+ }
+
protected:
/** Default constructors. */
InventoryContent ();
@@ -43,6 +117,31 @@
protected:
// Attributes
+ /** Counter of all bookings into the inventory. */
+ NbOfBookings_T _bookingCounter;
+
+ /** Total amount of money earn with all flight bookings
+ for one airline. */
+ Revenue_T _inventoryRevenue;
+
+ /** Value of the average fare of the inventory.*/
+ Fare_T _inventoryAverageFare;
+
+ /** Value of the Available Seat Kilometer for this Inventory.*/
+ Distance_T _inventoryASK;
+
+ /** Value of the Yield (Revenue/ASK). */
+ Revenue_T _inventoryYield;
+
+ /** Value of the Revenue Passanger Kilometer for the whole inventory.*/
+ Distance_T _inventoryRPK;
+
+ /** Value of the Unit Revenue (Revenue/RPK). */
+ Revenue_T _inventoryUnitRevenue;
+
+ /** Value of the Load Factor (ASK/RPK). */
+ Revenue_T _inventoryLoadFactor;
+
};
}
Modified: trunk/stdair/stdair/bom/InventoryStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -12,13 +12,11 @@
#include <stdair/bom/BomStructure.hpp>
#include <stdair/bom/InventoryKey.hpp>
#include <stdair/bom/BomChildrenHolderImp.hpp>
-#include <stdair/bom/BomIterator.hpp>
#include <stdair/bom/FlightDateStructure.hpp>
namespace stdair {
// Forward declaration
- template <typename BOM_CONTENT> class BomStructureRoot;
class BomStructureDummy;
class BomContentDummy;
@@ -45,7 +43,7 @@
/** Definition allowing to retrieve the associated parent
BOM structure type. */
- typedef typename BOM_CONTENT::ParentBomContent_T::BomStructure_T ParentBomStructure_T;
+ typedef typename BOM_CONTENT::Parent_T::BomStructure_T ParentBomStructure_T;
/** Definition allowing to retrieve the associated children type. */
typedef boost::mpl::vector<FlightDateStructure<ContentChild_T>,
Modified: trunk/stdair/stdair/bom/LegCabin.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -22,7 +22,7 @@
// Type definitions
/** Definition allowing to retrieve the associated parent
BOM content type. */
- typedef LegDate ParentBomContent_T;
+ typedef LegDate Parent_T;
/** Definition allowing to retrieve the associated BOM structure type. */
typedef LegCabinStructure_T BomStructure_T;
Modified: trunk/stdair/stdair/bom/LegCabinStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabinStructure.hpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/bom/LegCabinStructure.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -38,7 +38,7 @@
/** Definition allowing to retrieve the associated parent
BOM structure type. */
- typedef typename BOM_CONTENT::ParentBomContent_T::BomStructure_T ParentBomStructure_T;
+ typedef typename BOM_CONTENT::Parent_T::BomStructure_T ParentBomStructure_T;
/** Definition allowing to retrieve the associated children type. */
typedef boost::mpl::vector <BomStructureDummy,
Modified: trunk/stdair/stdair/bom/LegDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegDate.hpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/bom/LegDate.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -25,7 +25,7 @@
// Type definitions
/** Definition allowing to retrieve the associated parent
BOM content type. */
- typedef FlightDate ParentBomContent_T;
+ typedef FlightDate Parent_T;
/** Definition allowing to retrieve the associated BOM structure type. */
typedef LegDateStructure_T BomStructure_T;
Modified: trunk/stdair/stdair/bom/LegDateStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegDateStructure.hpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/bom/LegDateStructure.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -38,7 +38,7 @@
/** Definition allowing to retrieve the associated parent
BOM structure type. */
- typedef typename BOM_CONTENT::ParentBomContent_T::BomStructure_T ParentBomStructure_T;
+ typedef typename BOM_CONTENT::Parent_T::BomStructure_T ParentBomStructure_T;
/** Definition allowing to retrieve the children type of the
BOM_CONTENT. */
Modified: trunk/stdair/stdair/bom/SegmentCabin.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -25,7 +25,7 @@
// Type definitions
/** Definition allowing to retrieve the associated parent
BOM content type. */
- typedef SegmentDate ParentBomContent_T;
+ typedef SegmentDate Parent_T;
/** Definition allowing to retrieve the associated BOM structure type. */
typedef SegmentCabinStructure_T BomStructure_T;
Modified: trunk/stdair/stdair/bom/SegmentCabinStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabinStructure.hpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/bom/SegmentCabinStructure.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -38,7 +38,7 @@
/** Definition allowing to retrieve the associated parent
BOM structure type. */
- typedef typename BOM_CONTENT::ParentBomContent_T::BomStructure_T ParentBomStructure_T;
+ typedef typename BOM_CONTENT::Parent_T::BomStructure_T ParentBomStructure_T;
/** Definition allowing to retrieve the children type of the
BOM_CONTENT. */
Modified: trunk/stdair/stdair/bom/SegmentDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -25,7 +25,7 @@
// Type definitions
/** Definition allowing to retrieve the associated parent
BOM content type. */
- typedef FlightDate ParentBomContent_T;
+ typedef FlightDate Parent_T;
/** Definition allowing to retrieve the associated BOM structure type. */
typedef SegmentDateStructure_T BomStructure_T;
Modified: trunk/stdair/stdair/bom/SegmentDateStructure.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDateStructure.hpp 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/bom/SegmentDateStructure.hpp 2009-10-15 15:11:19 UTC (rev 47)
@@ -38,7 +38,7 @@
/** Definition allowing to retrieve the associated parent
BOM structure type. */
- typedef typename BOM_CONTENT::ParentBomContent_T::BomStructure_T ParentBomStructure_T;
+ typedef typename BOM_CONTENT::Parent_T::BomStructure_T ParentBomStructure_T;
/** Definition allowing to retrieve the children type of the
BOM_CONTENT. */
Modified: trunk/stdair/stdair/bom/sources.mk
===================================================================
--- trunk/stdair/stdair/bom/sources.mk 2009-10-15 09:21:08 UTC (rev 46)
+++ trunk/stdair/stdair/bom/sources.mk 2009-10-15 15:11:19 UTC (rev 47)
@@ -1,6 +1,6 @@
bom_h_sources = \
$(top_srcdir)/stdair/bom/BomKey.hpp \
- $(top_srcdir)/stdair/bom/BomStructureRootKey.hpp \
+ $(top_srcdir)/stdair/bom/BomRootKey.hpp \
$(top_srcdir)/stdair/bom/InventoryKey.hpp \
$(top_srcdir)/stdair/bom/FlightDateKey.hpp \
$(top_srcdir)/stdair/bom/LegDateKey.hpp \
@@ -8,8 +8,12 @@
$(top_srcdir)/stdair/bom/SegmentCabinKey.hpp \
$(top_srcdir)/stdair/bom/BookingClassK...
[truncated message content] |
|
From: <qua...@us...> - 2009-10-15 09:21:23
|
Revision: 46
http://stdair.svn.sourceforge.net/stdair/?rev=46&view=rev
Author: quannaus
Date: 2009-10-15 09:21:08 +0000 (Thu, 15 Oct 2009)
Log Message:
-----------
[Dev] Added the xxxContent objects.
Modified Paths:
--------------
trunk/stdair/stdair/bom/BomStructureRoot.hpp
trunk/stdair/stdair/bom/BookingClass.hpp
trunk/stdair/stdair/bom/FlightDate.hpp
trunk/stdair/stdair/bom/Inventory.hpp
trunk/stdair/stdair/bom/LegCabin.hpp
trunk/stdair/stdair/bom/LegDate.hpp
trunk/stdair/stdair/bom/SegmentCabin.hpp
trunk/stdair/stdair/bom/SegmentDate.hpp
trunk/stdair/stdair/bom/sources.mk
Added Paths:
-----------
trunk/stdair/stdair/bom/BookingClassContent.cpp
trunk/stdair/stdair/bom/BookingClassContent.hpp
trunk/stdair/stdair/bom/FlightDateContent.cpp
trunk/stdair/stdair/bom/FlightDateContent.hpp
trunk/stdair/stdair/bom/InventoryContent.cpp
trunk/stdair/stdair/bom/InventoryContent.hpp
trunk/stdair/stdair/bom/LegCabinContent.cpp
trunk/stdair/stdair/bom/LegCabinContent.hpp
trunk/stdair/stdair/bom/LegDateContent.cpp
trunk/stdair/stdair/bom/LegDateContent.hpp
trunk/stdair/stdair/bom/SegmentCabinContent.cpp
trunk/stdair/stdair/bom/SegmentCabinContent.hpp
trunk/stdair/stdair/bom/SegmentDateContent.cpp
trunk/stdair/stdair/bom/SegmentDateContent.hpp
Modified: trunk/stdair/stdair/bom/BomStructureRoot.hpp
===================================================================
--- trunk/stdair/stdair/bom/BomStructureRoot.hpp 2009-10-14 14:33:39 UTC (rev 45)
+++ trunk/stdair/stdair/bom/BomStructureRoot.hpp 2009-10-15 09:21:08 UTC (rev 46)
@@ -47,16 +47,7 @@
typedef BomChildrenHolderImp<ContentChild_T> ChildrenBomHolder_T;
public:
- /** Define the iterators of the inventory list. */
- typedef typename ChildrenBomHolder_T::ListIterator_T InventoryListIterator_T;
- typedef typename ChildrenBomHolder_T::ListReverseIterator_T InventoryListReverseIterator_T;
- /** Define the iterators of the inventory map. */
- typedef typename ChildrenBomHolder_T::MapIterator_T InventoryMapIterator_T;
- typedef typename ChildrenBomHolder_T::MapReverseIterator_T InventoryMapReverseIterator_T;
-
- public:
-
// /////////// Getters /////////////
/** Get the BomStructureRoot key. */
const BomKey_T& getKey() const {
@@ -106,64 +97,6 @@
at the same level). */
const std::string describeShortKey() const { return _key.toString(); }
- public:
- // /////////// Iteration methods //////////
- /** Initialise the internal iterator on inventory:
- return the iterator at the begining of the list. */
- InventoryListIterator_T inventoryListBegin () const {
- assert (_childrenList != NULL);
- return _childrenList->listBegin ();
- }
-
- /** Initialise the internal iterator on inventory:
- return the iterator at the end of the list. */
- InventoryListIterator_T inventoryListEnd () const {
- assert (_childrenList != NULL);
- return _childrenList->listEnd ();
- }
-
- /** Initialise the internal reverse iterator on inventory:
- return the reverse iterator at the rbegining of the list. */
- InventoryListReverseIterator_T inventoryListRBegin () const {
- assert (_childrenList != NULL);
- return _childrenList->listRBegin ();
- }
-
- /** Initialise the internal reverse iterator on inventory:
- return the reverse iterator at the rend of the list. */
- InventoryListReverseIterator_T inventoryListREnd () const {
- assert (_childrenList != NULL);
- return _childrenList->listREnd ();
- }
-
- /** Initialise the internal iterator on inventory:
- return the iterator at the begining of the map. */
- InventoryMapIterator_T inventoryMapBegin () const {
- assert (_childrenList != NULL);
- return _childrenList->mapBegin ();
- }
-
- /** Initialise the internal iterator on inventory:
- return the iterator at the end of the map. */
- InventoryMapIterator_T inventoryMapEnd () const {
- assert (_childrenList != NULL);
- return _childrenList->mapEnd ();
- }
-
- /** Initialise the internal reverse iterator on inventory:
- return the reverse iterator at the rbegining of the map. */
- InventoryMapReverseIterator_T inventoryMapRBegin () const {
- assert (_childrenList != NULL);
- return _childrenList->mapRBegin ();
- }
-
- /** Initialise the internal reverse iterator on inventory:
- return the reverse iterator at the rend of the map. */
- InventoryMapReverseIterator_T inventoryMapREnd () const {
- assert (_childrenList != NULL);
- return _childrenList->mapREnd ();
- }
-
private:
/** Constructors are private so as to force the usage of the Factory
layer. */
Modified: trunk/stdair/stdair/bom/BookingClass.hpp
===================================================================
--- trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-14 14:33:39 UTC (rev 45)
+++ trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-15 09:21:08 UTC (rev 46)
@@ -5,7 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
-#include <stdair/bom/BomContent.hpp>
+#include <stdair/bom/BookingClassContent.hpp>
#include <stdair/bom/SegmentCabinTypes.hpp>
#include <stdair/bom/BookingClassTypes.hpp>
@@ -18,7 +18,7 @@
/** Class representing the actual functional/business content for a
segment-cabin. */
- class BookingClass : public BomContent {
+ class BookingClass : public BookingClassContent {
friend class FacBomContent;
public:
Copied: trunk/stdair/stdair/bom/BookingClassContent.cpp (from rev 45, trunk/stdair/stdair/bom/Inventory.cpp)
===================================================================
--- trunk/stdair/stdair/bom/BookingClassContent.cpp (rev 0)
+++ trunk/stdair/stdair/bom/BookingClassContent.cpp 2009-10-15 09:21:08 UTC (rev 46)
@@ -0,0 +1,20 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STL
+#include <cassert>
+// STDAIR
+#include <stdair/bom/BookingClassContent.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ BookingClassContent::BookingClassContent () {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ BookingClassContent::~BookingClassContent () {
+ }
+
+}
+
Copied: trunk/stdair/stdair/bom/BookingClassContent.hpp (from rev 45, trunk/stdair/stdair/bom/Inventory.hpp)
===================================================================
--- trunk/stdair/stdair/bom/BookingClassContent.hpp (rev 0)
+++ trunk/stdair/stdair/bom/BookingClassContent.hpp 2009-10-15 09:21:08 UTC (rev 46)
@@ -0,0 +1,50 @@
+#ifndef __STDAIR_BOM_BOOKINGCLASSCONTENT_HPP
+#define __STDAIR_BOM_BOOKINGCLASSCONTENT_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/BomContent.hpp>
+
+namespace stdair {
+
+ /** Class representing the actual attributes for an airline booking class. */
+ class BookingClassContent : public BomContent {
+ public:
+ // /////////// Display support methods /////////
+ /** Dump a Business Object into an output stream.
+ @param ostream& the output stream. */
+ virtual void toStream (std::ostream& ioOut) const = 0;
+
+ /** Read a Business Object from an input stream.
+ @param istream& the input stream. */
+ virtual void fromStream (std::istream& ioIn) = 0;
+
+ /** Get the serialised version of the Business Object. */
+ virtual std::string toString() const = 0;
+
+ /** Get a string describing the whole key (differentiating two objects
+ at any level). */
+ virtual const std::string describeKey() const = 0;
+
+ /** Get a string describing the short key (differentiating two objects
+ at the same level). */
+ virtual const std::string describeShortKey() const = 0;
+
+
+ protected:
+ /** Default constructors. */
+ BookingClassContent ();
+ BookingClassContent (const BookingClassContent&);
+
+ /** Destructor. */
+ virtual ~BookingClassContent();
+
+ protected:
+ // Attributes
+ };
+
+}
+#endif // __STDAIR_BOM_BOOKINGCLASSCONTENT_HPP
+
Modified: trunk/stdair/stdair/bom/FlightDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-14 14:33:39 UTC (rev 45)
+++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-15 09:21:08 UTC (rev 46)
@@ -5,7 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
-#include <stdair/bom/BomContent.hpp>
+#include <stdair/bom/FlightDateContent.hpp>
#include <stdair/bom/FlightDateTypes.hpp>
#include <stdair/bom/SegmentDateTypes.hpp>
#include <stdair/bom/LegDateTypes.hpp>
@@ -22,7 +22,7 @@
/** Class representing the actual functional/business content for a
flight-date. */
- class FlightDate : public BomContent {
+ class FlightDate : public FlightDateContent {
friend class FacBomContent;
public:
Copied: trunk/stdair/stdair/bom/FlightDateContent.cpp (from rev 45, trunk/stdair/stdair/bom/Inventory.cpp)
===================================================================
--- trunk/stdair/stdair/bom/FlightDateContent.cpp (rev 0)
+++ trunk/stdair/stdair/bom/FlightDateContent.cpp 2009-10-15 09:21:08 UTC (rev 46)
@@ -0,0 +1,20 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STL
+#include <cassert>
+// STDAIR
+#include <stdair/bom/FlightDateContent.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ FlightDateContent::FlightDateContent () {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ FlightDateContent::~FlightDateContent () {
+ }
+
+}
+
Copied: trunk/stdair/stdair/bom/FlightDateContent.hpp (from rev 45, trunk/stdair/stdair/bom/Inventory.hpp)
===================================================================
--- trunk/stdair/stdair/bom/FlightDateContent.hpp (rev 0)
+++ trunk/stdair/stdair/bom/FlightDateContent.hpp 2009-10-15 09:21:08 UTC (rev 46)
@@ -0,0 +1,50 @@
+#ifndef __STDAIR_BOM_FLIGHTDATECONTENT_HPP
+#define __STDAIR_BOM_FLIGHTDATECONTENT_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/BomContent.hpp>
+
+namespace stdair {
+
+ /** Class representing the actual attributes for an airline flight-date. */
+ class FlightDateContent : public BomContent {
+ public:
+ // /////////// Display support methods /////////
+ /** Dump a Business Object into an output stream.
+ @param ostream& the output stream. */
+ virtual void toStream (std::ostream& ioOut) const = 0;
+
+ /** Read a Business Object from an input stream.
+ @param istream& the input stream. */
+ virtual void fromStream (std::istream& ioIn) = 0;
+
+ /** Get the serialised version of the Business Object. */
+ virtual std::string toString() const = 0;
+
+ /** Get a string describing the whole key (differentiating two objects
+ at any level). */
+ virtual const std::string describeKey() const = 0;
+
+ /** Get a string describing the short key (differentiating two objects
+ at the same level). */
+ virtual const std::string describeShortKey() const = 0;
+
+
+ protected:
+ /** Default constructors. */
+ FlightDateContent ();
+ FlightDateContent (const FlightDateContent&);
+
+ /** Destructor. */
+ virtual ~FlightDateContent();
+
+ protected:
+ // Attributes
+ };
+
+}
+#endif // __STDAIR_BOM_FLIGHTDATECONTENT_HPP
+
Modified: trunk/stdair/stdair/bom/Inventory.hpp
===================================================================
--- trunk/stdair/stdair/bom/Inventory.hpp 2009-10-14 14:33:39 UTC (rev 45)
+++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-15 09:21:08 UTC (rev 46)
@@ -5,8 +5,8 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
-#include <stdair/bom/BomContent.hpp>
#include <stdair/bom/BomContentRoot.hpp>
+#include <stdair/bom/InventoryContent.hpp>
#include <stdair/bom/BomRootTypes.hpp>
#include <stdair/bom/InventoryTypes.hpp>
#include <stdair/bom/FlightDateTypes.hpp>
@@ -21,7 +21,7 @@
/** Class representing the actual functional/business content for
an airline inventory. */
- class Inventory : public BomContent {
+ class Inventory : public InventoryContent {
friend class FacBomContent;
public:
Copied: trunk/stdair/stdair/bom/InventoryContent.cpp (from rev 45, trunk/stdair/stdair/bom/Inventory.cpp)
===================================================================
--- trunk/stdair/stdair/bom/InventoryContent.cpp (rev 0)
+++ trunk/stdair/stdair/bom/InventoryContent.cpp 2009-10-15 09:21:08 UTC (rev 46)
@@ -0,0 +1,20 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STL
+#include <cassert>
+// STDAIR
+#include <stdair/bom/InventoryContent.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ InventoryContent::InventoryContent () {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ InventoryContent::~InventoryContent () {
+ }
+
+}
+
Copied: trunk/stdair/stdair/bom/InventoryContent.hpp (from rev 45, trunk/stdair/stdair/bom/Inventory.hpp)
===================================================================
--- trunk/stdair/stdair/bom/InventoryContent.hpp (rev 0)
+++ trunk/stdair/stdair/bom/InventoryContent.hpp 2009-10-15 09:21:08 UTC (rev 46)
@@ -0,0 +1,50 @@
+#ifndef __STDAIR_BOM_INVENTORYCONTENT_HPP
+#define __STDAIR_BOM_INVENTORYCONTENT_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/BomContent.hpp>
+
+namespace stdair {
+
+ /** Class representing the actual attributes for an airline inventory. */
+ class InventoryContent : public BomContent {
+ public:
+ // /////////// Display support methods /////////
+ /** Dump a Business Object into an output stream.
+ @param ostream& the output stream. */
+ virtual void toStream (std::ostream& ioOut) const = 0;
+
+ /** Read a Business Object from an input stream.
+ @param istream& the input stream. */
+ virtual void fromStream (std::istream& ioIn) = 0;
+
+ /** Get the serialised version of the Business Object. */
+ virtual std::string toString() const = 0;
+
+ /** Get a string describing the whole key (differentiating two objects
+ at any level). */
+ virtual const std::string describeKey() const = 0;
+
+ /** Get a string describing the short key (differentiating two objects
+ at the same level). */
+ virtual const std::string describeShortKey() const = 0;
+
+
+ protected:
+ /** Default constructors. */
+ InventoryContent ();
+ InventoryContent (const InventoryContent&);
+
+ /** Destructor. */
+ virtual ~InventoryContent();
+
+ protected:
+ // Attributes
+ };
+
+}
+#endif // __STDAIR_BOM_INVENTORYCONTENT_HPP
+
Modified: trunk/stdair/stdair/bom/LegCabin.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-14 14:33:39 UTC (rev 45)
+++ trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-15 09:21:08 UTC (rev 46)
@@ -5,7 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
-#include <stdair/bom/BomContent.hpp>
+#include <stdair/bom/LegCabinContent.hpp>
#include <stdair/bom/LegCabinTypes.hpp>
namespace stdair {
@@ -15,7 +15,7 @@
/** Class representing the actual functional/business content for a
leg-date. */
- class LegCabin : public BomContent {
+ class LegCabin : public LegCabinContent {
friend class FacBomContent;
public:
Copied: trunk/stdair/stdair/bom/LegCabinContent.cpp (from rev 45, trunk/stdair/stdair/bom/Inventory.cpp)
===================================================================
--- trunk/stdair/stdair/bom/LegCabinContent.cpp (rev 0)
+++ trunk/stdair/stdair/bom/LegCabinContent.cpp 2009-10-15 09:21:08 UTC (rev 46)
@@ -0,0 +1,20 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STL
+#include <cassert>
+// STDAIR
+#include <stdair/bom/LegCabinContent.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ LegCabinContent::LegCabinContent () {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ LegCabinContent::~LegCabinContent () {
+ }
+
+}
+
Copied: trunk/stdair/stdair/bom/LegCabinContent.hpp (from rev 45, trunk/stdair/stdair/bom/Inventory.hpp)
===================================================================
--- trunk/stdair/stdair/bom/LegCabinContent.hpp (rev 0)
+++ trunk/stdair/stdair/bom/LegCabinContent.hpp 2009-10-15 09:21:08 UTC (rev 46)
@@ -0,0 +1,50 @@
+#ifndef __STDAIR_BOM_LEGCABINCONTENT_HPP
+#define __STDAIR_BOM_LEGCABINCONTENT_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/BomContent.hpp>
+
+namespace stdair {
+
+ /** Class representing the actual attributes for an airline leg-cabin. */
+ class LegCabinContent : public BomContent {
+ public:
+ // /////////// Display support methods /////////
+ /** Dump a Business Object into an output stream.
+ @param ostream& the output stream. */
+ virtual void toStream (std::ostream& ioOut) const = 0;
+
+ /** Read a Business Object from an input stream.
+ @param istream& the input stream. */
+ virtual void fromStream (std::istream& ioIn) = 0;
+
+ /** Get the serialised version of the Business Object. */
+ virtual std::string toString() const = 0;
+
+ /** Get a string describing the whole key (differentiating two objects
+ at any level). */
+ virtual const std::string describeKey() const = 0;
+
+ /** Get a string describing the short key (differentiating two objects
+ at the same level). */
+ virtual const std::string describeShortKey() const = 0;
+
+
+ protected:
+ /** Default constructors. */
+ LegCabinContent ();
+ LegCabinContent (const LegCabinContent&);
+
+ /** Destructor. */
+ virtual ~LegCabinContent();
+
+ protected:
+ // Attributes
+ };
+
+}
+#endif // __STDAIR_BOM_LEGCABINCONTENT_HPP
+
Modified: trunk/stdair/stdair/bom/LegDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/LegDate.hpp 2009-10-14 14:33:39 UTC (rev 45)
+++ trunk/stdair/stdair/bom/LegDate.hpp 2009-10-15 09:21:08 UTC (rev 46)
@@ -5,7 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
-#include <stdair/bom/BomContent.hpp>
+#include <stdair/bom/LegDateContent.hpp>
#include <stdair/bom/LegDateTypes.hpp>
#include <stdair/bom/LegCabinTypes.hpp>
@@ -18,7 +18,7 @@
/** Class representing the actual functional/business content for a
leg-date. */
- class LegDate : public BomContent {
+ class LegDate : public LegDateContent {
friend class FacBomContent;
public:
Copied: trunk/stdair/stdair/bom/LegDateContent.cpp (from rev 45, trunk/stdair/stdair/bom/Inventory.cpp)
===================================================================
--- trunk/stdair/stdair/bom/LegDateContent.cpp (rev 0)
+++ trunk/stdair/stdair/bom/LegDateContent.cpp 2009-10-15 09:21:08 UTC (rev 46)
@@ -0,0 +1,20 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STL
+#include <cassert>
+// STDAIR
+#include <stdair/bom/LegDateContent.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ LegDateContent::LegDateContent () {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ LegDateContent::~LegDateContent () {
+ }
+
+}
+
Copied: trunk/stdair/stdair/bom/LegDateContent.hpp (from rev 45, trunk/stdair/stdair/bom/Inventory.hpp)
===================================================================
--- trunk/stdair/stdair/bom/LegDateContent.hpp (rev 0)
+++ trunk/stdair/stdair/bom/LegDateContent.hpp 2009-10-15 09:21:08 UTC (rev 46)
@@ -0,0 +1,50 @@
+#ifndef __STDAIR_BOM_LEGDATECONTENT_HPP
+#define __STDAIR_BOM_LEGDATECONTENT_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/BomContent.hpp>
+
+namespace stdair {
+
+ /** Class representing the actual attributes for an airline leg-date. */
+ class LegDateContent : public BomContent {
+ public:
+ // /////////// Display support methods /////////
+ /** Dump a Business Object into an output stream.
+ @param ostream& the output stream. */
+ virtual void toStream (std::ostream& ioOut) const = 0;
+
+ /** Read a Business Object from an input stream.
+ @param istream& the input stream. */
+ virtual void fromStream (std::istream& ioIn) = 0;
+
+ /** Get the serialised version of the Business Object. */
+ virtual std::string toString() const = 0;
+
+ /** Get a string describing the whole key (differentiating two objects
+ at any level). */
+ virtual const std::string describeKey() const = 0;
+
+ /** Get a string describing the short key (differentiating two objects
+ at the same level). */
+ virtual const std::string describeShortKey() const = 0;
+
+
+ protected:
+ /** Default constructors. */
+ LegDateContent ();
+ LegDateContent (const LegDateContent&);
+
+ /** Destructor. */
+ virtual ~LegDateContent();
+
+ protected:
+ // Attributes
+ };
+
+}
+#endif // __STDAIR_BOM_LEGDATECONTENT_HPP
+
Modified: trunk/stdair/stdair/bom/SegmentCabin.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-14 14:33:39 UTC (rev 45)
+++ trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-15 09:21:08 UTC (rev 46)
@@ -5,7 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
-#include <stdair/bom/BomContent.hpp>
+#include <stdair/bom/SegmentCabinContent.hpp>
#include <stdair/bom/SegmentCabinTypes.hpp>
#include <stdair/bom/BookingClassTypes.hpp>
@@ -18,7 +18,7 @@
/** Class representing the actual functional/business content for a
segment-date. */
- class SegmentCabin : public BomContent {
+ class SegmentCabin : public SegmentCabinContent {
friend class FacBomContent;
public:
Copied: trunk/stdair/stdair/bom/SegmentCabinContent.cpp (from rev 45, trunk/stdair/stdair/bom/Inventory.cpp)
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabinContent.cpp (rev 0)
+++ trunk/stdair/stdair/bom/SegmentCabinContent.cpp 2009-10-15 09:21:08 UTC (rev 46)
@@ -0,0 +1,20 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STL
+#include <cassert>
+// STDAIR
+#include <stdair/bom/SegmentCabinContent.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ SegmentCabinContent::SegmentCabinContent () {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ SegmentCabinContent::~SegmentCabinContent () {
+ }
+
+}
+
Copied: trunk/stdair/stdair/bom/SegmentCabinContent.hpp (from rev 45, trunk/stdair/stdair/bom/Inventory.hpp)
===================================================================
--- trunk/stdair/stdair/bom/SegmentCabinContent.hpp (rev 0)
+++ trunk/stdair/stdair/bom/SegmentCabinContent.hpp 2009-10-15 09:21:08 UTC (rev 46)
@@ -0,0 +1,50 @@
+#ifndef __STDAIR_BOM_SEGMENTCABINCONTENT_HPP
+#define __STDAIR_BOM_SEGMENTCABINCONTENT_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/BomContent.hpp>
+
+namespace stdair {
+
+ /** Class representing the actual attributes for an airline segment-cabin. */
+ class SegmentCabinContent : public BomContent {
+ public:
+ // /////////// Display support methods /////////
+ /** Dump a Business Object into an output stream.
+ @param ostream& the output stream. */
+ virtual void toStream (std::ostream& ioOut) const = 0;
+
+ /** Read a Business Object from an input stream.
+ @param istream& the input stream. */
+ virtual void fromStream (std::istream& ioIn) = 0;
+
+ /** Get the serialised version of the Business Object. */
+ virtual std::string toString() const = 0;
+
+ /** Get a string describing the whole key (differentiating two objects
+ at any level). */
+ virtual const std::string describeKey() const = 0;
+
+ /** Get a string describing the short key (differentiating two objects
+ at the same level). */
+ virtual const std::string describeShortKey() const = 0;
+
+
+ protected:
+ /** Default constructors. */
+ SegmentCabinContent ();
+ SegmentCabinContent (const SegmentCabinContent&);
+
+ /** Destructor. */
+ virtual ~SegmentCabinContent();
+
+ protected:
+ // Attributes
+ };
+
+}
+#endif // __STDAIR_BOM_SEGMENTCABINCONTENT_HPP
+
Modified: trunk/stdair/stdair/bom/SegmentDate.hpp
===================================================================
--- trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-14 14:33:39 UTC (rev 45)
+++ trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-15 09:21:08 UTC (rev 46)
@@ -5,7 +5,7 @@
// Import section
// //////////////////////////////////////////////////////////////////////
// STDAIR
-#include <stdair/bom/BomContent.hpp>
+#include <stdair/bom/SegmentDateContent.hpp>
#include <stdair/bom/SegmentDateTypes.hpp>
#include <stdair/bom/SegmentCabinTypes.hpp>
@@ -18,7 +18,7 @@
/** Class representing the actual functional/business content for a
segment-date. */
- class SegmentDate : public BomContent {
+ class SegmentDate : public SegmentDateContent {
friend class FacBomContent;
public:
Copied: trunk/stdair/stdair/bom/SegmentDateContent.cpp (from rev 45, trunk/stdair/stdair/bom/Inventory.cpp)
===================================================================
--- trunk/stdair/stdair/bom/SegmentDateContent.cpp (rev 0)
+++ trunk/stdair/stdair/bom/SegmentDateContent.cpp 2009-10-15 09:21:08 UTC (rev 46)
@@ -0,0 +1,20 @@
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STL
+#include <cassert>
+// STDAIR
+#include <stdair/bom/SegmentDateContent.hpp>
+
+namespace stdair {
+
+ // ////////////////////////////////////////////////////////////////////
+ SegmentDateContent::SegmentDateContent () {
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ SegmentDateContent::~SegmentDateContent () {
+ }
+
+}
+
Copied: trunk/stdair/stdair/bom/SegmentDateContent.hpp (from rev 45, trunk/stdair/stdair/bom/Inventory.hpp)
===================================================================
--- trunk/stdair/stdair/bom/SegmentDateContent.hpp (rev 0)
+++ trunk/stdair/stdair/bom/SegmentDateContent.hpp 2009-10-15 09:21:08 UTC (rev 46)
@@ -0,0 +1,50 @@
+#ifndef __STDAIR_BOM_SEGMENTDATECONTENT_HPP
+#define __STDAIR_BOM_SEGMENTDATECONTENT_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// STDAIR
+#include <stdair/bom/BomContent.hpp>
+
+namespace stdair {
+
+ /** Class representing the actual attributes for an airline segment-date. */
+ class SegmentDateContent : public BomContent {
+ public:
+ // /////////// Display support methods /////////
+ /** Dump a Business Object into an output stream.
+ @param ostream& the output stream. */
+ virtual void toStream (std::ostream& ioOut) const = 0;
+
+ /** Read a Business Object from an input stream.
+ @param istream& the input stream. */
+ virtual void fromStream (std::istream& ioIn) = 0;
+
+ /** Get the serialised version of the Business Object. */
+ virtual std::string toString() const = 0;
+
+ /** Get a string describing the whole key (differentiating two objects
+ at any level). */
+ virtual const std::string describeKey() const = 0;
+
+ /** Get a string describing the short key (differentiating two objects
+ at the same level). */
+ virtual const std::string describeShortKey() const = 0;
+
+
+ protected:
+ /** Default constructors. */
+ SegmentDateContent ();
+ SegmentDateContent (const SegmentDateContent&);
+
+ /** Destructor. */
+ virtual ~SegmentDateContent();
+
+ protected:
+ // Attributes
+ };
+
+}
+#endif // __STDAIR_BOM_SEGMENTDATECONTENT_HPP
+
Modified: trunk/stdair/stdair/bom/sources.mk
===================================================================
--- trunk/stdair/stdair/bom/sources.mk 2009-10-14 14:33:39 UTC (rev 45)
+++ trunk/stdair/stdair/bom/sources.mk 2009-10-15 09:21:08 UTC (rev 46)
@@ -12,36 +12,43 @@
$(top_srcdir)/stdair/bom/BomStructureRoot.hpp \
$(top_srcdir)/stdair/bom/BomStructureDummy.hpp \
$(top_srcdir)/stdair/bom/Inventory.hpp \
+ $(top_srcdir)/stdair/bom/InventoryContent.hpp \
$(top_srcdir)/stdair/bom/InventoryTypes.hpp \
$(top_srcdir)/stdair/bom/InventoryList.hpp \
$(top_srcdir)/stdair/bom/InventoryMap.hpp \
$(top_srcdir)/stdair/bom/InventoryStructure.hpp \
$(top_srcdir)/stdair/bom/FlightDate.hpp \
+ $(top_srcdir)/stdair/bom/FlightDateContent.hpp \
$(top_srcdir)/stdair/bom/FlightDateTypes.hpp \
$(top_srcdir)/stdair/bom/FlightDateList.hpp \
$(top_srcdir)/stdair/bom/FlightDateMap.hpp \
$(top_srcdir)/stdair/bom/FlightDateStructure.hpp \
$(top_srcdir)/stdair/bom/SegmentDate.hpp \
+ $(top_srcdir)/stdair/bom/SegmentDateContent.hpp \
$(top_srcdir)/stdair/bom/SegmentDateTypes.hpp \
$(top_srcdir)/stdair/bom/SegmentDateList.hpp \
$(top_srcdir)/stdair/bom/SegmentDateMap.hpp \
$(top_srcdir)/stdair/bom/SegmentDateStructure.hpp \
$(top_srcdir)/stdair/bom/LegDate.hpp \
+ $(top_srcdir)/stdair/bom/LegDateContent.hpp \
$(top_srcdir)/stdair/bom/LegDateTypes.hpp \
$(top_srcdir)/stdair/bom/LegDateList.hpp \
$(top_srcdir)/stdair/bom/LegDateMap.hpp \
$(top_srcdir)/stdair/bom/LegDateStructure.hpp \
$(top_srcdir)/stdair/bom/SegmentCabin.hpp \
+ $(top_srcdir)/stdair/bom/SegmentCabinContent.hpp \
$(top_srcdir)/stdair/bom/SegmentCabinTypes.hpp \
$(top_srcdir)/stdair/bom/SegmentCabinList.hpp \
$(top_srcdir)/stdair/bom/SegmentCabinMap.hpp \
$(top_srcdir)/stdair/bom/SegmentCabinStructure.hpp \
$(top_srcdir)/stdair/bom/LegCabin.hpp \
+ $(top_srcdir)/stdair/bom/LegCabinContent.hpp \
$(top_srcdir)/stdair/bom/LegCabinTypes.hpp \
$(top_srcdir)/stdair/bom/LegCabinList.hpp \
$(top_srcdir)/stdair/bom/LegCabinMap.hpp \
$(top_srcdir)/stdair/bom/LegCabinStructure.hpp \
$(top_srcdir)/stdair/bom/BookingClass.hpp \
+ $(top_srcdir)/stdair/bom/BookingClassContent.hpp \
$(top_srcdir)/stdair/bom/BookingClassTypes.hpp \
$(top_srcdir)/stdair/bom/BookingClassList.hpp \
$(top_srcdir)/stdair/bom/BookingClassMap.hpp \
@@ -54,24 +61,31 @@
$(top_srcdir)/stdair/bom/BomIterator.hpp
bom_cc_sources = \
$(top_srcdir)/stdair/bom/Inventory.cpp \
+ $(top_srcdir)/stdair/bom/InventoryContent.cpp \
$(top_srcdir)/stdair/bom/InventoryList.cpp \
$(top_srcdir)/stdair/bom/InventoryMap.cpp \
$(top_srcdir)/stdair/bom/FlightDate.cpp \
+ $(top_srcdir)/stdair/bom/FlightDateContent.cpp \
$(top_srcdir)/stdair/bom/FlightDateList.cpp \
$(top_srcdir)/stdair/bom/FlightDateMap.cpp \
$(top_srcdir)/stdair/bom/SegmentDate.cpp \
+ $(top_srcdir)/stdair/bom/SegmentDateContent.cpp \
$(top_srcdir)/stdair/bom/SegmentDateList.cpp \
$(top_srcdir)/stdair/bom/SegmentDateMap.cpp \
$(top_srcdir)/stdair/bom/LegDate.cpp \
+ $(top_srcdir)/stdair/bom/LegDateContent.cpp \
$(top_srcdir)/stdair/bom/LegDateList.cpp \
$(top_srcdir)/stdair/bom/LegDateMap.cpp \
$(top_srcdir)/stdair/bom/SegmentCabin.cpp \
+ $(top_srcdir)/stdair/bom/SegmentCabinContent.cpp \
$(top_srcdir)/stdair/bom/SegmentCabinList.cpp \
$(top_srcdir)/stdair/bom/SegmentCabinMap.cpp \
$(top_srcdir)/stdair/bom/LegCabin.cpp \
+ $(top_srcdir)/stdair/bom/LegCabinContent.cpp \
$(top_srcdir)/stdair/bom/LegCabinList.cpp \
$(top_srcdir)/stdair/bom/LegCabinMap.cpp \
$(top_srcdir)/stdair/bom/BookingClass.cpp \
+ $(top_srcdir)/stdair/bom/BookingClassContent.cpp \
$(top_srcdir)/stdair/bom/BookingClassList.cpp \
$(top_srcdir)/stdair/bom/BookingClassMap.cpp
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|