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...> - 2010-06-13 14:07:42
|
Revision: 195 http://stdair.svn.sourceforge.net/stdair/?rev=195&view=rev Author: denis_arnaud Date: 2010-06-13 14:07:35 +0000 (Sun, 13 Jun 2010) Log Message: ----------- [Test] Updated the dependency for the new ExtraCPPUnit library name. Modified Paths: -------------- trunk/stdair/configure.ac Modified: trunk/stdair/configure.ac =================================================================== --- trunk/stdair/configure.ac 2010-06-13 14:01:52 UTC (rev 194) +++ trunk/stdair/configure.ac 2010-06-13 14:07:35 UTC (rev 195) @@ -105,6 +105,17 @@ CXXFLAGS="-g -Wall" fi +# ----------------------------------------------------------------------------- +# Support for ExtraCC (Extra-CruiseControl): http://sf.net/projects/extracc +# ----------------------------------------------------------------------------- +# Note: the ExtraCC is now imported as a Subversion external reference, +# thus directly accessible within the extracppunit directory. +# When that library will be widely avaible on Linux distributions, +# the external reference can be removed and the following line uncommented. +#AM_PATH_EXTRACC +#AC_SUBST(EXTRACC_VERSION) +#AC_SUBST(EXTRACC_CFLAGS) +#AC_SUBST(EXTRACC_LIBS) # -------------------------------------------------------- # Boost (STL Extensions: http://www.boost.org) @@ -290,6 +301,11 @@ o SOCI_CFLAGS ..... : ${SOCI_CFLAGS} o SOCI_LIBS ....... : ${SOCI_LIBS} + - ExtraCC ........... : + o EXTRACC_VERSION . : ${EXTRACC_VERSION} + o EXTRACC_CFLAGS .. : ${EXTRACC_CFLAGS} + o EXTRACC_LIBS .... : ${EXTRACC_LIBS} + - CPPUNIT ........... : o CPPUNIT_VERSION . : ${CPPUNIT_VERSION} o CPPUNIT_CFLAGS .. : ${CPPUNIT_CFLAGS} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2010-06-13 14:01:59
|
Revision: 194 http://stdair.svn.sourceforge.net/stdair/?rev=194&view=rev Author: denis_arnaud Date: 2010-06-13 14:01:52 +0000 (Sun, 13 Jun 2010) Log Message: ----------- [Test] Updated the dependency for the new ExtraCPPUnit library name. Modified Paths: -------------- trunk/stdair/test/stdair/Makefile.am Modified: trunk/stdair/test/stdair/Makefile.am =================================================================== --- trunk/stdair/test/stdair/Makefile.am 2010-06-10 17:17:33 UTC (rev 193) +++ trunk/stdair/test/stdair/Makefile.am 2010-06-13 14:01:52 UTC (rev 194) @@ -24,5 +24,6 @@ StandardAirlineITTestSuite_CXXFLAGS= $(BOOST_CFLAGS) $(CPPUNIT_CFLAGS) StandardAirlineITTestSuite_LDADD = StandardAirlineITTestSuite_LDFLAGS = $(BOOST_LIBS) $(CPPUNIT_LIBS) \ - $(top_builddir)/extracppunit/libextracc-extracppunit.la \ + $(top_builddir)/extracppunit/libextracppunit.la \ $(top_builddir)/stdair/core/libstdair.la + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2010-06-10 17:17:39
|
Revision: 193 http://stdair.svn.sourceforge.net/stdair/?rev=193&view=rev Author: denis_arnaud Date: 2010-06-10 17:17:33 +0000 (Thu, 10 Jun 2010) Log Message: ----------- [Config] Added the MPI C library in the linker flags (MPIGEN_LIBS+=-lmpi). Modified Paths: -------------- trunk/stdair/config/mpich2.m4 trunk/stdair/config/openmpi.m4 Modified: trunk/stdair/config/mpich2.m4 =================================================================== --- trunk/stdair/config/mpich2.m4 2010-06-08 09:17:25 UTC (rev 192) +++ trunk/stdair/config/mpich2.m4 2010-06-10 17:17:33 UTC (rev 193) @@ -200,7 +200,7 @@ # Derive the flags for compilation and linking # MPICH2_CFLAGS="-I${MPICH2_incdir} ${MODEFLAG}" - MPICH2_LIBS="-L${MPICH2_libdir} -lmpichcxx" + MPICH2_LIBS="-L${MPICH2_libdir} -lmpichcxx -lmpich" # # Make the changes permanent @@ -217,7 +217,7 @@ save_LIBS="$LIBS" if test -z "$MPICH2_LIBS" then - MPICH2_LIBS="-L/usr/lib${MODE}/mpich2 -lmpich" + MPICH2_LIBS="-L/usr/lib${MODE}/mpich2 -lmpichcxx -lmpich" fi LIBS="$LIBS $MPICH2_LIBS" AC_CHECK_LIB($MPICH2_LIBC, MPID_Comm_direct, Modified: trunk/stdair/config/openmpi.m4 =================================================================== --- trunk/stdair/config/openmpi.m4 2010-06-08 09:17:25 UTC (rev 192) +++ trunk/stdair/config/openmpi.m4 2010-06-10 17:17:33 UTC (rev 193) @@ -199,7 +199,7 @@ # Derive the flags for compilation and linking # OPENMPI_CFLAGS="-I${OPENMPI_incdir} -I${OPENMPI_incdir}/openmpi -I${OPENMPI_incdir}/${MODE} ${MODEFLAG}" - OPENMPI_LIBS="-L${OPENMPI_libdir} -lmpi_cxx" + OPENMPI_LIBS="-L${OPENMPI_libdir} -lmpi_cxx -lmpi" # # Make the changes permanent @@ -216,7 +216,7 @@ save_LIBS="$LIBS" if test -z "$OPENMPI_LIBS" then - OPENMPI_LIBS="-L/usr/lib${MODE}/openmpi/${MPIDIR} -lmpi_cxx" + OPENMPI_LIBS="-L/usr/lib${MODE}/openmpi/${MPIDIR} -lmpi_cxx -lmpi" fi LIBS="$LIBS $OPENMPI_LIBS" AC_CHECK_LIB($OPENMPI_LIB, ompi_mpi_char, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2010-06-08 09:17:31
|
Revision: 192 http://stdair.svn.sourceforge.net/stdair/?rev=192&view=rev Author: denis_arnaud Date: 2010-06-08 09:17:25 +0000 (Tue, 08 Jun 2010) Log Message: ----------- [Dev] The insertion of an element in the map of children now returns an actual boolean value when the holder is a multimap. Modified Paths: -------------- trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp Modified: trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp =================================================================== --- trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2010-06-08 09:07:39 UTC (rev 191) +++ trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2010-06-08 09:17:25 UTC (rev 192) @@ -150,9 +150,11 @@ /** Internal insertion function into a multimap. */ const bool insert (const MapKey_T& iKey, const Structure_T& iStructure, std::multimap<const MapKey_T, const Structure_T*>& ioMap){ - ioMap.insert (typename std::multimap<const MapKey_T, const Structure_T*>:: - value_type (iKey, &iStructure)); - return true; + const bool hasInsertionBeenSuccessful = + (ioMap.insert (typename std::multimap<const MapKey_T, const Structure_T*>:: + value_type (iKey, &iStructure))) != (ioMap.end()); + + return hasInsertionBeenSuccessful; } private: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2010-06-08 09:07:46
|
Revision: 191 http://stdair.svn.sourceforge.net/stdair/?rev=191&view=rev Author: quannaus Date: 2010-06-08 09:07:39 +0000 (Tue, 08 Jun 2010) Log Message: ----------- [Dev] Add multimap into BomChildrenHolder. Modified Paths: -------------- trunk/stdair/stdair/bom/AirlineFeature.hpp trunk/stdair/stdair/bom/AirportDate.cpp trunk/stdair/stdair/bom/AirportDate.hpp trunk/stdair/stdair/bom/BomChildrenHolder.hpp trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp trunk/stdair/stdair/bom/BomList.hpp trunk/stdair/stdair/bom/BomMap.hpp trunk/stdair/stdair/bom/BomRoot.hpp trunk/stdair/stdair/bom/BomSource.hpp trunk/stdair/stdair/bom/BookingClass.hpp trunk/stdair/stdair/bom/Bucket.hpp trunk/stdair/stdair/bom/DemandStream.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/Network.hpp trunk/stdair/stdair/bom/NetworkDate.hpp trunk/stdair/stdair/bom/OutboundPath.hpp trunk/stdair/stdair/bom/OutboundPathTypes.hpp trunk/stdair/stdair/bom/SegmentCabin.hpp trunk/stdair/stdair/bom/SegmentDate.hpp trunk/stdair/stdair/bom/Structure.hpp trunk/stdair/stdair/bom/YieldStore.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/BomMultimap.hpp Modified: trunk/stdair/stdair/bom/AirlineFeature.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeature.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/AirlineFeature.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -29,6 +29,10 @@ BOM content type. */ typedef BomRoot Parent_T; + /** Definition allowing to retrieve the map/multimap type using by + BomChildrenHolder. */ + typedef std::map<const MapKey_T, const Structure_T*> Map_T; + /** Define the list of children holder types. */ typedef boost::fusion::map< > ChildrenHolderMap_T; // ////////////////////////////////////////////////////////////////// Modified: trunk/stdair/stdair/bom/AirportDate.cpp =================================================================== --- trunk/stdair/stdair/bom/AirportDate.cpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/AirportDate.cpp 2010-06-08 09:07:39 UTC (rev 191) @@ -54,7 +54,7 @@ } // //////////////////////////////////////////////////////////////////// - OutboundPathMap_T AirportDate::getOutboundPathMap () const { + OutboundPathMultimap_T AirportDate::getOutboundPathMultimap () const { return _structure.getChildrenHolder<OutboundPath>(); } Modified: trunk/stdair/stdair/bom/AirportDate.hpp =================================================================== --- trunk/stdair/stdair/bom/AirportDate.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/AirportDate.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -31,6 +31,10 @@ BOM content type. */ typedef NetworkDate Parent_T; + /** Definition allowing to retrieve the map/multimap type using by + BomChildrenHolder. */ + typedef std::map<const MapKey_T, const Structure_T*> Map_T; + /** Define the list of children holder types. */ typedef boost::fusion::map< boost::fusion::pair<OutboundPath, OutboundPathHolder_T*> @@ -41,7 +45,7 @@ // /////////// Getters ///////////// /** Get a list or map of a children type for iteration methods. */ OutboundPathList_T getOutboundPathList () const; - OutboundPathMap_T getOutboundPathMap () const; + OutboundPathMultimap_T getOutboundPathMultimap () const; /** Get the OutboundPathListList. */ const OutboundPathListList_T& getOutboundPathListList () const { Modified: trunk/stdair/stdair/bom/BomChildrenHolder.hpp =================================================================== --- trunk/stdair/stdair/bom/BomChildrenHolder.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/BomChildrenHolder.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -47,7 +47,6 @@ /** Default constructors. */ BomChildrenHolder () { } BomChildrenHolder (const BomChildrenHolder&); - /** Destructor. */ ~BomChildrenHolder() { } Modified: trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp =================================================================== --- trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -27,7 +27,8 @@ public: /** Define lists of children BOM structures. */ typedef std::vector<const Structure_T*> BomChildrenList_T; - typedef std::map<const std::string, const Structure_T*> BomChildrenMap_T; + /** Retrieve the map type of children BOM structures. */ + typedef typename CONTENT::Map_T BomChildrenMap_T; /** Define the different types of iterators. */ typedef BomIterator_T<CONTENT, @@ -115,18 +116,44 @@ MapReverseIterator_T mapREnd () const { return _bomChildrenMap.rend(); } - // /////////// Other operators ///////////// /** Get the size of the list. */ const unsigned int size () const { - return _bomChildrenMap.size(); + return _bomChildrenList.size(); } /** Retrieve, if existing, the bom corresponding to the given key. */ MapIterator_T find (const MapKey_T& iKey) const { return _bomChildrenMap.find (iKey); } + + private: + /** Insert an element to the list and the map. */ + const bool insert (const MapKey_T& iKey, const Structure_T& iStructure) { + const bool hasInsertionSuccessful = insert (iKey, iStructure, + _bomChildrenMap); + if (hasInsertionSuccessful == true) { + _bomChildrenList.push_back (&iStructure); + } + + return hasInsertionSuccessful; + } + + /** Internal insertion function into a map. */ + const bool insert (const MapKey_T& iKey, const Structure_T& iStructure, + std::map<const MapKey_T, const Structure_T*>& ioMap) { + return ioMap.insert (typename std::map<const MapKey_T,const Structure_T*>:: + value_type (iKey, &iStructure)).second; + } + + /** Internal insertion function into a multimap. */ + const bool insert (const MapKey_T& iKey, const Structure_T& iStructure, + std::multimap<const MapKey_T, const Structure_T*>& ioMap){ + ioMap.insert (typename std::multimap<const MapKey_T, const Structure_T*>:: + value_type (iKey, &iStructure)); + return true; + } private: /** Constructors are private so as to force the usage of the Factory @@ -140,10 +167,10 @@ private: ///////////// Attributes ////////////// /** List of children BOM structures. */ - BomChildrenMap_T _bomChildrenMap; + BomChildrenList_T _bomChildrenList; /** Map of children BOM structures with their key. */ - BomChildrenList_T _bomChildrenList; + BomChildrenMap_T _bomChildrenMap; }; } Modified: trunk/stdair/stdair/bom/BomList.hpp =================================================================== --- trunk/stdair/stdair/bom/BomList.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/BomList.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -61,7 +61,6 @@ BomList_T (); BomList_T (const BomList_T& iBomList) : _bomHolder (iBomList._bomHolder) { } BomList_T (const BomHolder_T& iBomHolder) : _bomHolder (iBomHolder) { } - /** Destructor. */ ~BomList_T() { } Modified: trunk/stdair/stdair/bom/BomMap.hpp =================================================================== --- trunk/stdair/stdair/bom/BomMap.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/BomMap.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -57,14 +57,15 @@ /** Retrieve, if existing, the Inventory corresponding to the given key. */ - iterator find (const MapKey_T& iKey) const { return _bomHolder.find (iKey); } + 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() { } Copied: trunk/stdair/stdair/bom/BomMultimap.hpp (from rev 190, trunk/stdair/stdair/bom/BomMap.hpp) =================================================================== --- trunk/stdair/stdair/bom/BomMultimap.hpp (rev 0) +++ trunk/stdair/stdair/bom/BomMultimap.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -0,0 +1,82 @@ +#ifndef __STDAIR_BOM_BOMMULTIMAP_HPP +#define __STDAIR_BOM_BOMMULTIMAP_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <map> + +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 multimap. */ + template <typename BOM> struct BomMultimap_T { + + public: + /** Definition that allows to retrieve the corresponding Structure + associated to the BOM. */ + typedef typename BOM::Structure_T Structure_T; + /** Define the multimap of bom objects. */ + typedef std::multimap<const MapKey_T, + const Structure_T*> StructureMultimap_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 multimap iterators. */ + typedef BomIterator_T<BOM, + typename StructureMultimap_T::const_iterator> iterator; + typedef BomIterator_T<BOM, + typename StructureMultimap_T::const_reverse_iterator + > reverse_iterator; + // ///////////////////////////////////////////////////////////////////////// + + public: + // /////////// Iteration methods ////////// + /** Initialise the internal iterator on flight date: + return the iterator at the begining of the multimap. */ + iterator begin () const { return _bomHolder.mapBegin(); } + + /** Initialise the internal iterator on flight date: + return the iterator at the end of the multimap. */ + iterator end () const { return _bomHolder.mapEnd(); } + + /** Initialise the internal reverse iterator on flight date: + return the reverse iterator at the rbegining of the multimap. */ + reverse_iterator rbegin () const { return _bomHolder.mapRBegin(); } + + /** Initialise the internal reverse iterator on flight date: + return the reverse iterator at the end of the multimap. */ + 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. */ + BomMultimap_T (); + BomMultimap_T (const BomMultimap_T& iBomMultimap) + : _bomHolder (iBomMultimap._bomHolder) { } + BomMultimap_T (const BomHolder_T& iBomHolder) : _bomHolder (iBomHolder) { } + /** Destructor. */ + ~BomMultimap_T() { } + + private: + // Attributes + /** Reference structure. */ + const BomHolder_T& _bomHolder; + }; + +} +#endif // __STDAIR_BOM_BOMMULTIMULTIMAP_HPP + Modified: trunk/stdair/stdair/bom/BomRoot.hpp =================================================================== --- trunk/stdair/stdair/bom/BomRoot.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/BomRoot.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -29,6 +29,8 @@ the stdair namespace</li> <li>Parent_T: Type corresponding to the parent BOM class within that namespace (e.g., AIRSCHED here)</li> + <li>Map_T: Type corresponding to the map/multimap type using by the + corresponding BomChildrenHolder <li>ChildrenHolderMap_T: The map between the type of children and a pointer to the bom holder of this type (e.g., AIRSCHED here). All the pointers to the bom holder should be initialised to @@ -46,6 +48,10 @@ /** Definition allowing to retrieve the parent type. */ typedef BomRoot Parent_T; + /** Definition allowing to retrieve the map/multimap type using by + BomChildrenHolder. */ + typedef std::map<const MapKey_T, const Structure_T*> Map_T; + /** Define the list of children holder types. */ typedef boost::fusion::map< boost::fusion::pair<Inventory, InventoryHolder_T*>, Modified: trunk/stdair/stdair/bom/BomSource.hpp =================================================================== --- trunk/stdair/stdair/bom/BomSource.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/BomSource.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -7,6 +7,7 @@ #include <stdair/bom/Structure.hpp> #include <stdair/bom/BomChildrenHolderImp.hpp> #include <stdair/bom/BomMap.hpp> +#include <stdair/bom/BomMultimap.hpp> #include <stdair/bom/BomList.hpp> #include <stdair/bom/BomRoot.hpp> #include <stdair/bom/Network.hpp> Modified: trunk/stdair/stdair/bom/BookingClass.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClass.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/BookingClass.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -29,6 +29,10 @@ BOM content type. */ typedef SegmentCabin Parent_T; + /** Definition allowing to retrieve the map/multimap type using by + BomChildrenHolder. */ + typedef std::map<const MapKey_T, const Structure_T*> Map_T; + /** Define the list of children holder types. */ typedef boost::fusion::map< > ChildrenHolderMap_T; // ////////////////////////////////////////////////////////////////// Modified: trunk/stdair/stdair/bom/Bucket.hpp =================================================================== --- trunk/stdair/stdair/bom/Bucket.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/Bucket.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -27,6 +27,10 @@ /** Definition allowing to retrieve the associated parent. */ typedef LegCabin Parent_T; + + /** Definition allowing to retrieve the map/multimap type using by + BomChildrenHolder. */ + typedef std::map<const MapKey_T, const Structure_T*> Map_T; /** Define the list of children holder types. */ typedef boost::fusion::map< > ChildrenHolderMap_T; Modified: trunk/stdair/stdair/bom/DemandStream.hpp =================================================================== --- trunk/stdair/stdair/bom/DemandStream.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/DemandStream.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -28,6 +28,10 @@ BOM content type. */ typedef BomRoot Parent_T; + /** Definition allowing to retrieve the map/multimap type using by + BomChildrenHolder. */ + typedef std::map<const MapKey_T, const Structure_T*> Map_T; + /** Define the list of children holder types. */ typedef boost::fusion::map< > ChildrenHolderMap_T; // ////////////////////////////////////////////////////////////////// Modified: trunk/stdair/stdair/bom/FlightDate.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/FlightDate.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -35,6 +35,10 @@ BOM content type. */ typedef Inventory Parent_T; + /** Definition allowing to retrieve the map/multimap type using by + BomChildrenHolder. */ + typedef std::map<const MapKey_T, const Structure_T*> Map_T; + /** Define the list of children holder types. */ typedef boost::fusion::map< boost::fusion::pair<LegDate, LegDateHolder_T*>, Modified: trunk/stdair/stdair/bom/Inventory.hpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/Inventory.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -33,6 +33,10 @@ BOM content type. */ typedef BomRoot Parent_T; + /** Definition allowing to retrieve the map/multimap type using by + BomChildrenHolder. */ + typedef std::map<const MapKey_T, const Structure_T*> Map_T; + /** Define the list of children holder types. */ typedef boost::fusion::map< boost::fusion::pair<FlightDate, FlightDateHolder_T*> Modified: trunk/stdair/stdair/bom/LegCabin.hpp =================================================================== --- trunk/stdair/stdair/bom/LegCabin.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/LegCabin.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -33,6 +33,10 @@ BOM content type. */ typedef LegDate Parent_T; + /** Definition allowing to retrieve the map/multimap type using by + BomChildrenHolder. */ + typedef std::map<const MapKey_T, const Structure_T*> Map_T; + /** Define the list of children holder types. */ typedef boost::fusion::map< boost::fusion::pair<Bucket, BucketHolder_T*>, Modified: trunk/stdair/stdair/bom/LegDate.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDate.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/LegDate.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -33,6 +33,10 @@ BOM content type. */ typedef FlightDate Parent_T; + /** Definition allowing to retrieve the map/multimap type using by + BomChildrenHolder. */ + typedef std::map<const MapKey_T, const Structure_T*> Map_T; + /** Define the list of children holder types. */ typedef boost::fusion::map< boost::fusion::pair<LegCabin, LegCabinHolder_T*>, Modified: trunk/stdair/stdair/bom/Network.hpp =================================================================== --- trunk/stdair/stdair/bom/Network.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/Network.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -31,6 +31,10 @@ BOM content type. */ typedef BomRoot Parent_T; + /** Definition allowing to retrieve the map/multimap type using by + BomChildrenHolder. */ + typedef std::map<const MapKey_T, const Structure_T*> Map_T; + /** Define the list of children holder types. */ typedef boost::fusion::map< boost::fusion::pair<NetworkDate, NetworkDateHolder_T*> Modified: trunk/stdair/stdair/bom/NetworkDate.hpp =================================================================== --- trunk/stdair/stdair/bom/NetworkDate.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/NetworkDate.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -31,6 +31,10 @@ BOM content type. */ typedef Network Parent_T; + /** Definition allowing to retrieve the map/multimap type using by + BomChildrenHolder. */ + typedef std::map<const MapKey_T, const Structure_T*> Map_T; + /** Define the list of children holder types. */ typedef boost::fusion::map< boost::fusion::pair<AirportDate, AirportDateHolder_T*> Modified: trunk/stdair/stdair/bom/OutboundPath.hpp =================================================================== --- trunk/stdair/stdair/bom/OutboundPath.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/OutboundPath.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -31,6 +31,10 @@ BOM content type. */ typedef AirportDate Parent_T; + /** Definition allowing to retrieve the map/multimap type using by + BomChildrenHolder. */ + typedef std::multimap<const MapKey_T, const Structure_T*> Map_T; + /** Define the list of children holder types. */ typedef boost::fusion::map< boost::fusion::pair<SegmentDate, SegmentDateHolder_T*> Modified: trunk/stdair/stdair/bom/OutboundPathTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/OutboundPathTypes.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/OutboundPathTypes.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -15,7 +15,7 @@ template <typename CONTENT> class Structure; template <typename CONTENT> class BomChildrenHolderImp; template <typename BOM> struct BomList_T; - template <typename BOM> struct BomMap_T; + template <typename BOM> struct BomMultimap_T; class OutboundPath; /** Define the outbound path structure. */ @@ -28,7 +28,7 @@ typedef BomList_T<OutboundPath> OutboundPathList_T; /** Define the outbound path map. */ - typedef BomMap_T<OutboundPath> OutboundPathMap_T; + typedef BomMultimap_T<OutboundPath> OutboundPathMultimap_T; typedef std::vector<std::vector<stdair::OutboundPath*> >OutboundPathListList_T; typedef std::vector<stdair::OutboundPath*> OutboundPathLightList_T; Modified: trunk/stdair/stdair/bom/SegmentCabin.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentCabin.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/SegmentCabin.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -33,6 +33,10 @@ BOM content type. */ typedef SegmentDate Parent_T; + /** Definition allowing to retrieve the map/multimap type using by + BomChildrenHolder. */ + typedef std::map<const MapKey_T, const Structure_T*> Map_T; + /** Define the list of children holder types. */ typedef boost::fusion::map< boost::fusion::pair<BookingClass, BookingClassHolder_T*>, Modified: trunk/stdair/stdair/bom/SegmentDate.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDate.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/SegmentDate.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -33,6 +33,10 @@ BOM content type. */ typedef FlightDate Parent_T; + /** Definition allowing to retrieve the map/multimap type using by + BomChildrenHolder. */ + typedef std::map<const MapKey_T, const Structure_T*> Map_T; + /** Define the list of children holder types. */ typedef boost::fusion::map< boost::fusion::pair<SegmentCabin, SegmentCabinHolder_T*>, Modified: trunk/stdair/stdair/bom/Structure.hpp =================================================================== --- trunk/stdair/stdair/bom/Structure.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/Structure.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -16,6 +16,7 @@ // Forward declarations. template <typename CONTENT> class BomChildrenHolderImp; template <typename CONTENT> class BomMap_T; + template <typename CONTENT> class BomMultimap_T; template <typename CONTENT> class BomList_T; /** Wrapper class aimed at holding the actual content, modeled @@ -80,9 +81,10 @@ boost::fusion::at_key<CHILD> (_holderMap); if (lHolder_ptr != NULL) { + // Look for the child in the map, then in the multimap BomMap_T<CHILD> lChildrenMap (*lHolder_ptr); typename BomMap_T<CHILD>::iterator itContentChild = - lChildrenMap.find (iKey); + lChildrenMap.find (iKey); if (itContentChild != lChildrenMap.end()) { oContentChild_ptr = itContentChild->second; } @@ -95,15 +97,17 @@ template <typename CHILD> CHILD& getChild (const MapKey_T& iKey) const { CHILD* lChild_ptr = NULL; - - BomMap_T<CHILD> lChildrenMap (getChildrenHolder<CHILD>()); + const BomChildrenHolderImp<CHILD>& lHolder = getChildrenHolder<CHILD>(); + BomMap_T<CHILD> lChildrenMap (lHolder); + typename BomMap_T<CHILD>::iterator itContentChild = lChildrenMap.find (iKey); if (itContentChild != lChildrenMap.end()) { lChild_ptr = itContentChild->second; } + assert (lChild_ptr != NULL); return *lChild_ptr; } Modified: trunk/stdair/stdair/bom/YieldStore.hpp =================================================================== --- trunk/stdair/stdair/bom/YieldStore.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/YieldStore.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -28,6 +28,10 @@ /** Definition allowing to retrieve the associated parent. */ typedef BomRoot Parent_T; + + /** Definition allowing to retrieve the map/multimap type using by + BomChildrenHolder. */ + typedef std::map<const MapKey_T, const Structure_T*> Map_T; /** Define the list of children holder types. */ typedef boost::fusion::map< > ChildrenHolderMap_T; Modified: trunk/stdair/stdair/bom/sources.mk =================================================================== --- trunk/stdair/stdair/bom/sources.mk 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/bom/sources.mk 2010-06-08 09:07:39 UTC (rev 191) @@ -10,6 +10,7 @@ $(top_srcdir)/stdair/bom/BomChildrenHolderImp.hpp \ $(top_srcdir)/stdair/bom/BomList.hpp \ $(top_srcdir)/stdair/bom/BomMap.hpp \ + $(top_srcdir)/stdair/bom/BomMultimap.hpp \ $(top_srcdir)/stdair/bom/BomIterator.hpp \ $(top_srcdir)/stdair/bom/BomRootKey.hpp \ $(top_srcdir)/stdair/bom/YieldStoreKey.hpp \ Modified: trunk/stdair/stdair/factory/FacBomContent.hpp =================================================================== --- trunk/stdair/stdair/factory/FacBomContent.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/factory/FacBomContent.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -68,9 +68,6 @@ ioChild._structure); if (hasLinkBeenSuccessful == false) { - std::cout << "link with parent" << std::endl; - std::cout << ioParent.describeKey() << std::endl; - std::cout << ioChild.describeShortKey() << std::endl; throw ObjectLinkingException(); } } @@ -173,7 +170,7 @@ <br>This constructor is protected to ensure the class is content. */ FacBomContent() {} /** Destructor. */ - virtual ~FacBomContent(); + ~FacBomContent(); /** Destroyed all the object instantiated by this factory. */ void clean(); Modified: trunk/stdair/stdair/factory/FacBomStructure.hpp =================================================================== --- trunk/stdair/stdair/factory/FacBomStructure.hpp 2010-05-26 13:13:51 UTC (rev 190) +++ trunk/stdair/stdair/factory/FacBomStructure.hpp 2010-06-08 09:07:39 UTC (rev 191) @@ -122,16 +122,9 @@ // Insert the structure object in the dedicated lists typedef typename HOLDER_T::BomChildrenMap_T BOM_MAP_T; - const bool hasInsertBeenSuccessful = ioHolder._bomChildrenMap. - insert (typename BOM_MAP_T::value_type (lKeyStr, &iStructure)).second; - - if (hasInsertBeenSuccessful == false) { - return hasInsertBeenSuccessful; - } - - ioHolder._bomChildrenList.push_back (&iStructure); - - return true; + const bool hasInsertBeenSuccessful = ioHolder.insert (lKeyStr, iStructure); + + return hasInsertBeenSuccessful; } // ////////////////////////////////////////////////////////////////// @@ -150,16 +143,9 @@ // Insert the structure object in the dedicated lists typedef typename HOLDER_T::BomChildrenMap_T BOM_MAP_T; - const bool hasInsertBeenSuccessful = ioHolder._bomChildrenMap. - insert (typename BOM_MAP_T::value_type (lKeyStr, &iStructure)).second; - - if (hasInsertBeenSuccessful == false) { - return hasInsertBeenSuccessful; - } - - ioHolder._bomChildrenList.push_back (&iStructure); - - return true; + const bool hasInsertBeenSuccessful = ioHolder.insert (lKeyStr, iStructure); + + return hasInsertBeenSuccessful; } // ////////////////////////////////////////////////////////////////// This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2010-05-26 13:14:00
|
Revision: 190 http://stdair.svn.sourceforge.net/stdair/?rev=190&view=rev Author: quannaus Date: 2010-05-26 13:13:51 +0000 (Wed, 26 May 2010) Log Message: ----------- [Dev] Fixed a bug in the cloning process in FacBomContent.hpp Modified Paths: -------------- trunk/stdair/stdair/bom/OutboundPath.cpp trunk/stdair/stdair/bom/OutboundPath.hpp trunk/stdair/stdair/bom/SegmentDate.cpp trunk/stdair/stdair/factory/FacBomContent.hpp trunk/stdair/stdair/factory/FacBomStructure.hpp Modified: trunk/stdair/stdair/bom/OutboundPath.cpp =================================================================== --- trunk/stdair/stdair/bom/OutboundPath.cpp 2010-05-03 14:57:07 UTC (rev 189) +++ trunk/stdair/stdair/bom/OutboundPath.cpp 2010-05-26 13:13:51 UTC (rev 190) @@ -189,7 +189,8 @@ } // //////////////////////////////////////////////////////////////////// - const Duration_T OutboundPath::calculateElapsedTimeFromRouting () const { + const Duration_T OutboundPath:: + calculateElapsedTimeFromRouting (const SegmentDate& iSegmentDate) const { const SegmentDateList_T& lAllSegmentList = getSegmentDateList(); SegmentDateList_T::iterator itSegmentDate = lAllSegmentList.begin(); @@ -228,7 +229,15 @@ lCurrentSegmentDate_ptr->getElapsedTime(); oElapsedTime += currentElapsedTime; } - + + SegmentDateList_T::reverse_iterator itLastSegmentDate = + lAllSegmentList.rbegin(); + const SegmentDate& lLastSegmentDate = *itLastSegmentDate; + const Duration_T& lLastStop = iSegmentDate.getBoardingTime() + - lLastSegmentDate.getOffTime(); + oElapsedTime += lLastStop; + oElapsedTime += iSegmentDate.getElapsedTime(); + // Store the result return oElapsedTime; } Modified: trunk/stdair/stdair/bom/OutboundPath.hpp =================================================================== --- trunk/stdair/stdair/bom/OutboundPath.hpp 2010-05-03 14:57:07 UTC (rev 189) +++ trunk/stdair/stdair/bom/OutboundPath.hpp 2010-05-26 13:13:51 UTC (rev 190) @@ -98,7 +98,7 @@ <br>Of course, in case of mono-segment outbound pathes, there is no stop-over, and the elapsed time of the outbound-path is equal to the elapsed time of the single routing segment. */ - const Duration_T calculateElapsedTimeFromRouting ()const; + const Duration_T calculateElapsedTimeFromRouting (const SegmentDate&) const; /** Update Airline Code. */ void updateAirlineCode (); Modified: trunk/stdair/stdair/bom/SegmentDate.cpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDate.cpp 2010-05-03 14:57:07 UTC (rev 189) +++ trunk/stdair/stdair/bom/SegmentDate.cpp 2010-05-26 13:13:51 UTC (rev 190) @@ -79,20 +79,26 @@ bool SegmentDate:: isConnectable (const SegmentDate& iSegmentDate) const { bool oIsConnectable = false; - - const Date_T& lOffDate = getOffDate(); - const Date_T& lBoardingDate = iSegmentDate.getBoardingDate(); - const DateOffSet_T lDateOffSet = lBoardingDate - lOffDate; - const Duration_T lDateOffSetInHours (lDateOffSet.days() * 24, 0, 0); - - const Duration_T& lOffTime = getOffTime(); - const Duration_T& lBoardingTime = iSegmentDate.getBoardingTime(); - - const Duration_T lStopOverTime = - lBoardingTime - lOffTime + lDateOffSetInHours; - oIsConnectable = lStopOverTime >= DEFAULT_MINIMUM_CONNECTION_TIME; + const AirportCode_T lOffPoint = getOffPoint(); + const AirportCode_T lBoardingPointOfNextSegment = + iSegmentDate.getBoardingPoint(); + if (lOffPoint == lBoardingPointOfNextSegment) { + const Date_T& lOffDate = getOffDate(); + const Date_T& lBoardingDate = iSegmentDate.getBoardingDate(); + const DateOffSet_T lDateOffSet = lBoardingDate - lOffDate; + const Duration_T lDateOffSetInHours (lDateOffSet.days() * 24, 0, 0); + + const Duration_T& lOffTime = getOffTime(); + const Duration_T& lBoardingTime = iSegmentDate.getBoardingTime(); + + const Duration_T lStopOverTime = + lBoardingTime - lOffTime + lDateOffSetInHours; + + oIsConnectable = lStopOverTime >= DEFAULT_MINIMUM_CONNECTION_TIME; + } + return oIsConnectable; } Modified: trunk/stdair/stdair/factory/FacBomContent.hpp =================================================================== --- trunk/stdair/stdair/factory/FacBomContent.hpp 2010-05-03 14:57:07 UTC (rev 189) +++ trunk/stdair/stdair/factory/FacBomContent.hpp 2010-05-26 13:13:51 UTC (rev 190) @@ -68,6 +68,9 @@ ioChild._structure); if (hasLinkBeenSuccessful == false) { + std::cout << "link with parent" << std::endl; + std::cout << ioParent.describeKey() << std::endl; + std::cout << ioChild.describeShortKey() << std::endl; throw ObjectLinkingException(); } } @@ -123,8 +126,13 @@ typedef BomChildrenHolderImp<CHILD> CHILDREN_HOLDER_T; CHILDREN_HOLDER_T*& lChildrenHolder_ptr = boost::fusion::at_key<CHILD> (ioParent._structure._holderMap); - lChildrenHolder_ptr = + CHILDREN_HOLDER_T*& lReferenceChildrenHolder_ptr = boost::fusion::at_key<CHILD> (iReferenceParent._structure._holderMap); + assert (lReferenceChildrenHolder_ptr != NULL); + + FacBomStructure:: + cloneChildrenHolder (lChildrenHolder_ptr, + *lReferenceChildrenHolder_ptr); } private: Modified: trunk/stdair/stdair/factory/FacBomStructure.hpp =================================================================== --- trunk/stdair/stdair/factory/FacBomStructure.hpp 2010-05-03 14:57:07 UTC (rev 189) +++ trunk/stdair/stdair/factory/FacBomStructure.hpp 2010-05-26 13:13:51 UTC (rev 190) @@ -161,7 +161,19 @@ return true; } - + + // ////////////////////////////////////////////////////////////////// + /** Clone the children holder.*/ + template <typename HOLDER> + static void cloneChildrenHolder (HOLDER*& ioHolder_ptr, + const HOLDER& iReferenceHolder) { + if (ioHolder_ptr == NULL) { + ioHolder_ptr = &instance().create<HOLDER> (); + } + ioHolder_ptr->_bomChildrenMap = iReferenceHolder._bomChildrenMap; + ioHolder_ptr->_bomChildrenList = iReferenceHolder._bomChildrenList; + } + protected: /** Default Constructor. <br>This constructor is protected to ensure the class is structure. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2010-05-03 14:57:14
|
Revision: 189 http://stdair.svn.sourceforge.net/stdair/?rev=189&view=rev Author: quannaus Date: 2010-05-03 14:57:07 +0000 (Mon, 03 May 2010) Log Message: ----------- [dev] added some getters. Modified Paths: -------------- trunk/stdair/stdair/bom/SegmentCabin.cpp trunk/stdair/stdair/bom/SegmentCabin.hpp trunk/stdair/stdair/bom/SegmentDate.cpp trunk/stdair/stdair/bom/SegmentDate.hpp trunk/stdair/stdair/command/CmdBomManager.cpp trunk/stdair/stdair/command/CmdBomManager.hpp Modified: trunk/stdair/stdair/bom/SegmentCabin.cpp =================================================================== --- trunk/stdair/stdair/bom/SegmentCabin.cpp 2010-05-03 11:50:17 UTC (rev 188) +++ trunk/stdair/stdair/bom/SegmentCabin.cpp 2010-05-03 14:57:07 UTC (rev 189) @@ -63,6 +63,12 @@ BookingClassMap_T SegmentCabin::getBookingClassMap () const { return _structure.getChildrenHolder<BookingClass>(); } + + // //////////////////////////////////////////////////////////////////// + BookingClass* SegmentCabin:: + getBookingClass (const ClassCode_T& iClassCode) const { + return _structure.getChildPtr<BookingClass> (iClassCode); + } } Modified: trunk/stdair/stdair/bom/SegmentCabin.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentCabin.hpp 2010-05-03 11:50:17 UTC (rev 188) +++ trunk/stdair/stdair/bom/SegmentCabin.hpp 2010-05-03 14:57:07 UTC (rev 189) @@ -46,6 +46,11 @@ BookingClassList_T getBookingClassList () const; BookingClassMap_T getBookingClassMap () const; + /** Retrieve, if existing, the BookingClass corresponding to the + given class code. + <br>If not existing, return the NULL pointer. */ + BookingClass* getBookingClass (const ClassCode_T&) const; + public: // /////////// Display support methods ///////// /** Dump a Business Object into an output stream. Modified: trunk/stdair/stdair/bom/SegmentDate.cpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDate.cpp 2010-05-03 11:50:17 UTC (rev 188) +++ trunk/stdair/stdair/bom/SegmentDate.cpp 2010-05-03 14:57:07 UTC (rev 189) @@ -105,6 +105,12 @@ const FlightNumber_T& SegmentDate::getFlightNumber () const { return _structure.getParent().getKey().getFlightNumber(); } + + // //////////////////////////////////////////////////////////////////// + SegmentCabin* SegmentDate:: + getSegmentCabin (const CabinCode_T& iCabinCode) const { + return _structure.getChildPtr<SegmentCabin> (iCabinCode); + } } Modified: trunk/stdair/stdair/bom/SegmentDate.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDate.hpp 2010-05-03 11:50:17 UTC (rev 188) +++ trunk/stdair/stdair/bom/SegmentDate.hpp 2010-05-03 14:57:07 UTC (rev 189) @@ -54,6 +54,11 @@ /** Get the airline code of the segment. */ const AirlineCode_T& getAirlineCode () const; + /** Retrieve, if existing, the SegmentCabin corresponding to the + given cabin code. + <br>If not existing, return the NULL pointer. */ + SegmentCabin* getSegmentCabin (const CabinCode_T&) const; + public: // /////////// Business Methods ////////////// /** States whether or not the given SegmentDate may connect with the Modified: trunk/stdair/stdair/command/CmdBomManager.cpp =================================================================== --- trunk/stdair/stdair/command/CmdBomManager.cpp 2010-05-03 11:50:17 UTC (rev 188) +++ trunk/stdair/stdair/command/CmdBomManager.cpp 2010-05-03 14:57:07 UTC (rev 189) @@ -129,14 +129,17 @@ } // //////////////////////////////////////////////////////////////////// - void CmdBomManager::createBookingClass (const SegmentCabin& iSegmentCabin, - const ClassCode_T& iClassCode) { + BookingClass& CmdBomManager:: + createBookingClass (const SegmentCabin& iSegmentCabin, + const ClassCode_T& iClassCode) { // Instantiate a booking class object with the given class code const BookingClassKey_T lClassKey (iClassCode); - BookingClass& lClass = + BookingClass& oClass = FacBomContent::instance().create<BookingClass> (lClassKey); // Link the created booking-class with its parent segment-cabin. - FacBomContent::linkWithParent (lClass, iSegmentCabin); + FacBomContent::linkWithParent (oClass, iSegmentCabin); + + return oClass; } // ////////////////////////////////////////////////////////////////////// Modified: trunk/stdair/stdair/command/CmdBomManager.hpp =================================================================== --- trunk/stdair/stdair/command/CmdBomManager.hpp 2010-05-03 11:50:17 UTC (rev 188) +++ trunk/stdair/stdair/command/CmdBomManager.hpp 2010-05-03 14:57:07 UTC (rev 189) @@ -16,9 +16,9 @@ class FlightDate; class SegmentDate; class SegmentCabin; + class BookingClass; class LegDate; class LegCabin; - class Bucket; class Network; class NetworkDate; class AirportDate; @@ -69,7 +69,8 @@ const CabinCode_T&); /** Create the booking class corresponding to the given class code. */ - static void createBookingClass (const SegmentCabin&, const ClassCode_T&); + static BookingClass& createBookingClass (const SegmentCabin&, + const ClassCode_T&); /** Create the inventory corresponding to the given network key, then link it to the BomRoot object. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2010-05-03 11:50:23
|
Revision: 188 http://stdair.svn.sourceforge.net/stdair/?rev=188&view=rev Author: quannaus Date: 2010-05-03 11:50:17 +0000 (Mon, 03 May 2010) Log Message: ----------- [dev] Removed StatStatus and StartAnalysisDate. Modified Paths: -------------- trunk/stdair/stdair/STDAIR_Types.hpp trunk/stdair/stdair/bom/BomManager.cpp trunk/stdair/stdair/bom/LegCabin.cpp trunk/stdair/stdair/bom/LegCabin.hpp trunk/stdair/stdair/bom/LegCabinContent.cpp trunk/stdair/stdair/bom/LegCabinContent.hpp Modified: trunk/stdair/stdair/STDAIR_Types.hpp =================================================================== --- trunk/stdair/stdair/STDAIR_Types.hpp 2010-05-03 09:13:50 UTC (rev 187) +++ trunk/stdair/stdair/STDAIR_Types.hpp 2010-05-03 11:50:17 UTC (rev 188) @@ -385,9 +385,6 @@ /** 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; Modified: trunk/stdair/stdair/bom/BomManager.cpp =================================================================== --- trunk/stdair/stdair/bom/BomManager.cpp 2010-05-03 09:13:50 UTC (rev 187) +++ trunk/stdair/stdair/bom/BomManager.cpp 2010-05-03 11:50:17 UTC (rev 188) @@ -191,7 +191,8 @@ << lCurrentLD.getBoardingPoint() << "-" << lCurrentLD.getOffPoint() << ", " << lCurrentLC.getCabinCode() << ", " - << lCurrentLC.getCapacity() << ", " + << lCurrentLC.getOfferedCapacity() << ", " + << lCurrentLC.getPhysicalCapacity() << ", " << lCurrentLC.getSoldSeat() << ", " << lCurrentLC.getCommitedSpace() << ", " << lCurrentLC.getAvailabilityPool() << ", " Modified: trunk/stdair/stdair/bom/LegCabin.cpp =================================================================== --- trunk/stdair/stdair/bom/LegCabin.cpp 2010-05-03 09:13:50 UTC (rev 187) +++ trunk/stdair/stdair/bom/LegCabin.cpp 2010-05-03 11:50:17 UTC (rev 188) @@ -53,14 +53,5 @@ return oStr.str(); } - // //////////////////////////////////////////////////////////////////// - void LegCabin::setCapacity(const CabinCapacity_T& iCapacity, - const AnalysisStatus_T& iAnalysisStatus) { - _capacity = iCapacity; - // LegDate* lLegDate = getParent(); -// assert (lLegDate!= NULL); -// lLegDate->updateCapacityAndLegASK(iCapacity, iAnalysisStatus); - } - } Modified: trunk/stdair/stdair/bom/LegCabin.hpp =================================================================== --- trunk/stdair/stdair/bom/LegCabin.hpp 2010-05-03 09:13:50 UTC (rev 187) +++ trunk/stdair/stdair/bom/LegCabin.hpp 2010-05-03 11:50:17 UTC (rev 188) @@ -41,11 +41,6 @@ // ////////////////////////////////////////////////////////////////// public: - // ///////// Setters ////////// - /** Set the off cabin. */ - void setCapacity (const CabinCapacity_T&, const AnalysisStatus_T&); - - public: // /////////// Display support methods ///////// /** Dump a Business Object into an output stream. @param ostream& the output stream. */ Modified: trunk/stdair/stdair/bom/LegCabinContent.cpp =================================================================== --- trunk/stdair/stdair/bom/LegCabinContent.cpp 2010-05-03 09:13:50 UTC (rev 187) +++ trunk/stdair/stdair/bom/LegCabinContent.cpp 2010-05-03 11:50:17 UTC (rev 188) @@ -13,7 +13,8 @@ // //////////////////////////////////////////////////////////////////// LegCabinContent::LegCabinContent (const Key_T& iKey) : _key (iKey), - _capacity (DEFAULT_CABIN_CAPACITY), + _offeredCapacity (DEFAULT_CABIN_CAPACITY), + _physicalCapacity (DEFAULT_CABIN_CAPACITY), _soldSeat (DEFAULT_CLASS_NB_OF_BOOKINGS), _commitedSpace (DEFAULT_COMMITED_SPACE), _availabilityPool (DEFAULT_AVAILABILITY), Modified: trunk/stdair/stdair/bom/LegCabinContent.hpp =================================================================== --- trunk/stdair/stdair/bom/LegCabinContent.hpp 2010-05-03 09:13:50 UTC (rev 187) +++ trunk/stdair/stdair/bom/LegCabinContent.hpp 2010-05-03 11:50:17 UTC (rev 188) @@ -29,11 +29,16 @@ return _key.getCabinCode(); } - /** Get the cabin capacity. */ - const CabinCapacity_T& getCapacity () const { - return _capacity; + /** Get the cabin offered capacity. */ + const CabinCapacity_T& getOfferedCapacity () const { + return _offeredCapacity; } + /** Get the cabin physical capacity. */ + const CabinCapacity_T& getPhysicalCapacity () const { + return _physicalCapacity; + } + /** Get the number of sold seat. */ const NbOfBookings_T& getSoldSeat () const { return _soldSeat; @@ -66,6 +71,12 @@ public: // ///////////// Setters /////////////// + /** Set the offered and physical capacities. */ + void setCapacities (const CabinCapacity_T& iCapacity) { + _offeredCapacity = iCapacity; + _physicalCapacity = iCapacity; + } + /** Set the number of sold seat. */ void setSoldSeat (const NbOfBookings_T& iSoldSeat) { _soldSeat = iSoldSeat; @@ -117,11 +128,9 @@ public: // Test AIRINV - stdair::CapacityAdjustment_T _adjustment; stdair::CapacityAdjustment_T _dcsRegrade; stdair::AuthorizationLevel_T _au; stdair::UPR_T _upr; - stdair::NbOfBookings_T _nbOfBookings; stdair::Availability_T _nav; stdair::Availability_T _gav; stdair::OverbookingRate_T _acp; @@ -135,9 +144,12 @@ /** The key of both structure and content objects. */ Key_T _key; - /** Capacity of the cabin. */ - CabinCapacity_T _capacity; + /** Offered capacity of the cabin. */ + CabinCapacity_T _offeredCapacity; + /** Physical capacity of the cabin. */ + CabinCapacity_T _physicalCapacity; + /** Sold seat into the cabin. */ NbOfBookings_T _soldSeat; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2010-05-03 09:13:57
|
Revision: 187 http://stdair.svn.sourceforge.net/stdair/?rev=187&view=rev Author: quannaus Date: 2010-05-03 09:13:50 +0000 (Mon, 03 May 2010) Log Message: ----------- [dev] Removed some unnecessary statistical attributes. Modified Paths: -------------- trunk/stdair/stdair/bom/BomManager.cpp trunk/stdair/stdair/bom/FlightDateContent.cpp trunk/stdair/stdair/bom/FlightDateContent.hpp trunk/stdair/stdair/bom/InventoryContent.hpp trunk/stdair/stdair/bom/LegDateContent.cpp trunk/stdair/stdair/bom/LegDateContent.hpp trunk/stdair/stdair/bom/SegmentDateContent.cpp trunk/stdair/stdair/bom/SegmentDateContent.hpp Modified: trunk/stdair/stdair/bom/BomManager.cpp =================================================================== --- trunk/stdair/stdair/bom/BomManager.cpp 2010-05-03 08:42:00 UTC (rev 186) +++ trunk/stdair/stdair/bom/BomManager.cpp 2010-05-03 09:13:50 UTC (rev 187) @@ -97,15 +97,7 @@ << std::endl << std::endl; oStream << iFlightDate.getFlightNumber() - << " (" << iFlightDate.getFlightDate() << "), " - << iFlightDate.getBookingCounter() << ", " - << iFlightDate.getRevenue() << ", " - << iFlightDate.getAverageFare() << ", " - << iFlightDate.getASK() << ", " - << iFlightDate.getYield() << ", " - << iFlightDate.getRPK() << ", " - << iFlightDate.getUnitRevenue() << ", " - << iFlightDate.getLoadFactor() << ", " << std::endl; + << " (" << iFlightDate.getFlightDate() << std::endl; oStream << "******************************************" << std::endl; // Display the leg-dates @@ -160,9 +152,6 @@ << lCurrentLD.getElapsedTime() << ", " << lCurrentLD.getDistance() << ", " << lCurrentLD.getCapacity() << ", " - << lCurrentLD.getASK() << ", " - << lCurrentLD.getSoldSeat() << ", " - << lCurrentLD.getLoadFactor() << ", " << std::endl; } oStream << "******************************************" << std::endl; @@ -294,11 +283,6 @@ << lCurrentSD.getTimeOffSet() << ") / " << lCurrentSD.getElapsedTime() << ", " << lCurrentSD.getDistance() << ", " - << lCurrentSD.getBookingCounter() << ", " - << lCurrentSD.getRevenue() << ", " - << lCurrentSD.getAverageFare() << ", " - << lCurrentSD.getUnitRevenue() << ", " - << lCurrentSD.getRPK() << ", " << std::endl; } } Modified: trunk/stdair/stdair/bom/FlightDateContent.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateContent.cpp 2010-05-03 08:42:00 UTC (rev 186) +++ trunk/stdair/stdair/bom/FlightDateContent.cpp 2010-05-03 09:13:50 UTC (rev 187) @@ -4,22 +4,13 @@ // STL #include <cassert> // STDAIR -#include <stdair/basic/BasConst_General.hpp> #include <stdair/bom/FlightDateContent.hpp> namespace stdair { // //////////////////////////////////////////////////////////////////// FlightDateContent::FlightDateContent (const Key_T& iKey) - : _key (iKey), - _bookingCounter (DEFAULT_CLASS_NB_OF_BOOKINGS), - _flightRevenue (DEFAULT_REVENUE_VALUE), - _flightAverageFare (DEFAULT_FARE_VALUE), - _flightASK (DEFAULT_DISTANCE_VALUE), - _flightYield (DEFAULT_REVENUE_VALUE), - _flightRPK (DEFAULT_DISTANCE_VALUE), - _flightUnitRevenue (DEFAULT_REVENUE_VALUE), - _flightLoadFactor (DEFAULT_REVENUE_VALUE) { + : _key (iKey) { } // //////////////////////////////////////////////////////////////////// Modified: trunk/stdair/stdair/bom/FlightDateContent.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateContent.hpp 2010-05-03 08:42:00 UTC (rev 186) +++ trunk/stdair/stdair/bom/FlightDateContent.hpp 2010-05-03 09:13:50 UTC (rev 187) @@ -33,80 +33,8 @@ const Date_T& getFlightDate() const { return _key.getFlightDate(); } - - /** Get the booking counter. */ - const NbOfBookings_T& getBookingCounter () const { - return _bookingCounter; - } - /** Get the total flight revenue. */ - const Revenue_T& getRevenue () const { - return _flightRevenue; - } - - /** Get the flight average fare. */ - const Fare_T& getAverageFare() const { - return _flightAverageFare; - } - - /** Get the Availability Seat Kilometer for this flight. */ - const Distance_T& getASK() const { - return _flightASK; - } - - /** Get the yield value for this flight. */ - const Revenue_T& getYield () const { - return _flightYield; - } - - /** Get the Revenue Passanger Kilometer for this flight. */ - const Distance_T& getRPK() const { - return _flightRPK; - } - - /** Get the unit revenue value for this flight. */ - const Revenue_T& getUnitRevenue () const { - return _flightUnitRevenue; - } - - /** Get the load factor value for this flight. */ - const Revenue_T& getLoadFactor () const { - return _flightLoadFactor; - } - public: - // ///////// Setters ////////// - /** Set the revenue amount. */ - void setRevenue (const Revenue_T& iFlightRevenue) { - _flightRevenue = iFlightRevenue; - } - - /** Set the Revenue Passanger Kilometer. */ - void setRPK (const Distance_T& iFlightRPK) { - _flightRPK = iFlightRPK; - } - - /** Set the unit revenue. */ - void setUnitRevenue (const Revenue_T& iFlightURevenue) { - _flightUnitRevenue = iFlightURevenue; - } - - /** Set the average flight fare. */ - void setAverageFare(Fare_T iFAFare) { - _flightAverageFare = iFAFare; - } - - /** Set the yield. */ - void setYield (const Revenue_T& iFlightYield) { - _flightYield = iFlightYield; - } - - /** Set the load factor. */ - void setLoadFactor (const Revenue_T& iFlightLF) { - _flightLoadFactor = iFlightLF; - } - - public: // /////////// Display support methods ///////// /** Dump a Business Object into an output stream. @param ostream& the output stream. */ @@ -134,31 +62,6 @@ // Attributes /** The key of both structure and content objects. */ Key_T _key; - - /** Counter of all bookings into this flight. */ - NbOfBookings_T _bookingCounter; - - /** Total amount of money earn with flight bookings. */ - Revenue_T _flightRevenue; - - /** Value of the average fare of this flight.*/ - Fare_T _flightAverageFare; - - /** Value of the Available Seat Kilometer for this flight.*/ - Distance_T _flightASK; - - /** Value of the Yield (Revenue/ASK). */ - Revenue_T _flightYield; - - /** Value of the Revenue Passanger Kilometer for this flight.*/ - Distance_T _flightRPK; - - /** Value of the Unit Revenue (Revenue/RPK). */ - Revenue_T _flightUnitRevenue; - - /** Value of the Load Factor (ASK/RPK). */ - Revenue_T _flightLoadFactor; - }; } Modified: trunk/stdair/stdair/bom/InventoryContent.hpp =================================================================== --- trunk/stdair/stdair/bom/InventoryContent.hpp 2010-05-03 08:42:00 UTC (rev 186) +++ trunk/stdair/stdair/bom/InventoryContent.hpp 2010-05-03 09:13:50 UTC (rev 187) @@ -36,124 +36,27 @@ public: // ////////// Getters //////////// - /** Get the airline code. */ - const AirlineCode_T& getAirlineCode () const { - return _key.getAirlineCode(); - } - /** Get the inventory key. */ const Key_T& getKey() const { return _key; } - - /** Get the booking counter. */ - const NbOfBookings_T& getBookingCounter () const { - return _bookingCounter; + + /** Get the airline code. */ + const AirlineCode_T& getAirlineCode () const { + return _key.getAirlineCode(); } - /** 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 (const Key_T&); InventoryContent (const InventoryContent&); /** Destructor. */ - virtual ~InventoryContent(); + ~InventoryContent(); protected: // Attributes /** The key of both structure and content objects. */ Key_T _key; - - /** 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/LegDateContent.cpp =================================================================== --- trunk/stdair/stdair/bom/LegDateContent.cpp 2010-05-03 08:42:00 UTC (rev 186) +++ trunk/stdair/stdair/bom/LegDateContent.cpp 2010-05-03 09:13:50 UTC (rev 187) @@ -13,9 +13,7 @@ LegDateContent::LegDateContent (const Key_T& iKey) \ : _key (iKey), _distance (DEFAULT_DISTANCE_VALUE), - _capacity (DEFAULT_CABIN_CAPACITY), - _legSoldSeat (DEFAULT_CLASS_NB_OF_BOOKINGS), - _legLoadFactor (DEFAULT_REVENUE_VALUE) { + _capacity (DEFAULT_CABIN_CAPACITY) { } // //////////////////////////////////////////////////////////////////// Modified: trunk/stdair/stdair/bom/LegDateContent.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDateContent.hpp 2010-05-03 08:42:00 UTC (rev 186) +++ trunk/stdair/stdair/bom/LegDateContent.hpp 2010-05-03 09:13:50 UTC (rev 187) @@ -69,21 +69,6 @@ return _capacity; } - /** Get the Availability Seat Kilometer for this leg. */ - const Distance_T& getASK() const { - return _legASK; - } - - /** Get the number of sold seat. */ - const NbOfBookings_T& getSoldSeat () const { - return _legSoldSeat; - } - - /** Get the load factor value for this leg. */ - const Revenue_T& getLoadFactor () const { - return _legLoadFactor; - } - /** Get the date off set (off date - boarding date). */ const DateOffSet_T getDateOffSet () const { return _offDate - _boardingDate; @@ -122,11 +107,6 @@ _offTime = iOffTime; } - /** Set the number of sold seat. */ - void setSoldSeat (const NbOfBookings_T& iLSoldSeat) { - _legSoldSeat = iLSoldSeat; - } - /** Set the elapsed time. */ void setElapsedTime (const Duration_T&); @@ -155,7 +135,7 @@ LegDateContent (const Key_T&); LegDateContent (const LegDateContent&); /** Destructor. */ - virtual ~LegDateContent(); + ~LegDateContent(); protected: // Attributes @@ -185,16 +165,6 @@ /** Capacity of the leg. */ CabinCapacity_T _capacity; - - /** Value of the Available Seat Kilometer for this leg.*/ - Distance_T _legASK; - - /** Sold seat into the leg. */ - NbOfBookings_T _legSoldSeat; - - /** Value of the Load Factor (ASK/RPK) or - (sold seats/ capacity) for the leg level. */ - Revenue_T _legLoadFactor; }; } Modified: trunk/stdair/stdair/bom/SegmentDateContent.cpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDateContent.cpp 2010-05-03 08:42:00 UTC (rev 186) +++ trunk/stdair/stdair/bom/SegmentDateContent.cpp 2010-05-03 09:13:50 UTC (rev 187) @@ -11,12 +11,7 @@ // //////////////////////////////////////////////////////////////////// SegmentDateContent::SegmentDateContent (const Key_T& iKey) - : _key (iKey), - _bookingCounter (DEFAULT_CLASS_NB_OF_BOOKINGS), - _segmentRevenue (DEFAULT_REVENUE_VALUE), - _segmentAverageFare (DEFAULT_FARE_VALUE), - _segmentUnitRevenue (DEFAULT_REVENUE_VALUE), - _segmentRPK (DEFAULT_DISTANCE_VALUE) { + : _key (iKey) { } // //////////////////////////////////////////////////////////////////// Modified: trunk/stdair/stdair/bom/SegmentDateContent.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDateContent.hpp 2010-05-03 08:42:00 UTC (rev 186) +++ trunk/stdair/stdair/bom/SegmentDateContent.hpp 2010-05-03 09:13:50 UTC (rev 187) @@ -34,31 +34,6 @@ return _key.getOffPoint(); } - /** Get the booking counter. */ - const NbOfBookings_T& getBookingCounter() const { - return _bookingCounter; - } - - /** Get the total segment revenue. */ - const Revenue_T& getRevenue () const { - return _segmentRevenue; - } - - /** Get the segment average fare. */ - const Fare_T& getAverageFare() const { - return _segmentAverageFare; - } - - /** Get the unit revenue value for this segment. */ - const Revenue_T& getUnitRevenue () const { - return _segmentUnitRevenue; - } - - /** Get the Revenue Passanger Kilometer for this segment. */ - const Distance_T& getRPK() const { - return _segmentRPK; - } - /** Get the boarding date. */ const Date_T& getBoardingDate () const { return _boardingDate; @@ -102,11 +77,6 @@ public: // ///////// Setters ////////// - /** Set the revenue amount. */ - void setRevenue (const Revenue_T& iSegmentRevenue) { - _segmentRevenue = iSegmentRevenue; - } - /** Set the boarding date. */ void setBoardingDate (const Date_T& iBoardingDate) { _boardingDate = iBoardingDate; @@ -132,26 +102,6 @@ _elapsedTime = iElapsedTime; } - /** Set the total number of bookings. */ - void setBookingCounter (const NbOfBookings_T& iBookCounter) { - _bookingCounter = iBookCounter; - } - - /** Set the average segment fare. */ - void setAverageSegmentFare(Fare_T iSAFare) { - _segmentAverageFare = iSAFare; - } - - /** Set the Revenue Passanger Kilometer. */ - void setRPK (const Distance_T& iSegmentRPK) { - _segmentRPK = iSegmentRPK; - } - - /** Set the Unit Revenue. */ - void setUnitRevenue (const Revenue_T& iSegmentURevenue) { - _segmentUnitRevenue = iSegmentURevenue; - } - /** Set the distance. */ void setDistance (const Distance_T& iDistance) { _distance = iDistance; @@ -187,22 +137,7 @@ // Attributes /** The key of both structure and content objects. */ Key_T _key; - - /** Counter of all bookings into this segment. */ - NbOfBookings_T _bookingCounter; - /** Total amount of money earn with segment bookings. */ - Revenue_T _segmentRevenue; - - /** Value of the average fare of this segment date.*/ - Fare_T _segmentAverageFare; - - /** Value of the Unit Revenue (Revenue/ASK). */ - Revenue_T _segmentUnitRevenue; - - /** Value of the Revenue Passanger Kilometer for this segment date.*/ - Distance_T _segmentRPK; - /** Boarding Date. */ Date_T _boardingDate; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2010-05-03 08:42:06
|
Revision: 186 http://stdair.svn.sourceforge.net/stdair/?rev=186&view=rev Author: quannaus Date: 2010-05-03 08:42:00 +0000 (Mon, 03 May 2010) Log Message: ----------- [dev] Removed some getters and setters from the structures. Modified Paths: -------------- trunk/stdair/stdair/basic/BasConst.cpp trunk/stdair/stdair/basic/BasConst_BookingClass.hpp trunk/stdair/stdair/basic/BasConst_General.hpp trunk/stdair/stdair/basic/BasConst_TravelSolution.hpp trunk/stdair/stdair/basic/DemandCharacteristics.hpp trunk/stdair/stdair/basic/DemandDistribution.hpp trunk/stdair/stdair/basic/RandomGeneration.hpp trunk/stdair/stdair/basic/RandomGenerationContext.hpp trunk/stdair/stdair/bom/BookingClassContent.cpp trunk/stdair/stdair/bom/BookingClassContent.hpp trunk/stdair/stdair/bom/DemandStreamContent.cpp trunk/stdair/stdair/bom/DemandStreamContent.hpp trunk/stdair/stdair/bom/FlightDateContent.cpp trunk/stdair/stdair/bom/LegCabinContent.cpp trunk/stdair/stdair/bom/SegmentCabinContent.cpp trunk/stdair/stdair/bom/SegmentDateContent.cpp trunk/stdair/stdair/bom/TravelSolutionStruct.cpp trunk/stdair/stdair/bom/TravelSolutionStruct.hpp trunk/stdair/stdair/bom/TravelSolutionTypes.hpp Modified: trunk/stdair/stdair/basic/BasConst.cpp =================================================================== --- trunk/stdair/stdair/basic/BasConst.cpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/basic/BasConst.cpp 2010-05-03 08:42:00 UTC (rev 186) @@ -136,8 +136,8 @@ /** 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 availability. */ + const Availability_T DEFAULT_AVAILABILITY = 0.0; /** Default boolean for censorship flag given the status of availability for BookingClass. */ @@ -168,8 +168,8 @@ /** 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 Fare value. */ + const Fare_T DEFAULT_FARE_VALUE = 0.0; /** Default yield value for a virtual class. */ const Yield_T DEFAULT_CLASS_YIELD_VALUE = 0.0; Modified: trunk/stdair/stdair/basic/BasConst_BookingClass.hpp =================================================================== --- trunk/stdair/stdair/basic/BasConst_BookingClass.hpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/basic/BasConst_BookingClass.hpp 2010-05-03 08:42:00 UTC (rev 186) @@ -48,8 +48,8 @@ /** 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 availability. */ + extern const Availability_T DEFAULT_AVAILABILITY; /** Default boolean for censorship flag given the status of availability for BookingClass. */ @@ -74,8 +74,8 @@ /** 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 fare. */ + extern const Fare_T DEFAULT_FARE_VALUE; /** Default revenue value for BookingClass. */ extern const Revenue_T DEFAULT_REVENUE_VALUE; Modified: trunk/stdair/stdair/basic/BasConst_General.hpp =================================================================== --- trunk/stdair/stdair/basic/BasConst_General.hpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/basic/BasConst_General.hpp 2010-05-03 08:42:00 UTC (rev 186) @@ -28,7 +28,7 @@ extern const Distance_T DEFAULT_DISTANCE_VALUE; /** Default value of Fare. */ - extern const Fare_T DEFAULT_CLASS_FARE_VALUE; + extern const Fare_T DEFAULT_FARE_VALUE; /** Default revenue value. */ extern const Revenue_T DEFAULT_REVENUE_VALUE; Modified: trunk/stdair/stdair/basic/BasConst_TravelSolution.hpp =================================================================== --- trunk/stdair/stdair/basic/BasConst_TravelSolution.hpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/basic/BasConst_TravelSolution.hpp 2010-05-03 08:42:00 UTC (rev 186) @@ -44,7 +44,7 @@ extern const NbOfBookings_T DEFAULT_CLASS_NB_OF_BOOKINGS; /** Default value of Fare. */ - extern const Fare_T DEFAULT_CLASS_FARE_VALUE; + extern const Fare_T DEFAULT_FARE_VALUE; /** Default nember of required seats by the demand. */ extern const unsigned short DEFAULT_NUMBER_OF_REQUIRED_SEATS; Modified: trunk/stdair/stdair/basic/DemandCharacteristics.hpp =================================================================== --- trunk/stdair/stdair/basic/DemandCharacteristics.hpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/basic/DemandCharacteristics.hpp 2010-05-03 08:42:00 UTC (rev 186) @@ -15,55 +15,8 @@ /** Class modeling the characteristics of a demand type. */ struct DemandCharacteristics { - + public: - // ///////////// Getters /////////// - /** Get the arrival pattern. */ - const ContinuousFloatDuration_T& getArrivalPattern() const { - return _arrivalPattern; - } - - /** Get the point-of-sale probability mass. */ - const POSProbabilityMass_T& getPOSProbabilityMass() const { - return _posProbabilityMass; - } - - /** Get the channel probability mass. */ - const ChannelProbabilityMass_T& getChannelProbabilityMass() const { - return _channelProbabilityMass; - } - - /** Get the trip type probability mass. */ - const TripTypeProbabilityMass_T& getTripTypeProbabilityMass() const { - return _tripTypeProbabilityMass; - } - - /** Get the stay duration probability mass. */ - const StayDurationProbabilityMass_T& getStayDurationProbabilityMass() const { - return _stayDurationProbabilityMass; - } - - /** Get the frequent flyer probability mass. */ - const FrequentFlyerProbabilityMass_T& getFrequentFlyerProbabilityMass() const { - return _frequentFlyerProbabilityMass; - } - - /** Get the preferred departure time cumulative distribution. */ - const PreferredDepartureTimeCumulativeDistribution_T& getPreferredDepartureTimeCumulativeDistribution () const { - return _preferredDepartureTimeCumulativeDistribution; - } - - /** Get the WTP cumulative distribution. */ - const WTPCumulativeDistribution_T& getWTPCumulativeDistribution() const { - return _wtpCumulativeDistribution; - } - - /** Get the value of time cumulative distribution. */ - const ValueOfTimeCumulativeDistribution_T& getValueOfTimeCumulativeDistribution () const { - return _valueOfTimeCumulativeDistribution; - } - - public: // ////////////// Display Support Methods ////////// /** Display demand characteristics */ std::string display() const; @@ -90,7 +43,7 @@ /** Copy constructor. */ DemandCharacteristics (const DemandCharacteristics&); - private: + public: // //////////////////// Attributes ///////////////////// /** Arrival pattern (cumulative distribution of timing of arrival of requests (negative number of days between departure date Modified: trunk/stdair/stdair/basic/DemandDistribution.hpp =================================================================== --- trunk/stdair/stdair/basic/DemandDistribution.hpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/basic/DemandDistribution.hpp 2010-05-03 08:42:00 UTC (rev 186) @@ -14,56 +14,24 @@ /** Class modeling the distribution of a demand type. */ struct DemandDistribution { - public: - // ///////////// Getters /////////// - /** Get the mean number of requests. */ - const NbOfRequests_T& getMeanNumberOfRequests() const { - return _meanNumberOfRequests; - } - - /** Get the standard deviation of number of requests. */ - const StandardDeviationValue_T& getStandardDeviationNumberOfRequests() const { - return _standardDeviationNumberOfRequests; - } - - public: - // ///////////// Setters /////////// - /** Set the mean number of requests. */ - void setMeanNumberOfRequests (const NbOfRequests_T& iMean) { - _meanNumberOfRequests = iMean; - } - - /** Set the standard deviation of number of requests. */ - void setStandardDeviationNumberOfRequests (const StandardDeviationValue_T& iStandardDeviation) { - _standardDeviationNumberOfRequests = iStandardDeviation; - } - - public: // ////////////// Display Support Methods ////////// /** Display demand distribution */ std::string display() const; - public: // ////////// Constructors and destructors ///////// /** Constructor. */ DemandDistribution (const NbOfRequests_T& iMean, const StandardDeviationValue_T& iStandardDeviation); - /** Default constructor. */ - // TODO: That constructor should be private DemandDistribution (); - /** Copy constructor. */ - // TODO: That constructor should be private DemandDistribution (const DemandDistribution&); - /** Destructor. */ - virtual ~DemandDistribution (); + ~DemandDistribution (); - private: // ////////// Attributes ////////// /** Mean number of requests */ NbOfRequests_T _meanNumberOfRequests; Modified: trunk/stdair/stdair/basic/RandomGeneration.hpp =================================================================== --- trunk/stdair/stdair/basic/RandomGeneration.hpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/basic/RandomGeneration.hpp 2010-05-03 08:42:00 UTC (rev 186) @@ -14,13 +14,6 @@ /** Random generator. */ struct RandomGeneration { - public: - // ///////////// Getters /////////// - /** Get the seed of the random generator. */ - const RandomSeed_T& getSeed () const { - return _seed; - } - // //////////// Business Methods ///////////// /** Generate a randomized number following a uniform distribution between 0 (included) and 1 (excluded). */ @@ -35,25 +28,20 @@ specified by a mean and a standard deviation. */ RealNumber_T generateNormal (const RealNumber_T&, const RealNumber_T&); - public: // ////////// Constructors and destructors ///////// /** Constructor. */ RandomGeneration (const RandomSeed_T&); /** Default constructors. */ RandomGeneration (); RandomGeneration (const RandomGeneration&); - /** Destructor. */ - virtual ~RandomGeneration (); - + ~RandomGeneration (); /** Initialize the random generator. <br>A uniform random number distribution is defined, which produces "real" values between 0 and 1 (0 inclusive, 1 exclusive). */ void init (); - - private: // ////////// Attributes ////////// /** The seed of the random generator. <br>The seed is unsigned, otherwise the wrong overload may be Modified: trunk/stdair/stdair/basic/RandomGenerationContext.hpp =================================================================== --- trunk/stdair/stdair/basic/RandomGenerationContext.hpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/basic/RandomGenerationContext.hpp 2010-05-03 08:42:00 UTC (rev 186) @@ -13,49 +13,20 @@ /** Structure holding the context necessary for demand random generation. */ struct RandomGenerationContext { - - public: - // ///////////// Getters /////////// - /** Get the cumulative probability of arrival pattern for last - request generated so far. */ - const Probability_T& getCumulativeProbabilitySoFar () const { - return _cumulativeProbabilitySoFar; - } - /** Get the number of requests generated so far. */ - const Count_T& getNumberOfRequestsGeneratedSoFar () const { - return _numberOfRequestsGeneratedSoFar; - } - - /** Set the cumulative probability of arrival pattern for last - request generated so far. */ - void setCumulativeProbabilitySoFar (const Probability_T& iCumulativeProbability) { - _cumulativeProbabilitySoFar = iCumulativeProbability; - } - - /** Set the number of requests generated so far. */ - void setNumberOfRequestsGeneratedSoFar (const Count_T& iNumberOfRequests) { - _numberOfRequestsGeneratedSoFar = iNumberOfRequests; - } - - public: // ////////// Constructors and destructors ///////// /** Constructor by default */ RandomGenerationContext (); /** Default constructors. */ RandomGenerationContext (const RandomGenerationContext&); - /** Destructor */ - virtual ~RandomGenerationContext (); + ~RandomGenerationContext (); - public: // /////////////// Business Methods ////////// /** Increment counter of requests generated so far */ void incrementGeneratedRequestsCounter (); - - - private: - // ////////// Attributes ////////// + + // ////////// Attributes ////////// /** Cumulative probability in arrival pattern for last request generated so far (needed for sequential generation)*/ Probability_T _cumulativeProbabilitySoFar; Modified: trunk/stdair/stdair/bom/BookingClassContent.cpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassContent.cpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/bom/BookingClassContent.cpp 2010-05-03 08:42:00 UTC (rev 186) @@ -11,47 +11,12 @@ namespace stdair { // //////////////////////////////////////////////////////////////////// - BookingClassContent::BookingClassContent (const Key_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 (const Key_T& iKey) : _key (iKey) { } // //////////////////////////////////////////////////////////////////// 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 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/bom/BookingClassContent.hpp 2010-05-03 08:42:00 UTC (rev 186) @@ -29,193 +29,7 @@ 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. */ @@ -241,98 +55,24 @@ ~BookingClassContent(); public: - // for AIRINV Test - stdair::SubclassCode_T _subclassCode; - stdair::AuthorizationLevel_T _cumulatedProtection; - stdair::AuthorizationLevel_T _protection; - stdair::OverbookingRate_T _noShowPercentage; - stdair::OverbookingRate_T _overbookingPercentage; - stdair::NbOfBookings_T _groupNbOfBookings; - stdair::NbOfBookings_T _groupPendingNbOfBookings; - stdair::NbOfBookings_T _staffNbOfBookings; - stdair::NbOfBookings_T _wlNbOfBookings; - stdair::NbOfBookings_T _etb; - stdair::Availability_T _netClassAvailability; - stdair::Availability_T _segmentAvailability; - stdair::Availability_T _netRevenueAvailability; - - protected: // Attributes - /** The key of both structure and content objects. */ Key_T _key; - - /** Number of current bookings in the booking. */ + SubclassCode_T _subclassCode; + AuthorizationLevel_T _cumulatedProtection; + AuthorizationLevel_T _protection; + NbOfSeats_T _nego; + OverbookingRate_T _noShowPercentage; + OverbookingRate_T _overbookingPercentage; 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; - + NbOfBookings_T _groupNbOfBookings; + NbOfBookings_T _groupPendingNbOfBookings; + NbOfBookings_T _staffNbOfBookings; + NbOfBookings_T _wlNbOfBookings; + NbOfBookings_T _etb; + Availability_T _netClassAvailability; + Availability_T _segmentAvailability; + Availability_T _netRevenueAvailability; + }; } Modified: trunk/stdair/stdair/bom/DemandStreamContent.cpp =================================================================== --- trunk/stdair/stdair/bom/DemandStreamContent.cpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/bom/DemandStreamContent.cpp 2010-05-03 08:42:00 UTC (rev 186) @@ -56,9 +56,9 @@ // //////////////////////////////////////////////////////////////////// void DemandStreamContent::init() { // Generate the number of requests - const RealNumber_T lMu = _demandDistribution.getMeanNumberOfRequests (); + const RealNumber_T lMu = _demandDistribution._meanNumberOfRequests; const RealNumber_T lSigma = - _demandDistribution.getStandardDeviationNumberOfRequests (); + _demandDistribution._standardDeviationNumberOfRequests; const RealNumber_T lRealNumberOfRequestsToBeGenerated = _numberOfRequestsRandomGenerator.generateNormal (lMu, lSigma); Modified: trunk/stdair/stdair/bom/DemandStreamContent.hpp =================================================================== --- trunk/stdair/stdair/bom/DemandStreamContent.hpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/bom/DemandStreamContent.hpp 2010-05-03 08:42:00 UTC (rev 186) @@ -56,83 +56,83 @@ /** Get the arrival pattern. */ const ContinuousFloatDuration_T& getArrivalPattern() const { - return _demandCharacteristics.getArrivalPattern(); + return _demandCharacteristics._arrivalPattern; } /** Get the POS probability mass. */ const POSProbabilityMass_T& getPOSProbabilityMass() const { - return _demandCharacteristics.getPOSProbabilityMass(); + return _demandCharacteristics._posProbabilityMass; } /** Get the channel probability mass. */ const ChannelProbabilityMass_T& getChannelProbabilityMass() const { - return _demandCharacteristics.getChannelProbabilityMass(); + return _demandCharacteristics._channelProbabilityMass; } /** Get the trip type probability mass. */ const TripTypeProbabilityMass_T& getTripTypeProbabilityMass() const { - return _demandCharacteristics.getTripTypeProbabilityMass(); + return _demandCharacteristics._tripTypeProbabilityMass; } /** Get the stay duration probability mass. */ const StayDurationProbabilityMass_T& getStayDurationProbabilityMass() const { - return _demandCharacteristics.getStayDurationProbabilityMass(); + return _demandCharacteristics._stayDurationProbabilityMass; } /** Get the frequent flyer probability mass. */ const FrequentFlyerProbabilityMass_T& getFrequentFlyerProbabilityMass() const { - return _demandCharacteristics.getFrequentFlyerProbabilityMass(); + return _demandCharacteristics._frequentFlyerProbabilityMass; } /** Get the preferred departure time cumulative distribution. */ const PreferredDepartureTimeCumulativeDistribution_T& getPreferredDepartureTimeCumulativeDistribution () const { - return _demandCharacteristics.getPreferredDepartureTimeCumulativeDistribution(); + return _demandCharacteristics._preferredDepartureTimeCumulativeDistribution; } /** Get the WTP cumulative distribution. */ const WTPCumulativeDistribution_T& getWTPCumulativeDistribution() const { - return _demandCharacteristics.getWTPCumulativeDistribution(); + return _demandCharacteristics._wtpCumulativeDistribution; } /** Get the value of time cumulative distribution. */ const ValueOfTimeCumulativeDistribution_T& getValueOfTimeCumulativeDistribution() const { - return _demandCharacteristics.getValueOfTimeCumulativeDistribution(); + return _demandCharacteristics._valueOfTimeCumulativeDistribution; } /** Get the mean number of requests. */ const NbOfRequests_T& getMeanNumberOfRequests() const { - return _demandDistribution.getMeanNumberOfRequests(); + return _demandDistribution._meanNumberOfRequests; } /** Get the standard deviation of number of requests. */ const StandardDeviationValue_T& getStandardDeviationNumberOfRequests() const { - return _demandDistribution.getStandardDeviationNumberOfRequests(); + return _demandDistribution._standardDeviationNumberOfRequests; } /** Get the cumulative probability of arrival pattern for last request generated so far. */ const Probability_T& getCumulativeProbabilitySoFar () const { - return _randomGenerationContext.getCumulativeProbabilitySoFar(); + return _randomGenerationContext._cumulativeProbabilitySoFar; } /** Get the number of requests generated so far. */ const Count_T& getNumberOfRequestsGeneratedSoFar() const { - return _randomGenerationContext.getNumberOfRequestsGeneratedSoFar(); + return _randomGenerationContext._numberOfRequestsGeneratedSoFar; } /** Get the seed of the random generator for the number of requests. */ const RandomSeed_T& getNumberOfRequestsRandomGeneratorSeed () const { - return _numberOfRequestsRandomGenerator.getSeed(); + return _numberOfRequestsRandomGenerator._seed; } /** Get the seed of the random generator for the request datetime. */ const RandomSeed_T& getRequestDateTimeRandomGeneratorSeed () const { - return _requestDateTimeRandomGenerator.getSeed(); + return _requestDateTimeRandomGenerator._seed; } /** Get the seed of the random generator for the demand characteristics. */ const RandomSeed_T& getDemandCharacteristicsRandomGeneratorSeed () const { - return _demandCharacteristicsRandomGenerator.getSeed(); + return _demandCharacteristicsRandomGenerator._seed; } /** Get the demand characteristics. */ @@ -150,14 +150,14 @@ /** Set the cumulative probability of arrival pattern for last request generated so far. */ void setCumulativeProbabilitySoFar (const Probability_T& iCumulativeProbability) { - _randomGenerationContext. - setCumulativeProbabilitySoFar (iCumulativeProbability); + _randomGenerationContext._cumulativeProbabilitySoFar = + iCumulativeProbability; } /** Set the number of requests generated so far. */ void setNumberOfRequestsGeneratedSoFar (const Count_T& iNumberOfRequests) { - _randomGenerationContext. - setNumberOfRequestsGeneratedSoFar (iNumberOfRequests); + _randomGenerationContext._numberOfRequestsGeneratedSoFar = + iNumberOfRequests; } public: Modified: trunk/stdair/stdair/bom/FlightDateContent.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateContent.cpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/bom/FlightDateContent.cpp 2010-05-03 08:42:00 UTC (rev 186) @@ -14,7 +14,7 @@ : _key (iKey), _bookingCounter (DEFAULT_CLASS_NB_OF_BOOKINGS), _flightRevenue (DEFAULT_REVENUE_VALUE), - _flightAverageFare (DEFAULT_CLASS_FARE_VALUE), + _flightAverageFare (DEFAULT_FARE_VALUE), _flightASK (DEFAULT_DISTANCE_VALUE), _flightYield (DEFAULT_REVENUE_VALUE), _flightRPK (DEFAULT_DISTANCE_VALUE), Modified: trunk/stdair/stdair/bom/LegCabinContent.cpp =================================================================== --- trunk/stdair/stdair/bom/LegCabinContent.cpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/bom/LegCabinContent.cpp 2010-05-03 08:42:00 UTC (rev 186) @@ -16,8 +16,8 @@ _capacity (DEFAULT_CABIN_CAPACITY), _soldSeat (DEFAULT_CLASS_NB_OF_BOOKINGS), _commitedSpace (DEFAULT_COMMITED_SPACE), - _availabilityPool (DEFAULT_CLASS_AVAILABILITY), - _availability (DEFAULT_CLASS_AVAILABILITY), + _availabilityPool (DEFAULT_AVAILABILITY), + _availability (DEFAULT_AVAILABILITY), _bidPriceVector (DEFAULT_BID_PRICE_VECTOR), _currentBidPrice (DEFAULT_BID_PRICE) { } Modified: trunk/stdair/stdair/bom/SegmentCabinContent.cpp =================================================================== --- trunk/stdair/stdair/bom/SegmentCabinContent.cpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/bom/SegmentCabinContent.cpp 2010-05-03 08:42:00 UTC (rev 186) @@ -17,11 +17,11 @@ _blockSpace (DEFAULT_BLOCK_SPACE), _bookingCounter (DEFAULT_CLASS_NB_OF_BOOKINGS), _commitedSpace (DEFAULT_COMMITED_SPACE), - _availabilityPool (DEFAULT_CLASS_AVAILABILITY), + _availabilityPool (DEFAULT_AVAILABILITY), _bidPriceVector (DEFAULT_BID_PRICE_VECTOR), _currentBidPrice (DEFAULT_BID_PRICE), _cabinRevenue (DEFAULT_REVENUE_VALUE), - _cabinAverageFare (DEFAULT_CLASS_FARE_VALUE), + _cabinAverageFare (DEFAULT_FARE_VALUE), _cabinUnitRevenue (DEFAULT_REVENUE_VALUE), _cabinRPK (DEFAULT_DISTANCE_VALUE) { } Modified: trunk/stdair/stdair/bom/SegmentDateContent.cpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDateContent.cpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/bom/SegmentDateContent.cpp 2010-05-03 08:42:00 UTC (rev 186) @@ -14,7 +14,7 @@ : _key (iKey), _bookingCounter (DEFAULT_CLASS_NB_OF_BOOKINGS), _segmentRevenue (DEFAULT_REVENUE_VALUE), - _segmentAverageFare (DEFAULT_CLASS_FARE_VALUE), + _segmentAverageFare (DEFAULT_FARE_VALUE), _segmentUnitRevenue (DEFAULT_REVENUE_VALUE), _segmentRPK (DEFAULT_DISTANCE_VALUE) { } Modified: trunk/stdair/stdair/bom/TravelSolutionStruct.cpp =================================================================== --- trunk/stdair/stdair/bom/TravelSolutionStruct.cpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/bom/TravelSolutionStruct.cpp 2010-05-03 08:42:00 UTC (rev 186) @@ -7,6 +7,7 @@ #include <ostream> #include <sstream> // StdAir +#include <stdair/basic/BasConst_BookingClass.hpp> #include <stdair/bom/OutboundPath.hpp> #include <stdair/bom/TravelSolutionStruct.hpp> @@ -22,26 +23,22 @@ TravelSolutionStruct:: TravelSolutionStruct (const TravelSolutionStruct& iTravelSolutionStruct) : _outboundPath_ptr (iTravelSolutionStruct._outboundPath_ptr), - _bookingClassList (iTravelSolutionStruct._bookingClassList) { + _bookingClassList (iTravelSolutionStruct._bookingClassList), + _fare (iTravelSolutionStruct._fare), + _availability (iTravelSolutionStruct._availability) { } // //////////////////////////////////////////////////////////////////// TravelSolutionStruct:: TravelSolutionStruct (OutboundPath& ioOutboundPath, const BookingClassSTLList_T& iBookingClassList) - : _outboundPath_ptr (&ioOutboundPath), - _bookingClassList (iBookingClassList) { + : _outboundPath_ptr (&ioOutboundPath), _bookingClassList (iBookingClassList), + _fare (DEFAULT_FARE_VALUE), _availability (DEFAULT_AVAILABILITY) { } // //////////////////////////////////////////////////////////////////// TravelSolutionStruct::~TravelSolutionStruct () { } - - // ////////////////////////////////////////////////////////////////////// - OutboundPath& TravelSolutionStruct::getOutboundPath() const { - assert (_outboundPath_ptr != NULL); - return *_outboundPath_ptr; - } // ////////////////////////////////////////////////////////////////////// void TravelSolutionStruct::toStream (std::ostream& ioOut) const { Modified: trunk/stdair/stdair/bom/TravelSolutionStruct.hpp =================================================================== --- trunk/stdair/stdair/bom/TravelSolutionStruct.hpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/bom/TravelSolutionStruct.hpp 2010-05-03 08:42:00 UTC (rev 186) @@ -9,6 +9,7 @@ #include <string> #include <vector> // StdAir +#include <stdair/STDAIR_Types.hpp> #include <stdair/basic/StructAbstract.hpp> #include <stdair/bom/BookingClassTypes.hpp> @@ -21,15 +22,24 @@ struct TravelSolutionStruct : public StructAbstract { public: // /////////// Getters /////////////// - /** Get the OutboundPath. */ - OutboundPath& getOutboundPath() const; - - /** Get the list of booking classes. */ + /** Retrieve the attributes of the object. */ + OutboundPath& getOutboundPath() const { + assert (_outboundPath_ptr != NULL); + return *_outboundPath_ptr; + } const BookingClassSTLList_T& getBookingClassList () const { return _bookingClassList; } + const Fare_T getFare() const { return _fare; } + const Availability_T getAvailability() const { return _availability; } public: + // /////////// Setters /////////////// + /** Setter for some attributes. */ + void setFare (const Fare_T& iFare) { _fare = iFare; } + void setAvailability (const Availability_T& iAvail) { _availability=iAvail; } + + public: // /////////// Display support method ///////////// /** Dump a Business Object into an output stream. @param ostream& the output stream. */ @@ -69,6 +79,12 @@ /** The list of booking classes which make the travel solution. */ BookingClassSTLList_T _bookingClassList; + + /** The fare of the travel solution. */ + Fare_T _fare; + + /** The availability of the travel solution. */ + Availability_T _availability; }; } Modified: trunk/stdair/stdair/bom/TravelSolutionTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/TravelSolutionTypes.hpp 2010-05-01 17:32:23 UTC (rev 185) +++ trunk/stdair/stdair/bom/TravelSolutionTypes.hpp 2010-05-03 08:42:00 UTC (rev 186) @@ -6,8 +6,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STL -#include <map> -#include <vector> +#include <list> namespace stdair { @@ -15,7 +14,7 @@ struct TravelSolutionStruct; /** Define the booking class list. */ - typedef std::vector<TravelSolutionStruct> TravelSolutionList_T; + typedef std::list<TravelSolutionStruct> TravelSolutionList_T; } #endif // __STDAIR_BOM_TRAVELSOLUTIONTYPES_HPP This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2010-05-01 17:32:29
|
Revision: 185 http://stdair.svn.sourceforge.net/stdair/?rev=185&view=rev Author: denis_arnaud Date: 2010-05-01 17:32:23 +0000 (Sat, 01 May 2010) Log Message: ----------- [API] Altered the type definition of the subclass code. Modified Paths: -------------- trunk/stdair/stdair/STDAIR_Types.hpp Modified: trunk/stdair/stdair/STDAIR_Types.hpp =================================================================== --- trunk/stdair/stdair/STDAIR_Types.hpp 2010-05-01 17:08:48 UTC (rev 184) +++ trunk/stdair/stdair/STDAIR_Types.hpp 2010-05-01 17:32:23 UTC (rev 185) @@ -246,7 +246,7 @@ /** Define the sub-class code (e.g., 0, 1, 2, etc.). The subclass is a sub-structure for the booking class, allowing to have specific rules for some criteria like POS. */ - typedef std::string SubclassCode_T; + typedef unsigned short SubclassCode_T; /** Define the flight path code (code made by a suite of flight numbers). */ typedef std::string FlightPathCode_T; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2010-05-01 17:08:55
|
Revision: 184 http://stdair.svn.sourceforge.net/stdair/?rev=184&view=rev Author: denis_arnaud Date: 2010-05-01 17:08:48 +0000 (Sat, 01 May 2010) Log Message: ----------- [Samples] Added an inventory dump sample file. Modified Paths: -------------- trunk/stdair/test/samples/invdump01.csv Added Paths: ----------- trunk/stdair/test/samples/invdump02.csv Modified: trunk/stdair/test/samples/invdump01.csv =================================================================== --- trunk/stdair/test/samples/invdump01.csv 2010-04-23 08:53:34 UTC (rev 183) +++ trunk/stdair/test/samples/invdump01.csv 2010-05-01 17:08:48 UTC (rev 184) @@ -1,2 +1,2 @@ -110310/SV/5/110310/INT/KBP;JFK;110310;1410;110310;1555;J,45,47,0,19,25,27,0,20,11:-19:47,11:-18:46,11:-17:45,11:-16:44,11:-15:43,11:-14:42,11:-13:41,11:-12:40,11:-11:39,11:-10:38,11:-9:37,11:-8:36,11:-7:35,11:-6:34,11:-5:33,11:-4:32,11:-3:31,11:-2:30,11:-1:29,11:0:28,11:1:27,11:2:26,11:3:25,11:4:24,11:5:23,11:6:22,69:7:21,127:8:20,184:9:19,242:10:18,300:11:17,478:12:16,656:13:15,833:14:14,1011:15:13,1071:16:12,1131:17:11,1191:18:10,1251:19:9,1431:20:8,1611:21:7,1790:22:6,1970:23:5,1983:24:4,1995:25:3,2008:26:2,2020:27:1;Y,218,225,0,199,17,24,0,201,42:-200:225,42:-199:224,42:-198:223,43:-197:222,44:-196:221,45:-195:220,45:-194:219,46:-193:218,47:-192:217,48:-191:216,48:-190:215,49:-189:214,50:-188:213,51:-187:212,51:-186:211,52:-185:210,53:-184:209,54:-183:208,54:-182:207,55:-181:206,56:-180:205,56:-179:204,57:-178:203,58:-177:202,59:-176:201,59:-175:200,60:-174:199,61:-173:198,62:-172:197,62:-171:196,63:-170:195,64:-169:194,65:-168:193,65:-167:192,66:-166:191,67:-165:190,67:-164:189,68:-163:188,69:-162:187,70:-161:186,70:-160:185,71:-159:184,72:-158:183,73:-157:182,73:-156:181,74:-155:180,75:-154:179,76:-153:178,76:-152:177,77:-151:176,78:-150:175,78:-149:174,79:-148:173,80:-147:172,81:-146:171,81:-145:170,82:-144:169,83:-143:168,84:-142:167,84:-141:166,85:-140:165,86:-139:164,87:-138:163,87:-137:162,88:-136:161,89:-135:160,89:-134:159,90:-133:158,91:-132:157,92:-131:156,92:-130:155,93:-129:154,94:-128:153,95:-127:152,95:-126:151,96:-125:150,97:-124:149,98:-123:148,98:-122:147,99:-121:146,100:-120:145,100:-119:144,101:-118:143,102:-117:142,103:-116:141,103:-115:140,104:-114:139,105:-113:138,106:-112:137,106:-111:136,107:-110:135,108:-109:134,109:-108:133,109:-107:132,110:-106:131,111:-105:130,111:-104:129,112:-103:128,113:-102:127,114:-101:126,114:-100:125,115:-99:124,116:-98:123,117:-97:122,117:-96:121,118:-95:120,119:-94:119,120:-93:118,120:-92:117,121:-91:116,122:-90:115,122:-89:114,123:-88:113,124:-87:112,125:-86:111,125:-85:110,126:-84:109,127:-83:108,128:-82:107,128:-81:106,129:-80:105,130:-79:104,131:-78:103,131:-77:102,132:-76:101,133:-75:100,133:-74:99,134:-73:98,135:-72:97,136:-71:96,136:-70:95,137:-69:94,138:-68:93,139:-67:92,139:-66:91,140:-65:90,141:-64:89,142:-63:88,142:-62:87,143:-61:86,144:-60:85,144:-59:84,145:-58:83,146:-57:82,147:-56:81,147:-55:80,148:-54:79,149:-53:78,150:-52:77,150:-51:76,151:-50:75,152:-49:74,153:-48:73,153:-47:72,154:-46:71,155:-45:70,155:-44:69,156:-43:68,157:-42:67,158:-41:66,158:-40:65,159:-39:64,160:-38:63,161:-37:62,161:-36:61,162:-35:60,163:-34:59,164:-33:58,164:-32:57,165:-31:56,166:-30:55,166:-29:54,167:-28:53,168:-27:52,169:-26:51,169:-25:50,170:-24:49,171:-23:48,172:-22:47,172:-21:46,173:-20:45,174:-19:44,175:-18:43,175:-17:42,176:-16:41,177:-15:40,177:-14:39,178:-13:38,179:-12:37,180:-11:36,180:-10:35,181:-9:34,182:-8:33,183:-7:32,183:-6:31,184:-5:30,185:-4:29,186:-3:28,186:-2:27,187:-1:26,188:0:25,188:1:24,197:2:23,206:3:22,215:4:21,224:5:20,233:6:19,242:7:18,251:8:17,260:9:16,269:10:15,305:11:14,341:12:13,378:13:12,414:14:11,450:15:10,454:16:9,458:17:8,521:18:7,583:19:6,761:20:5,762:21:4,762:22:3,1005:23:2,1248:24:1/KBP;JFK;J,19,J|0:45::5:0:0:1:0:0:0:0:1::26:26:27,C|0:40:J0:6:0:0:2:0:0:0:0:2::22:22:27,D|0:34:C0:9:0:0:5:0:0:0:0:5::18:18:20,I|0:25:D0:10:0:0:6:0:0:0:0:6::14:14:19,F|0:15:I0:8:0:0:3:0:0:0:0:3::10:1:12,U|0:7:F0:7:0:0:2:0:0:0:0:2::5:0:10;Y,199,Y|0:223::2:12:0:1:0:0:0:0:1::24:24:24,B|0:221:Y0:1:12:0:0:0:0:0:0:0::23:23:23,H|0:220:B0:3:7:0:2:0:0:0:0:2::22:22:23,K|0:217:H0:3:0:0:2:0:0:0:0:2::21:21:22,M|0:214:K0:1:0:0:0:0:0:0:0:0::20:20:22,P|0:213:M0:1:0:0:0:0:0:0:0:0::19:19:19,T|0:212:P0:2:0:0:0:0:0:0:0:0::18:18:19,L|0:210:T0:5:4:0:3:0:0:0:0:3::16:11:11,V|0:205:L0:7:1:0:5:0:0:0:0:5::14:14:14,S|0:198:V0:7:6:0:5:0:0:0:0:5::12:9:9,N|0:191:S0:2:0:0:0:0:0:0:0:0::10:10:12,Q|0:185:A0:33:1:0:31:0:0:0:0:31::4:4:11,O|0:152:Q0:15:8:8:13:0:0:0:0:13::2:2:3,Z|0:137:O0:46:1:5:46:0:0:0:0:46::0:-6:9,R|0:91:Z0:41:3:3:41:0:0:0:0:41::0:-5:-5,G|0:189:N0:2:2:0:0:0:0:0:0:0::8:8:9,W|0:50:R0:45:0:3:45:0:0:0:0:45::0:-25:3,X|0:5:W0:5:0:0:5:0:0:0:0:5::0:-5:-10,E|0:0:X0:0:0:0:0:0:0:0:0:0::0:0:-201,A|0:187:G0:2:0:0:0:0:0:0:0:0::6:5:5; -110510/SV/5/110510/INT/KBP;JFK;110510;1410;110510;1550;J,32,32,0,4,28,28,0,4,11:-3:32,58:-2:31,104:-1:30,150:0:29,196:1:28,210:2:27,224:3:26,237:4:25,251:5:24,264:6:23,278:7:22,291:8:21,305:9:20,328:10:19,375:11:18,422:12:17,469:13:16,517:14:15,564:15:14,647:16:13,734:17:12,765:18:11,795:19:10,826:20:9,856:21:8,886:22:7,954:23:6,1041:24:5,1128:25:4,1262:26:3,1396:27:2,1722:28:1;Y,265,274,0,105,160,169,0,105,45:-104:274,45:-103:273,45:-102:272,45:-101:271,45:-100:270,45:-99:269,45:-98:268,45:-97:267,45:-96:266,45:-95:265,45:-94:264,45:-93:263,45:-92:262,45:-91:261,45:-90:260,45:-89:259,45:-88:258,45:-87:257,45:-86:256,45:-85:255,45:-84:254,45:-83:253,45:-82:252,45:-81:251,45:-80:250,45:-79:249,45:-78:248,45:-77:247,45:-76:246,45:-75:245,45:-74:244,45:-73:243,45:-72:242,45:-71:241,45:-70:240,45:-69:239,45:-68:238,45:-67:237,45:-66:236,45:-65:235,45:-64:234,45:-63:233,45:-62:232,45:-61:231,45:-60:230,45:-59:229,45:-58:228,45:-57:227,45:-56:226,45:-55:225,45:-54:224,45:-53:223,45:-52:222,45:-51:221,45:-50:220,45:-49:219,45:-48:218,45:-47:217,45:-46:216,45:-45:215,45:-44:214,45:-43:213,45:-42:212,45:-41:211,45:-40:210,45:-39:209,45:-38:208,45:-37:207,45:-36:206,45:-35:205,45:-34:204,45:-33:203,45:-32:202,45:-31:201,45:-30:200,45:-29:199,45:-28:198,45:-27:197,45:-26:196,45:-25:195,45:-24:194,45:-23:193,45:-22:192,45:-21:191,45:-20:190,45:-19:189,45:-18:188,45:-17:187,45:-16:186,45:-15:185,45:-14:184,45:-13:183,45:-12:182,45:-11:181,45:-10:180,45:-9:179,45:-8:178,45:-7:177,45:-6:176,45:-5:175,45:-4:174,45:-3:173,45:-2:172,45:-1:171,45:0:170,45:1:169,45:2:168,45:3:167,45:4:166,45:5:165,45:6:164,45:7:163,45:8:162,45:9:161,45:10:160,45:11:159,45:12:158,45:13:157,45:14:156,45:15:155,45:16:154,45:17:153,45:18:152,45:19:151,45:20:150,45:21:149,45:22:148,45:23:147,45:24:146,45:25:145,45:26:144,45:27:143,45:28:142,45:29:141,45:30:140,45:31:139,45:32:138,45:33:137,45:34:136,45:35:135,47:36:134,50:37:133,53:38:132,56:39:131,59:40:130,61:41:129,64:42:128,67:43:127,70:44:126,73:45:125,76:46:124,78:47:123,81:48:122,84:49:121,87:50:120,90:51:119,93:52:118,95:53:117,98:54:116,101:55:115,104:56:114,107:57:113,108:58:112,109:59:111,110:60:110,111:61:109,112:62:108,113:63:107,114:64:106,115:65:105,116:66:104,117:67:103,118:68:102,119:69:101,120:70:100,121:71:99,122:72:98,123:73:97,123:74:96,123:75:95,123:76:94,123:77:93,124:78:92,124:79:91,124:80:90,124:81:89,125:82:88,125:83:87,125:84:86,125:85:85,125:86:84,126:87:83,126:88:82,126:89:81,126:90:80,130:91:79,134:92:78,138:93:77,145:94:76,154:95:75,162:96:74,164:97:73,166:98:72,168:99:71,170:100:70,172:101:69,175:102:68,180:103:67,186:104:66,192:105:65,198:106:64,209:107:63,219:108:62,225:109:61,231:110:60,235:111:59,238:112:58,241:113:57,243:114:56,244:115:55,244:116:54,244:117:53,244:118:52,245:119:51,245:120:50,245:121:49,245:122:48,246:123:47,246:124:46,246:125:45,246:126:44,247:127:43,247:128:42,250:129:41,252:130:40,255:131:39,258:132:38,260:133:37,263:134:36,266:135:35,269:136:34,271:137:33,287:138:32,304:139:31,320:140:30,336:141:29,343:142:28,350:143:27,397:144:26,414:145:25,429:146:24,469:147:23,510:148:22,550:149:21,591:150:20,631:151:19,635:152:18,639:153:17,654:154:16,667:155:15,699:156:14,730:157:13,761:158:12,761:159:11,761:160:10,801:161:9,841:162:8,881:163:7,948:164:6,1015:165:5,1081:166:4,1093:167:3,1105:168:2,1117:169:1/KBP;JFK;J,4,J|0:32::4:5:0:4:0:0:0:0:4::28:28:28,C|0:28:J0:3:0:0:0:0:0:0:0:0::28:28:28,D|0:25:C0:4:4:0:0:0:0:0:0:0::25:25:27,I|0:21:D0:12:1:0:0:0:0:0:0:0::21:21:26,F|0:9:I0:2:0:0:0:0:0:0:0:0::9:4:18,U|0:7:F0:7:0:0:0:0:0:0:0:0::7:2:8;Y,105,Y|0:274::4:6:0:1:0:0:0:0:1::169:169:169,B|0:270:Y0:2:0:0:0:0:0:0:0:0::166:166:169,H|0:268:B0:3:0:0:0:0:0:0:0:0::164:164:166,K|0:265:H0:3:0:0:0:0:0:0:0:0::161:161:164,M|0:262:K0:3:5:0:0:0:0:0:0:0::158:158:162,P|0:259:M0:4:0:0:0:0:0:0:0:0::155:155:156,T|0:255:P0:4:0:0:0:0:0:0:0:0::151:150:150,L|0:251:T0:8:2:0:2:0:0:0:0:2::147:140:140,V|0:243:L0:4:0:0:0:0:0:0:0:0::141:141:146,S|0:239:V0:14:4:8:0:0:0:0:0:0::137:135:135,N|0:225:S0:6:2:0:0:0:0:0:0:0::123:123:143,Q|0:191:A0:13:0:0:6:0:0:0:0:6::110:110:140,O|0:178:Q0:18:4:6:0:0:0:0:0:0::103:103:107,Z|0:160:O0:40:1:3:23:0:0:0:0:23::85:17:137,R|0:120:Z0:100:5:7:50:0:0:0:0:50::68:0:103,G|0:219:N0:24:1:0:21:21:0:0:0:21::117:117:133,W|0:20:R0:10:1:0:1:0:0:0:0:1::18:18:107,X|0:10:W0:7:1:0:1:0:0:0:0:1::9:9:103,E|0:3:X0:3:0:0:0:0:0:0:0:0::3:0:-105,A|0:195:G0:4:0:0:0:0:0:0:0:0::114:110:110; +140310/SV/5/110310/INT/KBP;JFK;110310;1410;110310;1555;J,45,47,0,19,25,27,0,20,11:-19:47,11:-18:46,11:-17:45,11:-16:44,11:-15:43,11:-14:42,11:-13:41,11:-12:40,11:-11:39,11:-10:38,11:-9:37,11:-8:36,11:-7:35,11:-6:34,11:-5:33,11:-4:32,11:-3:31,11:-2:30,11:-1:29,11:0:28,11:1:27,11:2:26,11:3:25,11:4:24,11:5:23,11:6:22,69:7:21,127:8:20,184:9:19,242:10:18,300:11:17,478:12:16,656:13:15,833:14:14,1011:15:13,1071:16:12,1131:17:11,1191:18:10,1251:19:9,1431:20:8,1611:21:7,1790:22:6,1970:23:5,1983:24:4,1995:25:3,2008:26:2,2020:27:1;Y,218,225,0,199,17,24,0,201,42:-200:225,42:-199:224,42:-198:223,43:-197:222,44:-196:221,45:-195:220,45:-194:219,46:-193:218,47:-192:217,48:-191:216,48:-190:215,49:-189:214,50:-188:213,51:-187:212,51:-186:211,52:-185:210,53:-184:209,54:-183:208,54:-182:207,55:-181:206,56:-180:205,56:-179:204,57:-178:203,58:-177:202,59:-176:201,59:-175:200,60:-174:199,61:-173:198,62:-172:197,62:-171:196,63:-170:195,64:-169:194,65:-168:193,65:-167:192,66:-166:191,67:-165:190,67:-164:189,68:-163:188,69:-162:187,70:-161:186,70:-160:185,71:-159:184,72:-158:183,73:-157:182,73:-156:181,74:-155:180,75:-154:179,76:-153:178,76:-152:177,77:-151:176,78:-150:175,78:-149:174,79:-148:173,80:-147:172,81:-146:171,81:-145:170,82:-144:169,83:-143:168,84:-142:167,84:-141:166,85:-140:165,86:-139:164,87:-138:163,87:-137:162,88:-136:161,89:-135:160,89:-134:159,90:-133:158,91:-132:157,92:-131:156,92:-130:155,93:-129:154,94:-128:153,95:-127:152,95:-126:151,96:-125:150,97:-124:149,98:-123:148,98:-122:147,99:-121:146,100:-120:145,100:-119:144,101:-118:143,102:-117:142,103:-116:141,103:-115:140,104:-114:139,105:-113:138,106:-112:137,106:-111:136,107:-110:135,108:-109:134,109:-108:133,109:-107:132,110:-106:131,111:-105:130,111:-104:129,112:-103:128,113:-102:127,114:-101:126,114:-100:125,115:-99:124,116:-98:123,117:-97:122,117:-96:121,118:-95:120,119:-94:119,120:-93:118,120:-92:117,121:-91:116,122:-90:115,122:-89:114,123:-88:113,124:-87:112,125:-86:111,125:-85:110,126:-84:109,127:-83:108,128:-82:107,128:-81:106,129:-80:105,130:-79:104,131:-78:103,131:-77:102,132:-76:101,133:-75:100,133:-74:99,134:-73:98,135:-72:97,136:-71:96,136:-70:95,137:-69:94,138:-68:93,139:-67:92,139:-66:91,140:-65:90,141:-64:89,142:-63:88,142:-62:87,143:-61:86,144:-60:85,144:-59:84,145:-58:83,146:-57:82,147:-56:81,147:-55:80,148:-54:79,149:-53:78,150:-52:77,150:-51:76,151:-50:75,152:-49:74,153:-48:73,153:-47:72,154:-46:71,155:-45:70,155:-44:69,156:-43:68,157:-42:67,158:-41:66,158:-40:65,159:-39:64,160:-38:63,161:-37:62,161:-36:61,162:-35:60,163:-34:59,164:-33:58,164:-32:57,165:-31:56,166:-30:55,166:-29:54,167:-28:53,168:-27:52,169:-26:51,169:-25:50,170:-24:49,171:-23:48,172:-22:47,172:-21:46,173:-20:45,174:-19:44,175:-18:43,175:-17:42,176:-16:41,177:-15:40,177:-14:39,178:-13:38,179:-12:37,180:-11:36,180:-10:35,181:-9:34,182:-8:33,183:-7:32,183:-6:31,184:-5:30,185:-4:29,186:-3:28,186:-2:27,187:-1:26,188:0:25,188:1:24,197:2:23,206:3:22,215:4:21,224:5:20,233:6:19,242:7:18,251:8:17,260:9:16,269:10:15,305:11:14,341:12:13,378:13:12,414:14:11,450:15:10,454:16:9,458:17:8,521:18:7,583:19:6,761:20:5,762:21:4,762:22:3,1005:23:2,1248:24:1/KBP;JFK;J,19,J|0:45::5:0:0:1:0:0:0:0:1::26:26:27,C|0:40:J0:6:0:0:2:0:0:0:0:2::22:22:27,D|0:34:C0:9:0:0:5:0:0:0:0:5::18:18:20,I|0:25:D0:10:0:0:6:0:0:0:0:6::14:14:19,F|0:15:I0:8:0:0:3:0:0:0:0:3::10:1:12,U|0:7:F0:7:0:0:2:0:0:0:0:2::5:0:10;Y,199,Y|0:223::2:12:0:1:0:0:0:0:1::24:24:24,B|0:221:Y0:1:12:0:0:0:0:0:0:0::23:23:23,H|0:220:B0:3:7:0:2:0:0:0:0:2::22:22:23,K|0:217:H0:3:0:0:2:0:0:0:0:2::21:21:22,M|0:214:K0:1:0:0:0:0:0:0:0:0::20:20:22,P|0:213:M0:1:0:0:0:0:0:0:0:0::19:19:19,T|0:212:P0:2:0:0:0:0:0:0:0:0::18:18:19,L|0:210:T0:5:4:0:3:0:0:0:0:3::16:11:11,V|0:205:L0:7:1:0:5:0:0:0:0:5::14:14:14,S|0:198:V0:7:6:0:5:0:0:0:0:5::12:9:9,N|0:191:S0:2:0:0:0:0:0:0:0:0::10:10:12,Q|0:185:A0:33:1:0:31:0:0:0:0:31::4:4:11,O|0:152:Q0:15:8:8:13:0:0:0:0:13::2:2:3,Z|0:137:O0:46:1:5:46:0:0:0:0:46::0:-6:9,R|0:91:Z0:41:3:3:41:0:0:0:0:41::0:-5:-5,G|0:189:N0:2:2:0:0:0:0:0:0:0::8:8:9,W|0:50:R0:45:0:3:45:0:0:0:0:45::0:-25:3,X|0:5:W0:5:0:0:5:0:0:0:0:5::0:-5:-10,E|0:0:X0:0:0:0:0:0:0:0:0:0::0:0:-201,A|0:187:G0:2:0:0:0:0:0:0:0:0::6:5:5; +140510/SV/5/110510/INT/KBP;JFK;110510;1410;110510;1550;J,32,32,0,4,28,28,0,4,11:-3:32,58:-2:31,104:-1:30,150:0:29,196:1:28,210:2:27,224:3:26,237:4:25,251:5:24,264:6:23,278:7:22,291:8:21,305:9:20,328:10:19,375:11:18,422:12:17,469:13:16,517:14:15,564:15:14,647:16:13,734:17:12,765:18:11,795:19:10,826:20:9,856:21:8,886:22:7,954:23:6,1041:24:5,1128:25:4,1262:26:3,1396:27:2,1722:28:1;Y,265,274,0,105,160,169,0,105,45:-104:274,45:-103:273,45:-102:272,45:-101:271,45:-100:270,45:-99:269,45:-98:268,45:-97:267,45:-96:266,45:-95:265,45:-94:264,45:-93:263,45:-92:262,45:-91:261,45:-90:260,45:-89:259,45:-88:258,45:-87:257,45:-86:256,45:-85:255,45:-84:254,45:-83:253,45:-82:252,45:-81:251,45:-80:250,45:-79:249,45:-78:248,45:-77:247,45:-76:246,45:-75:245,45:-74:244,45:-73:243,45:-72:242,45:-71:241,45:-70:240,45:-69:239,45:-68:238,45:-67:237,45:-66:236,45:-65:235,45:-64:234,45:-63:233,45:-62:232,45:-61:231,45:-60:230,45:-59:229,45:-58:228,45:-57:227,45:-56:226,45:-55:225,45:-54:224,45:-53:223,45:-52:222,45:-51:221,45:-50:220,45:-49:219,45:-48:218,45:-47:217,45:-46:216,45:-45:215,45:-44:214,45:-43:213,45:-42:212,45:-41:211,45:-40:210,45:-39:209,45:-38:208,45:-37:207,45:-36:206,45:-35:205,45:-34:204,45:-33:203,45:-32:202,45:-31:201,45:-30:200,45:-29:199,45:-28:198,45:-27:197,45:-26:196,45:-25:195,45:-24:194,45:-23:193,45:-22:192,45:-21:191,45:-20:190,45:-19:189,45:-18:188,45:-17:187,45:-16:186,45:-15:185,45:-14:184,45:-13:183,45:-12:182,45:-11:181,45:-10:180,45:-9:179,45:-8:178,45:-7:177,45:-6:176,45:-5:175,45:-4:174,45:-3:173,45:-2:172,45:-1:171,45:0:170,45:1:169,45:2:168,45:3:167,45:4:166,45:5:165,45:6:164,45:7:163,45:8:162,45:9:161,45:10:160,45:11:159,45:12:158,45:13:157,45:14:156,45:15:155,45:16:154,45:17:153,45:18:152,45:19:151,45:20:150,45:21:149,45:22:148,45:23:147,45:24:146,45:25:145,45:26:144,45:27:143,45:28:142,45:29:141,45:30:140,45:31:139,45:32:138,45:33:137,45:34:136,45:35:135,47:36:134,50:37:133,53:38:132,56:39:131,59:40:130,61:41:129,64:42:128,67:43:127,70:44:126,73:45:125,76:46:124,78:47:123,81:48:122,84:49:121,87:50:120,90:51:119,93:52:118,95:53:117,98:54:116,101:55:115,104:56:114,107:57:113,108:58:112,109:59:111,110:60:110,111:61:109,112:62:108,113:63:107,114:64:106,115:65:105,116:66:104,117:67:103,118:68:102,119:69:101,120:70:100,121:71:99,122:72:98,123:73:97,123:74:96,123:75:95,123:76:94,123:77:93,124:78:92,124:79:91,124:80:90,124:81:89,125:82:88,125:83:87,125:84:86,125:85:85,125:86:84,126:87:83,126:88:82,126:89:81,126:90:80,130:91:79,134:92:78,138:93:77,145:94:76,154:95:75,162:96:74,164:97:73,166:98:72,168:99:71,170:100:70,172:101:69,175:102:68,180:103:67,186:104:66,192:105:65,198:106:64,209:107:63,219:108:62,225:109:61,231:110:60,235:111:59,238:112:58,241:113:57,243:114:56,244:115:55,244:116:54,244:117:53,244:118:52,245:119:51,245:120:50,245:121:49,245:122:48,246:123:47,246:124:46,246:125:45,246:126:44,247:127:43,247:128:42,250:129:41,252:130:40,255:131:39,258:132:38,260:133:37,263:134:36,266:135:35,269:136:34,271:137:33,287:138:32,304:139:31,320:140:30,336:141:29,343:142:28,350:143:27,397:144:26,414:145:25,429:146:24,469:147:23,510:148:22,550:149:21,591:150:20,631:151:19,635:152:18,639:153:17,654:154:16,667:155:15,699:156:14,730:157:13,761:158:12,761:159:11,761:160:10,801:161:9,841:162:8,881:163:7,948:164:6,1015:165:5,1081:166:4,1093:167:3,1105:168:2,1117:169:1/KBP;JFK;J,4,J|0:32::4:5:0:4:0:0:0:0:4::28:28:28,C|0:28:J0:3:0:0:0:0:0:0:0:0::28:28:28,D|0:25:C0:4:4:0:0:0:0:0:0:0::25:25:27,I|0:21:D0:12:1:0:0:0:0:0:0:0::21:21:26,F|0:9:I0:2:0:0:0:0:0:0:0:0::9:4:18,U|0:7:F0:7:0:0:0:0:0:0:0:0::7:2:8;Y,105,Y|0:274::4:6:0:1:0:0:0:0:1::169:169:169,B|0:270:Y0:2:0:0:0:0:0:0:0:0::166:166:169,H|0:268:B0:3:0:0:0:0:0:0:0:0::164:164:166,K|0:265:H0:3:0:0:0:0:0:0:0:0::161:161:164,M|0:262:K0:3:5:0:0:0:0:0:0:0::158:158:162,P|0:259:M0:4:0:0:0:0:0:0:0:0::155:155:156,T|0:255:P0:4:0:0:0:0:0:0:0:0::151:150:150,L|0:251:T0:8:2:0:2:0:0:0:0:2::147:140:140,V|0:243:L0:4:0:0:0:0:0:0:0:0::141:141:146,S|0:239:V0:14:4:8:0:0:0:0:0:0::137:135:135,N|0:225:S0:6:2:0:0:0:0:0:0:0::123:123:143,Q|0:191:A0:13:0:0:6:0:0:0:0:6::110:110:140,O|0:178:Q0:18:4:6:0:0:0:0:0:0::103:103:107,Z|0:160:O0:40:1:3:23:0:0:0:0:23::85:17:137,R|0:120:Z0:100:5:7:50:0:0:0:0:50::68:0:103,G|0:219:N0:24:1:0:21:21:0:0:0:21::117:117:133,W|0:20:R0:10:1:0:1:0:0:0:0:1::18:18:107,X|0:10:W0:7:1:0:1:0:0:0:0:1::9:9:103,E|0:3:X0:3:0:0:0:0:0:0:0:0::3:0:-105,A|0:195:G0:4:0:0:0:0:0:0:0:0::114:110:110; Copied: trunk/stdair/test/samples/invdump02.csv (from rev 183, trunk/stdair/test/samples/invdump01.csv) =================================================================== --- trunk/stdair/test/samples/invdump02.csv (rev 0) +++ trunk/stdair/test/samples/invdump02.csv 2010-05-01 17:08:48 UTC (rev 184) @@ -0,0 +1,2 @@ +070410/SV/69/210410/DOM/ODS;DNK;210410;0650;210410;0745;C,10,11,0,1,9,10,0,4,1:-46:57,1:-45:56,1:-44:55,1:-43:54,1:-42:53,1:-41:52,1:-40:51,1:-39:50,1:-38:49,1:-37:48,1:-36:47,1:-35:46,1:-34:45,1:-33:44,1:-32:43,1:-31:42,1:-30:41,1:-29:40,1:-28:39,1:-27:38,1:-26:37,1:-25:36,1:-24:35,1:-23:34,1:-22:33,1:-21:32,1:-20:31,1:-19:30,1:-18:29,1:-17:28,1:-16:27,1:-15:26,1:-14:25,1:-13:24,1:-12:23,1:-11:22,1:-10:21,1:-9:20,1:-8:19,1:-7:18,1:-6:17,1:-5:16,1:-4:15,1:-3:14,1:-2:13,1:-1:12,1:0:11,1:1:10,3:2:9,8:3:8,19:4:7,39:5:6,74:6:5,122:7:4,177:8:3,225:9:2,254:10:1;M,112,117,0,24,88,93,0,51,1:-23:117,1:-22:116,1:-21:115,1:-20:114,1:-19:113,1:-18:112,1:-17:111,1:-16:110,1:-15:109,1:-14:108,1:-13:107,1:-12:106,1:-11:105,1:-10:104,1:-9:103,1:-8:102,1:-7:101,1:-6:100,1:-5:99,1:-4:98,1:-3:97,1:-2:96,1:-1:95,1:0:94,1:1:93,1:2:92,1:3:91,1:4:90,1:5:89,1:6:88,1:7:87,1:8:86,1:9:85,1:10:84,1:11:83,1:12:82,1:13:81,1:14:80,1:15:79,1:16:78,1:17:77,1:18:76,1:19:75,1:20:74,1:21:73,1:22:72,1:23:71,1:24:70,1:25:69,1:26:68,1:27:67,1:28:66,1:29:65,1:30:64,1:31:63,1:32:62,1:33:61,1:34:60,1:35:59,1:36:58,1:37:57,1:38:56,1:39:55,1:40:54,1:41:53,1:42:52,1:43:51,1:44:50,1:45:49,1:46:48,1:47:47,1:48:46,1:49:45,1:50:44,2:51:43,2:52:42,2:53:41,3:54:40,4:55:39,4:56:38,5:57:37,6:58:36,6:59:35,7:60:34,7:61:33,8:62:32,8:63:31,8:64:30,9:65:29,9:66:28,9:67:27,9:68:26,9:69:25,9:70:24,9:71:23,9:72:22,9:73:21,9:74:20,9:75:19,9:76:18,9:77:17,9:78:16,10:79:15,11:80:14,12:81:13,14:82:12,16:83:11,18:84:10,19:85:9,20:86:8,21:87:7,23:88:6,28:89:5,41:90:4,68:91:3,117:92:2,179:93:1/ODS;DNK;C,4,J|0:11::0:0:110:0:0:0:0:0:0:0:10:10:10,C|0:11:J0:3:6:110:1:0:0:0:0:4:0:10:10:10,D|0:8:C0:1:0:110:0:0:0:0:0:0:0:8:8:8,Z|0:7:D0:3:17:110:0:0:0:0:0:0:0:7:7:7,I|0:4:Z0:0:0:110:0:0:0:0:0:0:0:4:4:5,R|0:4:I0:4:17:110:0:0:0:0:0:0:0:4:4:5;M,51,Y|0:117::0:12:104:0:0:0:0:0:1:0:93:93:93,B|0:117:Y0:0:8:104:0:0:0:0:0:0:0:93:93:93,M|0:117:B0:2:11:104:0:0:0:0:0:0:0:93:93:93,H|0:115:M0:1:14:104:0:0:0:0:0:0:0:91:91:91,X|0:114:H0:0:8:104:0:0:0:0:0:0:0:90:90:90,Q|0:114:X0:0:10:104:0:0:0:0:0:0:0:90:90:90,N|0:114:Q0:0:12:104:0:0:0:0:0:0:0:90:90:90,V|0:114:N0:2:17:104:0:0:0:0:0:0:0:90:90:90,W|0:112:V0:2:10:104:0:0:0:0:0:0:0:88:88:88,U|0:110:W0:0:8:104:0:0:0:0:0:0:0:86:64:64,S|0:110:U0:0:0:104:0:0:0:0:0:0:0:86:64:64,P|0:110:S0:0:4:104:1:0:0:0:0:8:0:86:86:10000,G|0:110:P0:6:4:104:0:0:0:0:0:0:0:86:86:10000,K|0:104:G0:7:4:104:0:0:0:0:0:0:0:81:81:10000,L|0:97:K0:21:5:104:9:0:0:0:0:42:0:74:74:10000,T|0:76:L0:38:5:104:0:0:0:0:0:0:0:62:62:10000,E|0:38:T0:38:5:104:14:0:0:0:0:0:0:24:24:10000; +070410/SV/70/210410/DOM/DNK;ODS;210410;0710;210410;0810;C,10,11,0,1,9,10,0,2,1:-46:57,1:-45:56,1:-44:55,1:-43:54,1:-42:53,1:-41:52,1:-40:51,1:-39:50,1:-38:49,1:-37:48,1:-36:47,1:-35:46,1:-34:45,1:-33:44,1:-32:43,1:-31:42,1:-30:41,1:-29:40,1:-28:39,1:-27:38,1:-26:37,1:-25:36,1:-24:35,1:-23:34,1:-22:33,1:-21:32,1:-20:31,1:-19:30,1:-18:29,1:-17:28,1:-16:27,1:-15:26,1:-14:25,1:-13:24,1:-12:23,1:-11:22,1:-10:21,1:-9:20,1:-8:19,1:-7:18,1:-6:17,1:-5:16,1:-4:15,1:-3:14,1:-2:13,1:-1:12,1:0:11,1:1:10,1:2:9,2:3:8,6:4:7,17:5:6,38:6:5,79:7:4,146:8:3,236:9:2,430:10:1;M,112,120,0,25,87,95,0,60,1:-24:120,1:-23:119,1:-22:118,1:-21:117,1:-20:116,1:-19:115,1:-18:114,1:-17:113,1:-16:112,1:-15:111,1:-14:110,1:-13:109,1:-12:108,1:-11:107,1:-10:106,1:-9:105,1:-8:104,1:-7:103,1:-6:102,1:-5:101,1:-4:100,1:-3:99,1:-2:98,1:-1:97,1:0:96,1:1:95,1:2:94,1:3:93,1:4:92,1:5:91,1:6:90,1:7:89,1:8:88,1:9:87,1:10:86,1:11:85,1:12:84,1:13:83,1:14:82,1:15:81,1:16:80,1:17:79,1:18:78,1:19:77,1:20:76,1:21:75,1:22:74,1:23:73,1:24:72,1:25:71,1:26:70,1:27:69,1:28:68,1:29:67,1:30:66,1:31:65,1:32:64,1:33:63,1:34:62,1:35:61,1:36:60,1:37:59,1:38:58,1:39:57,1:40:56,1:41:55,1:42:54,1:43:53,2:44:52,2:45:51,2:46:50,3:47:49,3:48:48,4:49:47,4:50:46,5:51:45,6:52:44,6:53:43,7:54:42,7:55:41,8:56:40,8:57:39,8:58:38,8:59:37,9:60:36,9:61:35,9:62:34,9:63:33,9:64:32,9:65:31,9:66:30,9:67:29,9:68:28,9:69:27,9:70:26,9:71:25,9:72:24,9:73:23,9:74:22,9:75:21,9:76:20,10:77:19,11:78:18,12:79:17,13:80:16,15:81:15,16:82:14,18:83:13,19:84:12,20:85:11,20:86:10,21:87:9,21:88:8,21:89:7,23:90:6,27:91:5,38:92:4,62:93:3,111:94:2,199:95:1/DNK;ODS;C,2,J|0:11::0:0:110:0:0:0:0:0:0:0:10:9:9,C|0:11:J0:0:7:110:1:0:0:0:0:2:0:10:9:9,D|0:11:C0:1:8:110:0:0:0:0:0:0:0:10:8:8,Z|0:10:D0:0:10:110:0:0:0:0:0:0:0:10:7:7,I|0:10:Z0:2:5:110:0:0:0:0:0:0:0:10:6:6,R|0:8:I0:8:15:110:0:0:0:0:0:0:0:8:6:6;M,60,Y|0:120::0:12:107:0:0:0:0:0:1:0:95:95:95,B|0:120:Y0:1:7:107:1:0:0:0:0:0:0:95:95:95,M|0:119:B0:1:6:107:0:0:0:0:0:0:0:95:94:94,H|0:118:M0:1:15:107:0:0:0:0:0:0:0:94:93:93,X|0:117:H0:0:0:107:0:0:0:0:0:0:0:93:93:93,Q|0:117:X0:0:14:107:0:0:0:0:0:0:0:93:93:93,N|0:117:Q0:0:6:107:0:0:0:0:0:0:0:93:92:92,V|0:117:N0:0:8:107:0:0:0:0:0:0:0:93:92:92,W|0:117:V0:3:12:107:2:0:0:0:0:2:0:93:90:90,U|0:114:W0:0:0:107:0:0:0:0:0:0:0:92:59:59,S|0:114:U0:4:13:107:0:0:0:0:0:0:0:92:59:59,P|0:110:S0:0:6:107:1:0:0:0:0:13:0:88:88:10000,G|0:110:P0:8:6:107:0:0:0:0:0:0:0:88:88:10000,K|0:102:G0:11:6:107:0:0:0:0:0:0:0:81:81:10000,L|0:91:K0:19:7:107:9:0:0:0:0:44:0:70:70:10000,T|0:72:L0:36:7:107:0:0:0:0:0:0:0:60:60:10000,E|0:36:T0:36:7:107:12:0:0:0:0:0:0:24:24:10000; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2010-04-23 08:53:40
|
Revision: 183 http://stdair.svn.sourceforge.net/stdair/?rev=183&view=rev Author: quannaus Date: 2010-04-23 08:53:34 +0000 (Fri, 23 Apr 2010) Log Message: ----------- [dev] Implemented some functions within CmdBomManager. Modified Paths: -------------- trunk/stdair/stdair/STDAIR_Service.hpp trunk/stdair/stdair/command/CmdBomManager.cpp trunk/stdair/stdair/command/CmdBomManager.hpp trunk/stdair/stdair/service/STDAIR_Service.cpp Modified: trunk/stdair/stdair/STDAIR_Service.hpp =================================================================== --- trunk/stdair/stdair/STDAIR_Service.hpp 2010-04-22 14:41:11 UTC (rev 182) +++ trunk/stdair/stdair/STDAIR_Service.hpp 2010-04-23 08:53:34 UTC (rev 183) @@ -14,8 +14,6 @@ // Forward declarations class BomRoot; - class YieldStore; - class Inventory; /** Interface for the STDAIR Services. */ class STDAIR_Service { @@ -42,19 +40,7 @@ /** Destructor. */ ~STDAIR_Service(); - - /** Retrieve the Inventory corresponding to the given airline code - (Inventory key). - <br>If not existing, a ObjectNotFoundException exception is thrown. */ - Inventory& getInventory (const AirlineCode_T& iAirlineCode) const; - - /** Retrieve the Yield Store corresponding to the given airline code - (YieldStore key). - <br>If not existing, a ObjectNotFoundException exception is thrown. */ - YieldStore& getYieldStore (const AirlineCode_T& iAirlineCode) const; - - // ///////////////// Getters /////////////////// /** Get a reference on the BomRoot object. <br>If the service context has not been initialised, that @@ -62,23 +48,6 @@ BomRoot& getBomRoot () const { return _bomRoot; } - - public: - // /////// Construction and Destruction helper methods /////// - /** Retrieve the Inventory corresponding to the given airline code - (Inventory key). - <br>If not existing, a ObjectNotFoundException exception is thrown. */ - Inventory& createInventory (const AirlineCode_T& iAirlineCode) const; - - /** Retrieve the YieldStore corresponding to the given airline code - (YieldStore key). - <br>If not existing, a ObjectNotFoundException exception is thrown. */ - YieldStore& createYieldStore (const AirlineCode_T& iAirlineCode) const; - - /** Add the airline-specific AirlineFeature object to its AirlineFeatureSet - parent. */ - void addAirlineFeature (const AirlineCode_T& iAirlineCode) const; - private: // /////// Construction and Destruction helper methods /////// @@ -86,13 +55,10 @@ STDAIR_Service (); /** Default copy constructor. */ STDAIR_Service (const STDAIR_Service&); - /** Initialise the log. */ void logInit (const BasLogParams&); - /** Initialise the database session. */ void dbInit (const BasDBParams&); - /** Initialise. <br>The static instance of the log service (Logger object) is created. <br>The static instance of the database session manager @@ -103,10 +69,8 @@ in any service context. However, some lock mechanism may be needed in order to secure the access to the corresponding resources. */ void init (); - /** Finalise. */ void finalise (); - private: // /////////////// Attributes /////////////// Modified: trunk/stdair/stdair/command/CmdBomManager.cpp =================================================================== --- trunk/stdair/stdair/command/CmdBomManager.cpp 2010-04-22 14:41:11 UTC (rev 182) +++ trunk/stdair/stdair/command/CmdBomManager.cpp 2010-04-23 08:53:34 UTC (rev 183) @@ -3,13 +3,7 @@ // ////////////////////////////////////////////////////////////////////// // STL #include <cassert> -// Boost -#include <boost/make_shared.hpp> // StdAir -#include <stdair/bom/BomRoot.hpp> -#include <stdair/bom/Inventory.hpp> -#include <stdair/bom/YieldStore.hpp> -#include <stdair/bom/AirlineFeature.hpp> #include <stdair/bom/BomSource.hpp> #include <stdair/factory/FacBomContent.hpp> #include <stdair/command/CmdBomManager.hpp> @@ -18,8 +12,8 @@ namespace stdair { // ////////////////////////////////////////////////////////////////////// - void CmdBomManager::addAirlineFeature (BomRoot& ioBomRoot, - const AirlineCode_T& iAirlineCode) { + void CmdBomManager::createAirlineFeature (const BomRoot& iBomRoot, + const AirlineCode_T& iAirlineCode) { // Initialise an AirlineFeature object AirlineFeatureKey_T lAirlineFeatureKey (iAirlineCode); @@ -27,84 +21,175 @@ instance().create<AirlineFeature> (lAirlineFeatureKey); // Add the AirlineFeature object to its AirlineFeatureSet parent - FacBomContent::linkWithParent (lAirlineFeature, ioBomRoot); + FacBomContent::linkWithParent (lAirlineFeature, iBomRoot); // Link the AirlineFeature with its corresponding inventory (if exist) - Inventory* lInventory_ptr = ioBomRoot.getInventory (iAirlineCode); + Inventory* lInventory_ptr = iBomRoot.getInventory (iAirlineCode); if (lInventory_ptr != NULL) { lInventory_ptr->setAirlineFeature (&lAirlineFeature); } } - + // ////////////////////////////////////////////////////////////////////// + YieldStore& CmdBomManager:: + createYieldStore (const BomRoot& iBomRoot, + const AirlineCode_T& iAirlineCode) { + // Instantiate an YieldStore object with the given airline code + YieldStoreKey_T lYieldStoreKey (iAirlineCode); + YieldStore& oYieldStore = + stdair::FacBomContent::instance().create<YieldStore> (lYieldStoreKey); + // Link the created YieldStore with the bom root. + FacBomContent::linkWithParent (oYieldStore, iBomRoot); + + return oYieldStore; + } + + // ////////////////////////////////////////////////////////////////////// Inventory& CmdBomManager:: - createInventoryInternal (BomRoot& ioBomRoot, - const AirlineCode_T& iAirlineCode) { + createInventory (const BomRoot& iBomRoot, + const AirlineCode_T& iAirlineCode) { + // Instantiate an inventory object with the given airline code InventoryKey_T lInventoryKey (iAirlineCode); - - // Instantiate an Inventory object with the given airline code - Inventory& lInventory = + Inventory& oInventory = FacBomContent::instance().create<Inventory> (lInventoryKey); + // Link the created inventory with the bom root. + FacBomContent::linkWithParent (oInventory, iBomRoot); - // Link the created inventory with the bom root. - FacBomContent::linkWithParent (lInventory, ioBomRoot); + // Create the AirlineFeature for the inventory. + createAirlineFeature (iBomRoot, iAirlineCode); - return lInventory; + return oInventory; } + + // ////////////////////////////////////////////////////////////////////// + FlightDate& CmdBomManager:: + createFlightDate (const Inventory& iInventory, + const FlightDateKey_T& iFlightDateKey) { + // Instantiate a flight-date object with the given key. + FlightDate& oFlightDate = + FacBomContent::instance().create<FlightDate> (iFlightDateKey); + // Link the created inventory with the inventory. + FacBomContent::linkWithParent (oFlightDate, iInventory); + + return oFlightDate; + } // ////////////////////////////////////////////////////////////////////// - Inventory& CmdBomManager:: - getOrCreateInventory (BomRoot& ioBomRoot, - const AirlineCode_T& iAirlineCode) { - Inventory* lInventory_ptr = ioBomRoot.getInventory (iAirlineCode); + LegDate& CmdBomManager:: + createLegDate (const FlightDate& iFlightDate, + const AirportCode_T& iBoardingPoint) { + // Instantiate a leg-date object with the given boarding point + LegDateKey_T lLegDateKey (iBoardingPoint); + LegDate& oLegDate = FacBomContent::instance().create<LegDate> (lLegDateKey); + // Link the created leg-date with the flight-date. + FacBomContent::linkWithParent (oLegDate, iFlightDate); + + return oLegDate; + } - // If there is no Inventory object for that airline already, create one - if (lInventory_ptr == NULL) { - // Instantiate an Inventory object with the given airline code - lInventory_ptr = &createInventoryInternal (ioBomRoot, iAirlineCode); - assert (lInventory_ptr != NULL); - - // Set the AirlineFeature for the inventory. - addAirlineFeature (ioBomRoot, iAirlineCode); - } - assert (lInventory_ptr != NULL); - - return *lInventory_ptr; + // ////////////////////////////////////////////////////////////////////// + LegCabin& CmdBomManager:: + createLegCabin (const LegDate& iLegDate, + const CabinCode_T& iCabinCode) { + // Instantiate a leg-cabin object with the given cabin code + LegCabinKey_T lLegCabinKey (iCabinCode); + LegCabin& oLegCabin = + FacBomContent::instance().create<LegCabin> (lLegCabinKey); + // Link the created leg-cabin with the leg-date. + FacBomContent::linkWithParent (oLegCabin, iLegDate); + + return oLegCabin; } // ////////////////////////////////////////////////////////////////////// - YieldStore& CmdBomManager:: - createYieldStoreInternal (BomRoot& ioBomRoot, - const AirlineCode_T& iAirlineCode) { - YieldStoreKey_T lYieldStoreKey (iAirlineCode); - - // Instantiate an YieldStore object with the given airline code - YieldStore& lYieldStore = - stdair::FacBomContent::instance().create<YieldStore> (lYieldStoreKey); - - // Link the created YieldStore with the bom root. - FacBomContent::linkWithParent (lYieldStore, ioBomRoot); - - return lYieldStore; + SegmentDate& CmdBomManager:: + createSegmentDate (const FlightDate& iFlightDate, + const SegmentDateKey_T& iSegmentDateKey) { + // Instantiate a segment-date object with the given key. + SegmentDate& oSegmentDate = + FacBomContent::instance().create<SegmentDate> (iSegmentDateKey); + // Link the created segment-date with the flight-date. + FacBomContent::linkWithParent (oSegmentDate, iFlightDate); + + return oSegmentDate; } // ////////////////////////////////////////////////////////////////////// - YieldStore& CmdBomManager:: - getOrCreateYieldStore (BomRoot& ioBomRoot, - const AirlineCode_T& iAirlineCode) { - YieldStore* lYieldStore_ptr = ioBomRoot.getYieldStore (iAirlineCode); + SegmentCabin& CmdBomManager:: + createSegmentCabin (const SegmentDate& iSegmentDate, + const CabinCode_T& iCabinCode) { + // Instantiate a segment-cabin object with the given cabin code + SegmentCabinKey_T lSegmentCabinKey (iCabinCode); + SegmentCabin& oSegmentCabin = + FacBomContent::instance().create<SegmentCabin> (lSegmentCabinKey); + // Link the created segment-cabin with the segment-date. + FacBomContent::linkWithParent (oSegmentCabin, iSegmentDate); + + return oSegmentCabin; + } - // If there is no YieldStore object for that airline already, create one - if (lYieldStore_ptr == NULL) { - const YieldStoreKey_T lYieldStoreKey (iAirlineCode); + // //////////////////////////////////////////////////////////////////// + void CmdBomManager::createBookingClass (const SegmentCabin& iSegmentCabin, + const ClassCode_T& iClassCode) { + // Instantiate a booking class object with the given class code + const BookingClassKey_T lClassKey (iClassCode); + BookingClass& lClass = + FacBomContent::instance().create<BookingClass> (lClassKey); + // Link the created booking-class with its parent segment-cabin. + FacBomContent::linkWithParent (lClass, iSegmentCabin); + } - // Instantiate a YieldStore object with the given airline code - lYieldStore_ptr = &createYieldStoreInternal (ioBomRoot, iAirlineCode); - assert (lYieldStore_ptr != NULL); - } - assert (lYieldStore_ptr != NULL); + // ////////////////////////////////////////////////////////////////////// + Network& CmdBomManager:: + createNetwork (const BomRoot& iBomRoot, + const NetworkKey_T& iNetworkKey) { + // Instantiate an network object with the given key + Network& oNetwork = + FacBomContent::instance().create<Network> (iNetworkKey); + // Link the created inventory with the bom root. + FacBomContent::linkWithParent (oNetwork, iBomRoot); + + return oNetwork; + } + + // ////////////////////////////////////////////////////////////////////// + NetworkDate& CmdBomManager:: + createNetworkDate (const Network& iNetwork, const Date_T& iDate) { + // Instantiate a network-date object with the given date. + const NetworkDateKey_T lNetworkDateKey (iDate); + NetworkDate& oNetworkDate = + FacBomContent::instance().create<NetworkDate> (lNetworkDateKey); + // Link the created network with the bom root + FacBomContent::linkWithParent (oNetworkDate, iNetwork); + + return oNetworkDate; + } - return *lYieldStore_ptr; + // ////////////////////////////////////////////////////////////////////// + AirportDate& CmdBomManager:: + createAirportDate (const NetworkDate& iNetworkDate, + const AirportCode_T& iBoardingPoint) { + // Instantiate a airport-date object with the given boarding point + AirportDateKey_T lAirportDateKey (iBoardingPoint); + AirportDate& oAirportDate = + FacBomContent::instance().create<AirportDate> (lAirportDateKey); + // Link the created airport-date with the network-date. + FacBomContent::linkWithParent (oAirportDate, iNetworkDate); + + return oAirportDate; } + // ////////////////////////////////////////////////////////////////////// + OutboundPath& CmdBomManager:: + createOutboundPath (const AirportDate& iAirportDate, + const OutboundPathKey_T& iOutboundPathKey) { + // Instantiate a outbound path object with the given key. + OutboundPath& oOutboundPath = + FacBomContent::instance().create<OutboundPath> (iOutboundPathKey); + // Link the created outbound path with the airport-date + FacBomContent::linkWithParent (oOutboundPath, iAirportDate); + + return oOutboundPath; + } + } Modified: trunk/stdair/stdair/command/CmdBomManager.hpp =================================================================== --- trunk/stdair/stdair/command/CmdBomManager.hpp 2010-04-22 14:41:11 UTC (rev 182) +++ trunk/stdair/stdair/command/CmdBomManager.hpp 2010-04-23 08:53:34 UTC (rev 183) @@ -13,58 +13,79 @@ // Forward declarations class BomRoot; class Inventory; + class FlightDate; + class SegmentDate; + class SegmentCabin; + class LegDate; + class LegCabin; + class Bucket; + class Network; + class NetworkDate; + class AirportDate; + class OutboundPath; + class YieldStore; + class DemandStream; + struct FlightDateKey_T; + struct SegmentDateKey_T; + struct NetworkKey_T; + struct OutboundPathKey_T; /** Class wrapping utility functions for handling the BOM tree objects. */ class CmdBomManager : public CmdAbstract { public: - - /** If needed, create the Inventory corresponding to the given airline code - (Inventory key), link it to the BomRoot object and to the - associated AirlineFeature object, itself retrieved from the - AirlineFeatureSet object. - Otherwise, just retrieve the reference on the existing Inventory object - corresponding to the given airline code. - <br>If not existing, a ObjectNotFoundException exception is thrown. + + /** Create the airline-specific AirlineFeature object to the BomRoot + and its corresponding Inventory. @param BomRoot& Root of the BOM tree. @param const AirlineCode_T& Airline code for the inventory to be created . */ - static Inventory& getOrCreateInventory (BomRoot&, const AirlineCode_T&); + static void createAirlineFeature (const BomRoot&, const AirlineCode_T&); - /** If needed, create the YieldStore corresponding to the given airline code - (YieldStore key), link it to the BomRoot object and to the - associated AirlineFeature object, itself retrieved from the - AirlineFeatureSet object. - Otherwise, just retrieve the reference on the existing YieldStore object - corresponding to the given airline code. - <br>If not existing, a ObjectNotFoundException exception is thrown. - @param BomRoot& Root of the BOM tree. - @param const AirlineCode_T& Airline code for the YieldStore to be - created . */ - static YieldStore& getOrCreateYieldStore (BomRoot&, const AirlineCode_T&); - - /** Add the airline-specific AirlineFeature object to its AirlineFeatureSet - parent. - @param BomRoot& Root of the BOM tree. - @param const AirlineCode_T& Airline code for the inventory to be - created . */ - static void addAirlineFeature (BomRoot&, const AirlineCode_T& iAirlineCode); + /** Create the YieldStore corresponding to the given airline code + (YieldStore key). */ + static YieldStore& createYieldStore (const BomRoot&, const AirlineCode_T&); + + /** Create the inventory corresponding to the given airline code + (Inventory key), link it to the BomRoot object and to the + associated AirlineFeature object. */ + static Inventory& createInventory (const BomRoot&, const AirlineCode_T&); + + /** Create the flight-date corresponding to the given key. */ + static FlightDate& createFlightDate (const Inventory&, + const FlightDateKey_T&); + + /** Create the leg-date corresponding to the given boarding point. */ + static LegDate& createLegDate (const FlightDate&, const AirportCode_T&); + + /** Create the leg-cabin corresponding to the given cabin code. */ + static LegCabin& createLegCabin (const LegDate&, const CabinCode_T&); - private: - // ///////////////////// Internal support methods //////////////////////// - /** Create the Inventory corresponding to the given airline code - (Inventory key). - @param BomRoot& Root of the BOM tree. - @param const AirlineCode_T& Airline code for the inventory to be - created . */ - static Inventory& createInventoryInternal (BomRoot&, const AirlineCode_T&); + /** Create the segment-date corresponding to the given key. */ + static SegmentDate& createSegmentDate (const FlightDate&, + const SegmentDateKey_T&); - /** Create the YieldStore corresponding to the given airline code - (YieldStore key). - @param BomRoot& Root of the BOM tree. - @param const AirlineCode_T& Airline code for the YieldStore to be - created . */ - static YieldStore& createYieldStoreInternal (BomRoot&, - const AirlineCode_T&); + /** Create the segment-cabin corresponding to the given cabin code. */ + static SegmentCabin& createSegmentCabin (const SegmentDate&, + const CabinCode_T&); + + /** Create the booking class corresponding to the given class code. */ + static void createBookingClass (const SegmentCabin&, const ClassCode_T&); + + /** Create the inventory corresponding to the given network key, + then link it to the BomRoot object. */ + static Network& createNetwork (const BomRoot&, const NetworkKey_T&); + + /** Create the network-date corresponding to the given date. */ + static NetworkDate& createNetworkDate (const Network&, const Date_T&); + + /** Create the airport-date corresponding to the given boarding point. */ + static AirportDate& createAirportDate (const NetworkDate&, + const AirportCode_T&); + + /** Create the outbound path corresponding to the given key. */ + static OutboundPath& createOutboundPath (const AirportDate&, + const OutboundPathKey_T&); + }; } Modified: trunk/stdair/stdair/service/STDAIR_Service.cpp =================================================================== --- trunk/stdair/stdair/service/STDAIR_Service.cpp 2010-04-22 14:41:11 UTC (rev 182) +++ trunk/stdair/stdair/service/STDAIR_Service.cpp 2010-04-23 08:53:34 UTC (rev 183) @@ -82,67 +82,10 @@ } // ////////////////////////////////////////////////////////////////////// - void STDAIR_Service:: - addAirlineFeature (const AirlineCode_T& iAirlineCode) const { - // Delegate to the dedicated command - CmdBomManager::addAirlineFeature (_bomRoot, iAirlineCode); - } - - // ////////////////////////////////////////////////////////////////////// void STDAIR_Service::finalise () { //std::cout << "In STDAIR_Service destructor, before cleaning" << std::endl; FacSupervisor::cleanAll(); //std::cout << "In STDAIR_Service destructor, after cleaning" << std::endl; } - // ////////////////////////////////////////////////////////////////////// - Inventory& STDAIR_Service:: - getInventory (const AirlineCode_T& iAirlineCode) const { - - Inventory* lInventory_ptr = _bomRoot.getInventory (iAirlineCode); - if (lInventory_ptr == NULL) { - throw ObjectNotFoundException(); - } - assert (lInventory_ptr != NULL); - - return *lInventory_ptr; - } - - // ////////////////////////////////////////////////////////////////////// - YieldStore& STDAIR_Service:: - getYieldStore (const AirlineCode_T& iAirlineCode) const { - - YieldStore* lYieldStore_ptr = _bomRoot.getYieldStore (iAirlineCode); - if (lYieldStore_ptr == NULL) { - throw ObjectNotFoundException(); - } - assert (lYieldStore_ptr != NULL); - - return *lYieldStore_ptr; - } - - /** - Note that the AirlineFeature is linked both to the Inventory - and to the AirlineFeatureSet, which in turn is linked to the BomRoot. - There is therefore a duplication of the structure links. - */ - - // ////////////////////////////////////////////////////////////////////// - Inventory& STDAIR_Service:: - createInventory (const AirlineCode_T& iAirlineCode) const { - // Delegate to the dedicated command - Inventory& oInventory = - CmdBomManager::getOrCreateInventory (_bomRoot, iAirlineCode); - return oInventory; - } - - // ////////////////////////////////////////////////////////////////////// - YieldStore& STDAIR_Service:: - createYieldStore (const AirlineCode_T& iAirlineCode) const { - // Delegate to the dedicated command - YieldStore& oYieldStore = - CmdBomManager::getOrCreateYieldStore (_bomRoot, iAirlineCode); - return oYieldStore; - } - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2010-04-22 14:41:20
|
Revision: 182 http://stdair.svn.sourceforge.net/stdair/?rev=182&view=rev Author: quannaus Date: 2010-04-22 14:41:11 +0000 (Thu, 22 Apr 2010) Log Message: ----------- [dev] Added some comments in BomRoot. Modified Paths: -------------- trunk/stdair/stdair/bom/BomRoot.hpp Modified: trunk/stdair/stdair/bom/BomRoot.hpp =================================================================== --- trunk/stdair/stdair/bom/BomRoot.hpp 2010-04-22 14:02:30 UTC (rev 181) +++ trunk/stdair/stdair/bom/BomRoot.hpp 2010-04-22 14:41:11 UTC (rev 182) @@ -30,7 +30,9 @@ <li>Parent_T: Type corresponding to the parent BOM class within that namespace (e.g., AIRSCHED here)</li> <li>ChildrenHolderMap_T: The map between the type of children and - a pointer to the bom holder of this type (e.g., AIRSCHED here)</li> + a pointer to the bom holder of this type (e.g., AIRSCHED here). + All the pointers to the bom holder should be initialised to + NULL in the init() function.</li> </ul> <br><br> Note that the parent type of BomRoot is its own type. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2010-04-22 14:02:37
|
Revision: 181 http://stdair.svn.sourceforge.net/stdair/?rev=181&view=rev Author: quannaus Date: 2010-04-22 14:02:30 +0000 (Thu, 22 Apr 2010) Log Message: ----------- [dev] 'linkTwoObjects' in FacBomContent now uses the full keys. Modified Paths: -------------- trunk/stdair/stdair/command/CmdBomManager.cpp trunk/stdair/stdair/factory/FacBomContent.hpp trunk/stdair/stdair/factory/FacBomStructure.hpp Modified: trunk/stdair/stdair/command/CmdBomManager.cpp =================================================================== --- trunk/stdair/stdair/command/CmdBomManager.cpp 2010-04-22 12:25:56 UTC (rev 180) +++ trunk/stdair/stdair/command/CmdBomManager.cpp 2010-04-22 14:02:30 UTC (rev 181) @@ -48,15 +48,6 @@ // Link the created inventory with the bom root. FacBomContent::linkWithParent (lInventory, ioBomRoot); - - // DEBUG - STDAIR_LOG_DEBUG ("Generated inventory: " << iAirlineCode); - const InventoryList_T lInvList = ioBomRoot.getInventoryList(); - for (InventoryList_T::iterator itInv = lInvList.begin(); - itInv != lInvList.end(); ++itInv) { - const Inventory& lCurrentInv = *itInv; - STDAIR_LOG_DEBUG ("Current inventory: " << lCurrentInv.describeKey()); - } return lInventory; } Modified: trunk/stdair/stdair/factory/FacBomContent.hpp =================================================================== --- trunk/stdair/stdair/factory/FacBomContent.hpp 2010-04-22 12:25:56 UTC (rev 180) +++ trunk/stdair/stdair/factory/FacBomContent.hpp 2010-04-22 14:02:30 UTC (rev 181) @@ -73,7 +73,8 @@ } // ////////////////////////////////////////////////////////////////// - /** Link two child content objects, the second one into the first one. */ + /** Link two child content objects, the second one into the first one, + using the short key. */ template <typename PARENT, typename CHILD> static void addObjectToTheDedicatedList (PARENT& ioParent, const CHILD& iChild) { @@ -89,11 +90,28 @@ } // ////////////////////////////////////////////////////////////////// + /** Link two child content objects, the second one into the first one, + using the full key. */ + template <typename PARENT, typename CHILD> + static void addFullObjectToTheDedicatedList (PARENT& ioParent, + const CHILD& iChild) { + + // Link both the parent and child structure objects + const bool hasLinkBeenSuccessful = + FacBomStructure::addFullObjectToTheDedicatedList (ioParent._structure, + iChild._structure); + + if (hasLinkBeenSuccessful == false) { + throw ObjectLinkingException(); + } + } + + // ////////////////////////////////////////////////////////////////// /** Link two child content objects. */ template <typename OBJECT1, typename OBJECT2> static void linkTwoObjects (OBJECT1& ioObject1, OBJECT2& ioObject2) { - addObjectToTheDedicatedList (ioObject1, ioObject2); - addObjectToTheDedicatedList (ioObject2, ioObject1); + addFullObjectToTheDedicatedList (ioObject1, ioObject2); + addFullObjectToTheDedicatedList (ioObject2, ioObject1); } // ////////////////////////////////////////////////////////////////// Modified: trunk/stdair/stdair/factory/FacBomStructure.hpp =================================================================== --- trunk/stdair/stdair/factory/FacBomStructure.hpp 2010-04-22 12:25:56 UTC (rev 180) +++ trunk/stdair/stdair/factory/FacBomStructure.hpp 2010-04-22 14:02:30 UTC (rev 181) @@ -49,7 +49,8 @@ } // ////////////////////////////////////////////////////////////////// - /** Link two child structure objects, the second one into the first one. */ + /** Link two child structure objects, the second one into the first one, + using the short key. */ template <typename PARENT, typename CHILD> static bool addObjectToTheDedicatedList (PARENT& ioParent, const CHILD& iChild) { @@ -69,6 +70,28 @@ } // ////////////////////////////////////////////////////////////////// + /** Link two child structure objects, the second one into the first one, + using the full key. */ + template <typename PARENT, typename CHILD> + static bool addFullObjectToTheDedicatedList (PARENT& ioParent, + const CHILD& iChild) { + // Retrive the bom children holder corresponding the the children type. + typedef typename CHILD::Content_T CHILD_CONTENT_T; + typedef BomChildrenHolderImp<CHILD_CONTENT_T> CHILDREN_HOLDER_T; + + CHILDREN_HOLDER_T*& lChildrenHolder_ptr = + boost::fusion::at_key<CHILD_CONTENT_T> (ioParent._holderMap); + + // If the holder does not existe, then create it. + if (lChildrenHolder_ptr == NULL) { + lChildrenHolder_ptr = &instance().create<CHILDREN_HOLDER_T> (); + } + + return addFullObjectToHolder<CHILD_CONTENT_T> (*lChildrenHolder_ptr, + iChild); + } + + // ////////////////////////////////////////////////////////////////// /** Link a child structure object with its parent. <br>For instance, link a SegmentDate structure object with its parent FlightDate structure object. @@ -111,6 +134,34 @@ return true; } + // ////////////////////////////////////////////////////////////////// + /** Add a BOM object into a dedicated BOM holder by using the + full key of the object. */ + template <typename CONTENT> + static bool addFullObjectToHolder (BomChildrenHolderImp<CONTENT>& ioHolder, + const typename CONTENT::Structure_T& iStructure) { + // Retrieve the bom structure type. + typedef typename CONTENT::Structure_T STRUCTURE_T; + // Define the bom holder type. + typedef BomChildrenHolderImp<CONTENT> HOLDER_T; + + // Retrieve the short key + const std::string& lKeyStr = iStructure.getContent().describeKey(); + + // Insert the structure object in the dedicated lists + typedef typename HOLDER_T::BomChildrenMap_T BOM_MAP_T; + const bool hasInsertBeenSuccessful = ioHolder._bomChildrenMap. + insert (typename BOM_MAP_T::value_type (lKeyStr, &iStructure)).second; + + if (hasInsertBeenSuccessful == false) { + return hasInsertBeenSuccessful; + } + + ioHolder._bomChildrenList.push_back (&iStructure); + + return true; + } + protected: /** Default Constructor. <br>This constructor is protected to ensure the class is structure. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2010-04-22 12:26:02
|
Revision: 180 http://stdair.svn.sourceforge.net/stdair/?rev=180&view=rev Author: quannaus Date: 2010-04-22 12:25:56 +0000 (Thu, 22 Apr 2010) Log Message: ----------- [Dev] Fixed the forgotten 'return' statement. Modified Paths: -------------- trunk/stdair/stdair/bom/FlightDateContent.hpp trunk/stdair/stdair/bom/InventoryContent.hpp trunk/stdair/stdair/bom/NetworkContent.hpp trunk/stdair/stdair/bom/NetworkDateContent.hpp trunk/stdair/stdair/bom/OutboundPathContent.hpp trunk/stdair/stdair/bom/SegmentDateContent.hpp Modified: trunk/stdair/stdair/bom/FlightDateContent.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateContent.hpp 2010-04-22 12:17:42 UTC (rev 179) +++ trunk/stdair/stdair/bom/FlightDateContent.hpp 2010-04-22 12:25:56 UTC (rev 180) @@ -121,7 +121,7 @@ /** Get a string describing the short key (differentiating two objects at the same level). */ - const std::string describeShortKey() const { _key.toString(); } + const std::string describeShortKey() const { return _key.toString(); } protected: /** Default constructors. */ Modified: trunk/stdair/stdair/bom/InventoryContent.hpp =================================================================== --- trunk/stdair/stdair/bom/InventoryContent.hpp 2010-04-22 12:17:42 UTC (rev 179) +++ trunk/stdair/stdair/bom/InventoryContent.hpp 2010-04-22 12:25:56 UTC (rev 180) @@ -32,7 +32,7 @@ /** Get a string describing the short key (differentiating two objects at the same level). */ - const std::string describeShortKey() const { _key.toString(); } + const std::string describeShortKey() const { return _key.toString(); } public: // ////////// Getters //////////// Modified: trunk/stdair/stdair/bom/NetworkContent.hpp =================================================================== --- trunk/stdair/stdair/bom/NetworkContent.hpp 2010-04-22 12:17:42 UTC (rev 179) +++ trunk/stdair/stdair/bom/NetworkContent.hpp 2010-04-22 12:25:56 UTC (rev 180) @@ -39,7 +39,7 @@ /** Get a string describing the short key (differentiating two objects at the same level). */ - const std::string describeShortKey() const { _key.toString(); } + const std::string describeShortKey() const { return _key.toString(); } protected: /** Default constructors. */ Modified: trunk/stdair/stdair/bom/NetworkDateContent.hpp =================================================================== --- trunk/stdair/stdair/bom/NetworkDateContent.hpp 2010-04-22 12:17:42 UTC (rev 179) +++ trunk/stdair/stdair/bom/NetworkDateContent.hpp 2010-04-22 12:25:56 UTC (rev 180) @@ -39,7 +39,7 @@ /** Get a string describing the short key (differentiating two objects at the same level). */ - const std::string describeShortKey() const { _key.toString(); } + const std::string describeShortKey() const { return _key.toString(); } protected: /** Default constructors. */ Modified: trunk/stdair/stdair/bom/OutboundPathContent.hpp =================================================================== --- trunk/stdair/stdair/bom/OutboundPathContent.hpp 2010-04-22 12:17:42 UTC (rev 179) +++ trunk/stdair/stdair/bom/OutboundPathContent.hpp 2010-04-22 12:25:56 UTC (rev 180) @@ -95,7 +95,7 @@ /** Get a string describing the whole key (differentiating two objects at any level). */ - const std::string describeShortKey() const { _key.toString(); } + const std::string describeShortKey() const { return _key.toString(); } protected: Modified: trunk/stdair/stdair/bom/SegmentDateContent.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDateContent.hpp 2010-04-22 12:17:42 UTC (rev 179) +++ trunk/stdair/stdair/bom/SegmentDateContent.hpp 2010-04-22 12:25:56 UTC (rev 180) @@ -173,7 +173,7 @@ /** Get a string describing the short key (differentiating two objects at the same level). */ - const std::string describeShortKey() const { _key.toString(); } + const std::string describeShortKey() const { return _key.toString(); } protected: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2010-04-22 12:17:48
|
Revision: 179 http://stdair.svn.sourceforge.net/stdair/?rev=179&view=rev Author: quannaus Date: 2010-04-22 12:17:42 +0000 (Thu, 22 Apr 2010) Log Message: ----------- [dev] Initialise all the pointers to children holder to NULL. Modified Paths: -------------- trunk/stdair/stdair/bom/AirlineFeature.cpp trunk/stdair/stdair/bom/AirportDate.cpp trunk/stdair/stdair/bom/BookingClass.cpp trunk/stdair/stdair/bom/Bucket.cpp trunk/stdair/stdair/bom/DemandStream.cpp trunk/stdair/stdair/bom/FlightDate.cpp trunk/stdair/stdair/bom/Inventory.cpp trunk/stdair/stdair/bom/LegCabin.cpp trunk/stdair/stdair/bom/LegDate.cpp trunk/stdair/stdair/bom/Network.cpp trunk/stdair/stdair/bom/NetworkDate.cpp trunk/stdair/stdair/bom/OutboundPath.cpp trunk/stdair/stdair/bom/SegmentCabin.cpp trunk/stdair/stdair/bom/SegmentDate.cpp trunk/stdair/stdair/bom/YieldStore.cpp Modified: trunk/stdair/stdair/bom/AirlineFeature.cpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeature.cpp 2010-04-22 12:08:40 UTC (rev 178) +++ trunk/stdair/stdair/bom/AirlineFeature.cpp 2010-04-22 12:17:42 UTC (rev 179) @@ -17,6 +17,7 @@ Structure_T& ioAirlineFeatureStructure) : AirlineFeatureContent (iKey), _structure (ioAirlineFeatureStructure) { + init (); } // //////////////////////////////////////////////////////////////////// Modified: trunk/stdair/stdair/bom/AirportDate.cpp =================================================================== --- trunk/stdair/stdair/bom/AirportDate.cpp 2010-04-22 12:08:40 UTC (rev 178) +++ trunk/stdair/stdair/bom/AirportDate.cpp 2010-04-22 12:17:42 UTC (rev 179) @@ -13,6 +13,7 @@ AirportDate::AirportDate (const Key_T& iKey, Structure_T& ioAirportStructure) : AirportDateContent (iKey), _structure (ioAirportStructure) { + init (); } // //////////////////////////////////////////////////////////////////// Modified: trunk/stdair/stdair/bom/BookingClass.cpp =================================================================== --- trunk/stdair/stdair/bom/BookingClass.cpp 2010-04-22 12:08:40 UTC (rev 178) +++ trunk/stdair/stdair/bom/BookingClass.cpp 2010-04-22 12:17:42 UTC (rev 179) @@ -13,6 +13,7 @@ Structure_T& ioBookingClassStructure) : BookingClassContent (iKey), _structure (ioBookingClassStructure) { + init (); } // //////////////////////////////////////////////////////////////////// Modified: trunk/stdair/stdair/bom/Bucket.cpp =================================================================== --- trunk/stdair/stdair/bom/Bucket.cpp 2010-04-22 12:08:40 UTC (rev 178) +++ trunk/stdair/stdair/bom/Bucket.cpp 2010-04-22 12:17:42 UTC (rev 179) @@ -11,6 +11,7 @@ // //////////////////////////////////////////////////////////////////// Bucket::Bucket (const Key_T& iKey, Structure_T& ioBucketStructure) : BucketContent (iKey), _structure (ioBucketStructure) { + init (); } // //////////////////////////////////////////////////////////////////// Modified: trunk/stdair/stdair/bom/DemandStream.cpp =================================================================== --- trunk/stdair/stdair/bom/DemandStream.cpp 2010-04-22 12:08:40 UTC (rev 178) +++ trunk/stdair/stdair/bom/DemandStream.cpp 2010-04-22 12:17:42 UTC (rev 179) @@ -36,6 +36,7 @@ iDemandDistribution, iNumberOfRequestsSeed, iRequestDateTimeSeed, iDemandCharacteristicsSeed), _structure (ioDemandStreamStructure) { + init (); } // //////////////////////////////////////////////////////////////////// Modified: trunk/stdair/stdair/bom/FlightDate.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.cpp 2010-04-22 12:08:40 UTC (rev 178) +++ trunk/stdair/stdair/bom/FlightDate.cpp 2010-04-22 12:17:42 UTC (rev 179) @@ -14,6 +14,7 @@ FlightDate::FlightDate (const Key_T& iKey, Structure_T& ioFlightStructure) : FlightDateContent (iKey), _structure (ioFlightStructure) { + init (); } // //////////////////////////////////////////////////////////////////// Modified: trunk/stdair/stdair/bom/Inventory.cpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.cpp 2010-04-22 12:08:40 UTC (rev 178) +++ trunk/stdair/stdair/bom/Inventory.cpp 2010-04-22 12:17:42 UTC (rev 179) @@ -12,6 +12,7 @@ Inventory::Inventory (const Key_T& iKey, Structure_T& ioInventoryStructure) : InventoryContent (iKey), _structure (ioInventoryStructure) { + init (); } // //////////////////////////////////////////////////////////////////// Modified: trunk/stdair/stdair/bom/LegCabin.cpp =================================================================== --- trunk/stdair/stdair/bom/LegCabin.cpp 2010-04-22 12:08:40 UTC (rev 178) +++ trunk/stdair/stdair/bom/LegCabin.cpp 2010-04-22 12:17:42 UTC (rev 179) @@ -11,6 +11,7 @@ // //////////////////////////////////////////////////////////////////// LegCabin::LegCabin (const Key_T& iKey, Structure_T& ioLegStructure) : LegCabinContent (iKey), _structure (ioLegStructure) { + init (); } // //////////////////////////////////////////////////////////////////// Modified: trunk/stdair/stdair/bom/LegDate.cpp =================================================================== --- trunk/stdair/stdair/bom/LegDate.cpp 2010-04-22 12:08:40 UTC (rev 178) +++ trunk/stdair/stdair/bom/LegDate.cpp 2010-04-22 12:17:42 UTC (rev 179) @@ -11,6 +11,7 @@ // //////////////////////////////////////////////////////////////////// LegDate::LegDate (const Key_T& iKey, Structure_T& ioLegStructure) : LegDateContent (iKey), _structure (ioLegStructure) { + init (); } // //////////////////////////////////////////////////////////////////// Modified: trunk/stdair/stdair/bom/Network.cpp =================================================================== --- trunk/stdair/stdair/bom/Network.cpp 2010-04-22 12:08:40 UTC (rev 178) +++ trunk/stdair/stdair/bom/Network.cpp 2010-04-22 12:17:42 UTC (rev 179) @@ -12,6 +12,7 @@ Network::Network (const Key_T& iKey, Structure_T& ioNetworkStructure) : NetworkContent (iKey), _structure (ioNetworkStructure) { + init (); } // //////////////////////////////////////////////////////////////////// Modified: trunk/stdair/stdair/bom/NetworkDate.cpp =================================================================== --- trunk/stdair/stdair/bom/NetworkDate.cpp 2010-04-22 12:08:40 UTC (rev 178) +++ trunk/stdair/stdair/bom/NetworkDate.cpp 2010-04-22 12:17:42 UTC (rev 179) @@ -12,6 +12,7 @@ NetworkDate::NetworkDate (const Key_T& iKey, Structure_T& ioNetworkDateStructure) : NetworkDateContent (iKey), _structure (ioNetworkDateStructure) { + init (); } // //////////////////////////////////////////////////////////////////// Modified: trunk/stdair/stdair/bom/OutboundPath.cpp =================================================================== --- trunk/stdair/stdair/bom/OutboundPath.cpp 2010-04-22 12:08:40 UTC (rev 178) +++ trunk/stdair/stdair/bom/OutboundPath.cpp 2010-04-22 12:17:42 UTC (rev 179) @@ -13,6 +13,7 @@ Structure_T& ioOutboundPathStructure) : OutboundPathContent (iKey), _structure (ioOutboundPathStructure) { + init (); } // //////////////////////////////////////////////////////////////////// Modified: trunk/stdair/stdair/bom/SegmentCabin.cpp =================================================================== --- trunk/stdair/stdair/bom/SegmentCabin.cpp 2010-04-22 12:08:40 UTC (rev 178) +++ trunk/stdair/stdair/bom/SegmentCabin.cpp 2010-04-22 12:17:42 UTC (rev 179) @@ -12,6 +12,7 @@ SegmentCabin::SegmentCabin (const Key_T& iKey, Structure_T& ioSegmentStructure) : SegmentCabinContent (iKey), _structure (ioSegmentStructure) { + init (); } // //////////////////////////////////////////////////////////////////// Modified: trunk/stdair/stdair/bom/SegmentDate.cpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDate.cpp 2010-04-22 12:08:40 UTC (rev 178) +++ trunk/stdair/stdair/bom/SegmentDate.cpp 2010-04-22 12:17:42 UTC (rev 179) @@ -13,6 +13,7 @@ SegmentDate::SegmentDate (const Key_T& iKey, Structure_T& ioSegmentStructure) : SegmentDateContent (iKey), _structure (ioSegmentStructure) { + init (); } // //////////////////////////////////////////////////////////////////// Modified: trunk/stdair/stdair/bom/YieldStore.cpp =================================================================== --- trunk/stdair/stdair/bom/YieldStore.cpp 2010-04-22 12:08:40 UTC (rev 178) +++ trunk/stdair/stdair/bom/YieldStore.cpp 2010-04-22 12:17:42 UTC (rev 179) @@ -14,6 +14,7 @@ YieldStore::YieldStore (const Key_T& iKey, Structure_T& ioYieldStoreStructure) : YieldStoreContent (iKey), _structure (ioYieldStoreStructure) { + init (); } // //////////////////////////////////////////////////////////////////// This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2010-04-22 12:08:46
|
Revision: 178 http://stdair.svn.sourceforge.net/stdair/?rev=178&view=rev Author: quannaus Date: 2010-04-22 12:08:40 +0000 (Thu, 22 Apr 2010) Log Message: ----------- [dev] Init all the pointers to children holder to NULL. Modified Paths: -------------- trunk/stdair/stdair/bom/AirlineFeature.cpp trunk/stdair/stdair/bom/AirlineFeature.hpp trunk/stdair/stdair/bom/AirportDate.cpp trunk/stdair/stdair/bom/AirportDate.hpp trunk/stdair/stdair/bom/BomRoot.cpp trunk/stdair/stdair/bom/BomRoot.hpp trunk/stdair/stdair/bom/BookingClass.cpp trunk/stdair/stdair/bom/BookingClass.hpp trunk/stdair/stdair/bom/Bucket.cpp trunk/stdair/stdair/bom/Bucket.hpp trunk/stdair/stdair/bom/DemandStream.cpp trunk/stdair/stdair/bom/DemandStream.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/Network.cpp trunk/stdair/stdair/bom/Network.hpp trunk/stdair/stdair/bom/NetworkDate.cpp trunk/stdair/stdair/bom/NetworkDate.hpp trunk/stdair/stdair/bom/OutboundPath.cpp trunk/stdair/stdair/bom/OutboundPath.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 trunk/stdair/stdair/bom/Structure.hpp trunk/stdair/stdair/bom/YieldStore.cpp trunk/stdair/stdair/bom/YieldStore.hpp Modified: trunk/stdair/stdair/bom/AirlineFeature.cpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeature.cpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/AirlineFeature.cpp 2010-04-22 12:08:40 UTC (rev 178) @@ -24,6 +24,10 @@ } // //////////////////////////////////////////////////////////////////// + void AirlineFeature::init () { + } + + // //////////////////////////////////////////////////////////////////// void AirlineFeature:: init (const ForecasterMode_T& iForecastMode, const HistoricalDataLimit_T& iHistoricalDataLimit, Modified: trunk/stdair/stdair/bom/AirlineFeature.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeature.hpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/AirlineFeature.hpp 2010-04-22 12:08:40 UTC (rev 178) @@ -63,12 +63,15 @@ // ///////////////// Constructors and destructors ///////////////// /** Constructors are private so as to force the usage of the Factory layer. */ + /** Constructors. */ + AirlineFeature (const Key_T&, Structure_T&); + /** Destructor. */ + ~AirlineFeature(); + /** Initialise all the pointers of children holder to NULL. */ + void init(); /** Default constructors. */ AirlineFeature (); AirlineFeature (const AirlineFeature&); - AirlineFeature (const Key_T&, Structure_T&); - /** Destructor. */ - virtual ~AirlineFeature(); protected: Modified: trunk/stdair/stdair/bom/AirportDate.cpp =================================================================== --- trunk/stdair/stdair/bom/AirportDate.cpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/AirportDate.cpp 2010-04-22 12:08:40 UTC (rev 178) @@ -20,6 +20,11 @@ } // //////////////////////////////////////////////////////////////////// + void AirportDate::init () { + _structure.initChildrenHolder<OutboundPath>(); + } + + // //////////////////////////////////////////////////////////////////// void AirportDate::toStream (std::ostream& ioOut) const { ioOut << toString() << std::endl; } Modified: trunk/stdair/stdair/bom/AirportDate.hpp =================================================================== --- trunk/stdair/stdair/bom/AirportDate.hpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/AirportDate.hpp 2010-04-22 12:08:40 UTC (rev 178) @@ -76,7 +76,9 @@ /** Constructors. */ AirportDate (const Key_T&, Structure_T&); /** Destructor. */ - virtual ~AirportDate(); + ~AirportDate(); + /** Initialise all the pointers of children holder to NULL. */ + void init(); /** Default constructors. */ AirportDate (); AirportDate (const AirportDate&); Modified: trunk/stdair/stdair/bom/BomRoot.cpp =================================================================== --- trunk/stdair/stdair/bom/BomRoot.cpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/BomRoot.cpp 2010-04-22 12:08:40 UTC (rev 178) @@ -11,6 +11,7 @@ // //////////////////////////////////////////////////////////////////// BomRoot::BomRoot (const Key_T& iKey, Structure_T& ioBomRootStructure) : BomRootContent (iKey), _structure (ioBomRootStructure) { + init(); } // //////////////////////////////////////////////////////////////////// @@ -18,6 +19,15 @@ } // //////////////////////////////////////////////////////////////////// + void BomRoot::init() { + _structure.initChildrenHolder<Inventory>(); + _structure.initChildrenHolder<Network>(); + _structure.initChildrenHolder<AirlineFeature>(); + _structure.initChildrenHolder<DemandStream>(); + _structure.initChildrenHolder<YieldStore>(); + } + + // //////////////////////////////////////////////////////////////////// InventoryList_T BomRoot::getInventoryList () const { return _structure.getChildrenHolder<Inventory>(); } Modified: trunk/stdair/stdair/bom/BomRoot.hpp =================================================================== --- trunk/stdair/stdair/bom/BomRoot.hpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/BomRoot.hpp 2010-04-22 12:08:40 UTC (rev 178) @@ -115,6 +115,8 @@ BomRoot (const Key_T&, Structure_T&); /** Destructor. */ ~BomRoot(); + /** Initialise all the pointers of children holder to NULL. */ + void init(); /** Default constructors. */ BomRoot (); BomRoot (const BomRoot&); Modified: trunk/stdair/stdair/bom/BookingClass.cpp =================================================================== --- trunk/stdair/stdair/bom/BookingClass.cpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/BookingClass.cpp 2010-04-22 12:08:40 UTC (rev 178) @@ -20,6 +20,10 @@ } // //////////////////////////////////////////////////////////////////// + void BookingClass::init () { + } + + // //////////////////////////////////////////////////////////////////// void BookingClass::toStream (std::ostream& ioOut) const { ioOut << toString() << std::endl; } Modified: trunk/stdair/stdair/bom/BookingClass.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClass.hpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/BookingClass.hpp 2010-04-22 12:08:40 UTC (rev 178) @@ -60,7 +60,9 @@ /** Constructors. */ BookingClass (const Key_T&, Structure_T&); /** Destructor. */ - virtual ~BookingClass(); + ~BookingClass(); + /** Initialise all the pointers of children holder to NULL. */ + void init(); /** Default constructors. */ BookingClass (); BookingClass (const BookingClass&); Modified: trunk/stdair/stdair/bom/Bucket.cpp =================================================================== --- trunk/stdair/stdair/bom/Bucket.cpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/Bucket.cpp 2010-04-22 12:08:40 UTC (rev 178) @@ -16,6 +16,10 @@ // //////////////////////////////////////////////////////////////////// Bucket::~Bucket () { } + + // //////////////////////////////////////////////////////////////////// + void Bucket::init () { + } // //////////////////////////////////////////////////////////////////// const std::string Bucket::describeKey() const { Modified: trunk/stdair/stdair/bom/Bucket.hpp =================================================================== --- trunk/stdair/stdair/bom/Bucket.hpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/Bucket.hpp 2010-04-22 12:08:40 UTC (rev 178) @@ -55,7 +55,9 @@ /** Constructors. */ Bucket (const Key_T& iKey, Structure_T& ioStructure); /** Destructor. */ - ~Bucket(); + ~Bucket(); + /** Initialise all the pointers of children holder to NULL. */ + void init(); /** Default constructors. */ Bucket (); Bucket (const Bucket&); Modified: trunk/stdair/stdair/bom/DemandStream.cpp =================================================================== --- trunk/stdair/stdair/bom/DemandStream.cpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/DemandStream.cpp 2010-04-22 12:08:40 UTC (rev 178) @@ -41,4 +41,9 @@ // //////////////////////////////////////////////////////////////////// DemandStream::~DemandStream () { } + + // //////////////////////////////////////////////////////////////////// + void DemandStream::init () { + } + } Modified: trunk/stdair/stdair/bom/DemandStream.hpp =================================================================== --- trunk/stdair/stdair/bom/DemandStream.hpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/DemandStream.hpp 2010-04-22 12:08:40 UTC (rev 178) @@ -67,11 +67,13 @@ const RandomSeed_T& iRequestDateTimeSeed, const RandomSeed_T& iDemandCharacteristicsSeed, Structure_T&); + /** Destructor. */ + ~DemandStream (); + /** Initialise all the pointers of children holder to NULL. */ + void init(); /** Default constructors. */ DemandStream (); DemandStream (const DemandStream&); - /** Destructor. */ - ~DemandStream (); protected: Modified: trunk/stdair/stdair/bom/FlightDate.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.cpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/FlightDate.cpp 2010-04-22 12:08:40 UTC (rev 178) @@ -21,6 +21,12 @@ } // //////////////////////////////////////////////////////////////////// + void FlightDate::init() { + _structure.initChildrenHolder<SegmentDate>(); + _structure.initChildrenHolder<LegDate>(); + } + + // //////////////////////////////////////////////////////////////////// void FlightDate::toStream (std::ostream& ioOut) const { ioOut << toString() << std::endl; } Modified: trunk/stdair/stdair/bom/FlightDate.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.hpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/FlightDate.hpp 2010-04-22 12:08:40 UTC (rev 178) @@ -84,6 +84,8 @@ FlightDate (const Key_T&, Structure_T&); /** Destructor. */ ~FlightDate(); + /** Initialise all the pointers of children holder to NULL. */ + void init(); /** Default constructors. */ FlightDate (); FlightDate (const FlightDate&); Modified: trunk/stdair/stdair/bom/Inventory.cpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.cpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/Inventory.cpp 2010-04-22 12:08:40 UTC (rev 178) @@ -19,6 +19,11 @@ } // //////////////////////////////////////////////////////////////////// + void Inventory::init () { + _structure.initChildrenHolder<FlightDate> (); + } + + // //////////////////////////////////////////////////////////////////// void Inventory::toStream (std::ostream& ioOut) const { ioOut << toString() << std::endl; } Modified: trunk/stdair/stdair/bom/Inventory.hpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.hpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/Inventory.hpp 2010-04-22 12:08:40 UTC (rev 178) @@ -86,6 +86,8 @@ Inventory (const Key_T&, Structure_T&); /** Destructor. */ ~Inventory(); + /** Initialise all the pointers of children holder to NULL. */ + void init(); /** Default constructors. */ Inventory (); Inventory (const Inventory&); Modified: trunk/stdair/stdair/bom/LegCabin.cpp =================================================================== --- trunk/stdair/stdair/bom/LegCabin.cpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/LegCabin.cpp 2010-04-22 12:08:40 UTC (rev 178) @@ -18,6 +18,12 @@ } // //////////////////////////////////////////////////////////////////// + void LegCabin::init () { + _structure.initChildrenHolder<Bucket> (); + _structure.initChildrenHolder<SegmentCabin> (); + } + + // //////////////////////////////////////////////////////////////////// void LegCabin::toStream (std::ostream& ioOut) const { ioOut << toString() << std::endl; } Modified: trunk/stdair/stdair/bom/LegCabin.hpp =================================================================== --- trunk/stdair/stdair/bom/LegCabin.hpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/LegCabin.hpp 2010-04-22 12:08:40 UTC (rev 178) @@ -68,7 +68,9 @@ /** Constructors. */ LegCabin (const Key_T& iKey, Structure_T&); /** Destructor. */ - virtual ~LegCabin(); + ~LegCabin(); + /** Initialise all the pointers of children holder to NULL. */ + void init(); /** Default constructors. */ LegCabin (); LegCabin (const LegCabin&); Modified: trunk/stdair/stdair/bom/LegDate.cpp =================================================================== --- trunk/stdair/stdair/bom/LegDate.cpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/LegDate.cpp 2010-04-22 12:08:40 UTC (rev 178) @@ -18,6 +18,12 @@ } // //////////////////////////////////////////////////////////////////// + void LegDate::init () { + _structure.initChildrenHolder<LegCabin> (); + _structure.initChildrenHolder<SegmentDate> (); + } + + // //////////////////////////////////////////////////////////////////// void LegDate::toStream (std::ostream& ioOut) const { ioOut << toString() << std::endl; } Modified: trunk/stdair/stdair/bom/LegDate.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDate.hpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/LegDate.hpp 2010-04-22 12:08:40 UTC (rev 178) @@ -75,6 +75,8 @@ LegDate (const Key_T&, Structure_T&); /** Destructor. */ ~LegDate(); + /** Initialise all the pointers of children holder to NULL. */ + void init(); /** Default constructors. */ LegDate (); LegDate (const LegDate&); Modified: trunk/stdair/stdair/bom/Network.cpp =================================================================== --- trunk/stdair/stdair/bom/Network.cpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/Network.cpp 2010-04-22 12:08:40 UTC (rev 178) @@ -19,6 +19,11 @@ } // //////////////////////////////////////////////////////////////////// + void Network::init () { + _structure.initChildrenHolder<NetworkDate>(); + } + + // //////////////////////////////////////////////////////////////////// void Network::toStream (std::ostream& ioOut) const { ioOut << toString() << std::endl; } Modified: trunk/stdair/stdair/bom/Network.hpp =================================================================== --- trunk/stdair/stdair/bom/Network.hpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/Network.hpp 2010-04-22 12:08:40 UTC (rev 178) @@ -71,7 +71,9 @@ /** Constructors. */ Network (const Key_T&, Structure_T&); /** Destructor. */ - virtual ~Network(); + ~Network(); + /** Initialise all the pointers of children holder to NULL. */ + void init(); /** Default constructors. */ Network (); Network (const Network&); Modified: trunk/stdair/stdair/bom/NetworkDate.cpp =================================================================== --- trunk/stdair/stdair/bom/NetworkDate.cpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/NetworkDate.cpp 2010-04-22 12:08:40 UTC (rev 178) @@ -19,6 +19,11 @@ } // //////////////////////////////////////////////////////////////////// + void NetworkDate::init () { + _structure.initChildrenHolder<AirportDate>(); + } + + // //////////////////////////////////////////////////////////////////// void NetworkDate::toStream (std::ostream& ioOut) const { ioOut << toString() << std::endl; } Modified: trunk/stdair/stdair/bom/NetworkDate.hpp =================================================================== --- trunk/stdair/stdair/bom/NetworkDate.hpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/NetworkDate.hpp 2010-04-22 12:08:40 UTC (rev 178) @@ -71,7 +71,9 @@ /** Constructors. */ NetworkDate (const Key_T&, Structure_T&); /** Destructor. */ - virtual ~NetworkDate(); + ~NetworkDate(); + /** Initialise all the pointers of children holder to NULL. */ + void init(); /** Default constructors. */ NetworkDate (); NetworkDate (const NetworkDate&); Modified: trunk/stdair/stdair/bom/OutboundPath.cpp =================================================================== --- trunk/stdair/stdair/bom/OutboundPath.cpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/OutboundPath.cpp 2010-04-22 12:08:40 UTC (rev 178) @@ -20,6 +20,11 @@ } // //////////////////////////////////////////////////////////////////// + void OutboundPath::init () { + _structure.initChildrenHolder<SegmentDate>(); + } + + // //////////////////////////////////////////////////////////////////// void OutboundPath::toStream (std::ostream& ioOut) const { ioOut << toString() << std::endl; } Modified: trunk/stdair/stdair/bom/OutboundPath.hpp =================================================================== --- trunk/stdair/stdair/bom/OutboundPath.hpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/OutboundPath.hpp 2010-04-22 12:08:40 UTC (rev 178) @@ -131,6 +131,8 @@ OutboundPath (const Key_T&, Structure_T&); /** Destructor. */ ~OutboundPath(); + /** Initialise all the pointers of children holder to NULL. */ + void init(); /** Default constructors. */ OutboundPath (); OutboundPath (const OutboundPath&); Modified: trunk/stdair/stdair/bom/SegmentCabin.cpp =================================================================== --- trunk/stdair/stdair/bom/SegmentCabin.cpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/SegmentCabin.cpp 2010-04-22 12:08:40 UTC (rev 178) @@ -19,6 +19,12 @@ } // //////////////////////////////////////////////////////////////////// + void SegmentCabin::init () { + _structure.initChildrenHolder<BookingClass> (); + _structure.initChildrenHolder<LegCabin> (); + } + + // //////////////////////////////////////////////////////////////////// void SegmentCabin::toStream (std::ostream& ioOut) const { ioOut << toString() << std::endl; } Modified: trunk/stdair/stdair/bom/SegmentCabin.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentCabin.hpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/SegmentCabin.hpp 2010-04-22 12:08:40 UTC (rev 178) @@ -70,6 +70,8 @@ SegmentCabin (const Key_T&, Structure_T&); /** Destructor. */ ~SegmentCabin(); + /** Initialise all the pointers of children holder to NULL. */ + void init(); /** Default constructors. */ SegmentCabin (); SegmentCabin (const SegmentCabin&); Modified: trunk/stdair/stdair/bom/SegmentDate.cpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDate.cpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/SegmentDate.cpp 2010-04-22 12:08:40 UTC (rev 178) @@ -20,6 +20,12 @@ } // //////////////////////////////////////////////////////////////////// + void SegmentDate::init () { + _structure.initChildrenHolder<SegmentCabin>(); + _structure.initChildrenHolder<LegDate>(); + } + + // //////////////////////////////////////////////////////////////////// void SegmentDate::toStream (std::ostream& ioOut) const { ioOut << toString() << std::endl; } Modified: trunk/stdair/stdair/bom/SegmentDate.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDate.hpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/SegmentDate.hpp 2010-04-22 12:08:40 UTC (rev 178) @@ -87,6 +87,8 @@ SegmentDate (const Key_T&, Structure_T&); /** Destructor. */ ~SegmentDate(); + /** Initialise all the pointers of children holder to NULL. */ + void init(); /** Default constructors. */ SegmentDate (); SegmentDate (const SegmentDate&); Modified: trunk/stdair/stdair/bom/Structure.hpp =================================================================== --- trunk/stdair/stdair/bom/Structure.hpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/Structure.hpp 2010-04-22 12:08:40 UTC (rev 178) @@ -108,6 +108,15 @@ return *lChild_ptr; } + // /////////// Business method //////////// + /** Initialise the pointer of children holder to NULL. */ + template <typename CHILD> + void initChildrenHolder() { + BomChildrenHolderImp<CHILD>*& lHolder_ptr = + boost::fusion::at_key<CHILD> (_holderMap); + lHolder_ptr = NULL; + } + public: // /////////// Display support methods ///////// /** Dump a Business Object into an output stream. Modified: trunk/stdair/stdair/bom/YieldStore.cpp =================================================================== --- trunk/stdair/stdair/bom/YieldStore.cpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/YieldStore.cpp 2010-04-22 12:08:40 UTC (rev 178) @@ -20,4 +20,8 @@ YieldStore::~YieldStore () { } + // //////////////////////////////////////////////////////////////////// + void YieldStore::init () { + } + } Modified: trunk/stdair/stdair/bom/YieldStore.hpp =================================================================== --- trunk/stdair/stdair/bom/YieldStore.hpp 2010-04-22 11:03:11 UTC (rev 177) +++ trunk/stdair/stdair/bom/YieldStore.hpp 2010-04-22 12:08:40 UTC (rev 178) @@ -54,12 +54,15 @@ protected: /** Constructors are private so as to force the usage of the Factory layer. */ + /** Constructors. */ + YieldStore (const Key_T& iKey, Structure_T& ioStructure); + /** Destructor. */ + ~YieldStore(); + /** Initialise all the pointers of children holder to NULL. */ + void init(); /** Default constructors. */ YieldStore (); YieldStore (const YieldStore&); - YieldStore (const Key_T& iKey, Structure_T& ioStructure); - /** Destructor. */ - virtual ~YieldStore(); private: // Attributes This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2010-04-22 11:03:19
|
Revision: 177 http://stdair.svn.sourceforge.net/stdair/?rev=177&view=rev Author: quannaus Date: 2010-04-22 11:03:11 +0000 (Thu, 22 Apr 2010) Log Message: ----------- [Dev] New version of stdair. Modified Paths: -------------- trunk/stdair/stdair/STDAIR_Service.hpp trunk/stdair/stdair/STDAIR_Types.hpp trunk/stdair/stdair/basic/BasTypes.hpp trunk/stdair/stdair/basic/DemandCharacteristics.hpp trunk/stdair/stdair/batches/stdair.cpp 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/AirlineFeatureTypes.hpp trunk/stdair/stdair/bom/AirportDate.cpp trunk/stdair/stdair/bom/AirportDate.hpp trunk/stdair/stdair/bom/AirportDateContent.cpp trunk/stdair/stdair/bom/AirportDateContent.hpp trunk/stdair/stdair/bom/AirportDateKey.cpp trunk/stdair/stdair/bom/AirportDateKey.hpp trunk/stdair/stdair/bom/AirportDateTypes.hpp trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp trunk/stdair/stdair/bom/BomContent.hpp trunk/stdair/stdair/bom/BomIterator.hpp trunk/stdair/stdair/bom/BomKey.hpp trunk/stdair/stdair/bom/BomList.hpp trunk/stdair/stdair/bom/BomManager.cpp trunk/stdair/stdair/bom/BomManager.hpp trunk/stdair/stdair/bom/BomMap.hpp 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.cpp trunk/stdair/stdair/bom/BomRootKey.hpp trunk/stdair/stdair/bom/BomRootTypes.hpp trunk/stdair/stdair/bom/BomStructure.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/BookingClassKey.cpp trunk/stdair/stdair/bom/BookingClassKey.hpp trunk/stdair/stdair/bom/BookingClassTypes.hpp trunk/stdair/stdair/bom/BucketContent.cpp trunk/stdair/stdair/bom/BucketContent.hpp trunk/stdair/stdair/bom/BucketKey.cpp trunk/stdair/stdair/bom/BucketKey.hpp trunk/stdair/stdair/bom/DemandStream.cpp trunk/stdair/stdair/bom/DemandStream.hpp trunk/stdair/stdair/bom/DemandStreamContent.cpp trunk/stdair/stdair/bom/DemandStreamContent.hpp trunk/stdair/stdair/bom/DemandStreamKey.cpp trunk/stdair/stdair/bom/DemandStreamKey.hpp trunk/stdair/stdair/bom/DemandStreamTypes.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/FlightDateKey.cpp trunk/stdair/stdair/bom/FlightDateKey.hpp trunk/stdair/stdair/bom/FlightDateTypes.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/InventoryKey.cpp trunk/stdair/stdair/bom/InventoryKey.hpp trunk/stdair/stdair/bom/InventoryTypes.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/LegCabinKey.cpp trunk/stdair/stdair/bom/LegCabinKey.hpp trunk/stdair/stdair/bom/LegCabinTypes.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/LegDateKey.cpp trunk/stdair/stdair/bom/LegDateKey.hpp trunk/stdair/stdair/bom/LegDateTypes.hpp trunk/stdair/stdair/bom/Network.cpp trunk/stdair/stdair/bom/Network.hpp trunk/stdair/stdair/bom/NetworkContent.cpp trunk/stdair/stdair/bom/NetworkContent.hpp trunk/stdair/stdair/bom/NetworkDate.cpp trunk/stdair/stdair/bom/NetworkDate.hpp trunk/stdair/stdair/bom/NetworkDateContent.cpp trunk/stdair/stdair/bom/NetworkDateContent.hpp trunk/stdair/stdair/bom/NetworkDateKey.cpp trunk/stdair/stdair/bom/NetworkDateKey.hpp trunk/stdair/stdair/bom/NetworkDateTypes.hpp trunk/stdair/stdair/bom/NetworkKey.cpp trunk/stdair/stdair/bom/NetworkKey.hpp trunk/stdair/stdair/bom/NetworkTypes.hpp trunk/stdair/stdair/bom/OutboundPath.cpp trunk/stdair/stdair/bom/OutboundPath.hpp trunk/stdair/stdair/bom/OutboundPathContent.cpp trunk/stdair/stdair/bom/OutboundPathContent.hpp trunk/stdair/stdair/bom/OutboundPathKey.cpp trunk/stdair/stdair/bom/OutboundPathKey.hpp trunk/stdair/stdair/bom/OutboundPathTypes.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/SegmentCabinKey.cpp trunk/stdair/stdair/bom/SegmentCabinKey.hpp trunk/stdair/stdair/bom/SegmentCabinTypes.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/SegmentDateKey.cpp trunk/stdair/stdair/bom/SegmentDateKey.hpp trunk/stdair/stdair/bom/SegmentDateTypes.hpp trunk/stdair/stdair/bom/Structure.hpp trunk/stdair/stdair/bom/YieldStore.cpp trunk/stdair/stdair/bom/YieldStore.hpp trunk/stdair/stdair/bom/YieldStoreContent.cpp trunk/stdair/stdair/bom/YieldStoreContent.hpp trunk/stdair/stdair/bom/YieldStoreKey.cpp trunk/stdair/stdair/bom/YieldStoreKey.hpp trunk/stdair/stdair/bom/sources.mk trunk/stdair/stdair/command/CmdBomManager.cpp trunk/stdair/stdair/command/CmdBomManager.hpp trunk/stdair/stdair/factory/FacBomContent.hpp trunk/stdair/stdair/factory/FacBomStructure.hpp trunk/stdair/stdair/service/STDAIR_Service.cpp Added Paths: ----------- trunk/stdair/stdair/bom/BomSource.hpp trunk/stdair/stdair/bom/BomTypes.hpp trunk/stdair/stdair/bom/Bucket.cpp trunk/stdair/stdair/bom/Bucket.hpp trunk/stdair/stdair/bom/BucketTypes.hpp Removed Paths: ------------- 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/AirportDateStructure.hpp trunk/stdair/stdair/bom/BC.cpp trunk/stdair/stdair/bom/BC.hpp trunk/stdair/stdair/bom/BCTypes.hpp trunk/stdair/stdair/bom/BK.cpp trunk/stdair/stdair/bom/BK.hpp trunk/stdair/stdair/bom/BKTypes.hpp trunk/stdair/stdair/bom/BR.cpp trunk/stdair/stdair/bom/BR.hpp trunk/stdair/stdair/bom/BRTypes.hpp trunk/stdair/stdair/bom/BomRootStructure.hpp trunk/stdair/stdair/bom/BomStopStructure.hpp trunk/stdair/stdair/bom/BookingClassStructure.hpp trunk/stdair/stdair/bom/DemandStreamStructure.hpp trunk/stdair/stdair/bom/FD.cpp trunk/stdair/stdair/bom/FD.hpp trunk/stdair/stdair/bom/FDTypes.hpp trunk/stdair/stdair/bom/FlightDateStructure.hpp trunk/stdair/stdair/bom/IN.cpp trunk/stdair/stdair/bom/IN.hpp trunk/stdair/stdair/bom/INTypes.hpp trunk/stdair/stdair/bom/InventoryStructure.hpp trunk/stdair/stdair/bom/LC.cpp trunk/stdair/stdair/bom/LC.hpp trunk/stdair/stdair/bom/LCTypes.hpp trunk/stdair/stdair/bom/LD.cpp trunk/stdair/stdair/bom/LD.hpp trunk/stdair/stdair/bom/LDTypes.hpp trunk/stdair/stdair/bom/LegCabinStructure.hpp trunk/stdair/stdair/bom/LegDateStructure.hpp trunk/stdair/stdair/bom/ND.cpp trunk/stdair/stdair/bom/ND.hpp trunk/stdair/stdair/bom/NDTypes.hpp trunk/stdair/stdair/bom/NetworkDateStructure.hpp trunk/stdair/stdair/bom/NetworkStructure.hpp trunk/stdair/stdair/bom/OutboundPathStructure.hpp trunk/stdair/stdair/bom/SC.cpp trunk/stdair/stdair/bom/SC.hpp trunk/stdair/stdair/bom/SCTypes.hpp trunk/stdair/stdair/bom/SD.cpp trunk/stdair/stdair/bom/SD.hpp trunk/stdair/stdair/bom/SDTypes.hpp trunk/stdair/stdair/bom/SegmentCabinStructure.hpp trunk/stdair/stdair/bom/SegmentDateStructure.hpp Modified: trunk/stdair/stdair/STDAIR_Service.hpp =================================================================== --- trunk/stdair/stdair/STDAIR_Service.hpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/STDAIR_Service.hpp 2010-04-22 11:03:11 UTC (rev 177) @@ -104,14 +104,6 @@ in order to secure the access to the corresponding resources. */ void init (); - /** Initialise the AirlineFeatureSet object, and attach it to the - BomRoot. */ - void initAirlineFeatureSet (); - - /** Initialise the DemandStreamList object, and attach it to the - BomRoot. */ - void initDemandStreamList (); - /** Finalise. */ void finalise (); Modified: trunk/stdair/stdair/STDAIR_Types.hpp =================================================================== --- trunk/stdair/stdair/STDAIR_Types.hpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/STDAIR_Types.hpp 2010-04-22 11:03:11 UTC (rev 177) @@ -478,6 +478,9 @@ /** Type of frequent flyer (P=Platinum, G=Gold, S=Silver, M=Member, N=None). */ typedef std::string FrequentFlyer_T; + + /** Key of a STL map. */ + typedef std::string MapKey_T; } #endif // __STDAIR_STDAIR_TYPES_HPP Modified: trunk/stdair/stdair/basic/BasTypes.hpp =================================================================== --- trunk/stdair/stdair/basic/BasTypes.hpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/basic/BasTypes.hpp 2010-04-22 11:03:11 UTC (rev 177) @@ -10,7 +10,5 @@ namespace stdair { - /** Key of a STL map. */ - typedef std::string MapKey_T; } #endif // __STDAIR_BAS_BASTYPES_HPP Modified: trunk/stdair/stdair/basic/DemandCharacteristics.hpp =================================================================== --- trunk/stdair/stdair/basic/DemandCharacteristics.hpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/basic/DemandCharacteristics.hpp 2010-04-22 11:03:11 UTC (rev 177) @@ -15,8 +15,8 @@ /** Class modeling the characteristics of a demand type. */ struct DemandCharacteristics { - public: + public: // ///////////// Getters /////////// /** Get the arrival pattern. */ const ContinuousFloatDuration_T& getArrivalPattern() const { @@ -83,8 +83,7 @@ const ValueOfTimeContinuousDistribution_T&); /** Destructor */ - virtual ~DemandCharacteristics (); - + ~DemandCharacteristics (); private: /** Default constructor. */ DemandCharacteristics (); Modified: trunk/stdair/stdair/batches/stdair.cpp =================================================================== --- trunk/stdair/stdair/batches/stdair.cpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/batches/stdair.cpp 2010-04-22 11:03:11 UTC (rev 177) @@ -6,17 +6,6 @@ #include <string> // StdAir #include <stdair/STDAIR_Types.hpp> -#include <stdair/bom/BR.hpp> -#include <stdair/bom/BRTypes.hpp> -#include <stdair/bom/IN.hpp> -#include <stdair/bom/InventoryKey.hpp> -#include <stdair/bom/INTypes.hpp> -#include <stdair/bom/FD.hpp> -#include <stdair/bom/FlightDateKey.hpp> -#include <stdair/bom/FDTypes.hpp> -#include <stdair/bom/ND.hpp> -#include <stdair/bom/NetworkDateKey.hpp> -#include <stdair/bom/NDTypes.hpp> #include <stdair/bom/BomList.hpp> #include <stdair/factory/FacBomContent.hpp> @@ -26,47 +15,6 @@ try { - stdair::BR& lBR = - stdair::FacBomContent::instance().testCreate<stdair::BR> (); - - stdair::InventoryKey_T lINKey ("BA"); - stdair::IN& lIN = - stdair::FacBomContent::instance().testCreate<stdair::IN> (lINKey); - stdair::FacBomContent::testLink (lIN, lBR); - - stdair::FlightDateKey_T lFDKey (17, stdair::Date_T (2010, 02, 14)); - stdair::FD& lFD = - stdair::FacBomContent::instance().testCreate<stdair::FD> (lFDKey); - stdair::FacBomContent::testLink (lFD, lIN); - - stdair::NetworkDateKey_T lNDKey (stdair::Date_T (2010, 02, 14)); - stdair::ND& lND = - stdair::FacBomContent::instance().testCreate<stdair::ND> (lNDKey); - stdair::FacBomContent::testLink (lND, lIN); - - - // Browse - stdair::INList_T lINList = lBR.getINList(); - for (stdair::INList_T::iterator it = lINList.begin(); - it != lINList.end(); ++it) { - const stdair::IN& lCurrentIN = *it; - std::cout << "Current IN: " << lCurrentIN.toString() << std::endl; - - stdair::FDList_T lFDList = lIN.getFDList(); - for (stdair::FDList_T::iterator it = lFDList.begin(); - it != lFDList.end(); ++it) { - const stdair::FD& lCurrentFD = *it; - std::cout << "Current FD: " << lCurrentFD.toString() << std::endl; - } - stdair::NDList_T lNDList = lIN.getNDList(); - for (stdair::NDList_T::iterator it = lNDList.begin(); - it != lNDList.end(); ++it) { - const stdair::ND& lCurrentND = *it; - std::cout << "Current ND: " << lCurrentND.toString() << std::endl; - } - - } - } catch (const std::exception& stde) { std::cerr << "Standard exception: " << stde.what() << std::endl; return -1; Modified: trunk/stdair/stdair/bom/AirlineFeature.cpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeature.cpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/bom/AirlineFeature.cpp 2010-04-22 11:03:11 UTC (rev 177) @@ -7,17 +7,16 @@ #include <ostream> #include <sstream> // STDAIR -#include <stdair/bom/AirlineFeatureStructure.hpp> #include <stdair/bom/AirlineFeature.hpp> namespace stdair { // //////////////////////////////////////////////////////////////////// AirlineFeature:: - AirlineFeature (const BomKey_T& iKey, - BomStructure_T& ioAirlineFeatureStructure) + AirlineFeature (const Key_T& iKey, + Structure_T& ioAirlineFeatureStructure) : AirlineFeatureContent (iKey), - _airlineFeatureStructure (ioAirlineFeatureStructure) { + _structure (ioAirlineFeatureStructure) { } // //////////////////////////////////////////////////////////////////// @@ -34,23 +33,23 @@ iOptimizerStruct, iControlMode); } - // ////////////////////////////////////////////////////////////////////// + // //////////////////////////////////////////////////////////////////// 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; + oStr << describeKey() << std::endl; return oStr.str(); } - // ////////////////////////////////////////////////////////////////////// + // //////////////////////////////////////////////////////////////////// const std::string AirlineFeature::describe() const { std::ostringstream ostr; ostr << describeKey() @@ -61,13 +60,8 @@ return ostr.str(); } - // ////////////////////////////////////////////////////////////////////// + // //////////////////////////////////////////////////////////////////// const std::string AirlineFeature::describeKey() const { - return _key.describe(); - } - - // ////////////////////////////////////////////////////////////////////// - const std::string AirlineFeature::describeShortKey() const { return _key.toString(); } Modified: trunk/stdair/stdair/bom/AirlineFeature.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeature.hpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/bom/AirlineFeature.hpp 2010-04-22 11:03:11 UTC (rev 177) @@ -4,51 +4,40 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STL -#include <iosfwd> -#include <string> // 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 - struct AirlineFeatureKey_T; + class BomRoot; - /** Class representing the actual functional/business content for a segment-cabin. */ class AirlineFeature : public AirlineFeatureContent { friend class FacBomContent; - public: - // //////////// Type definitions ////////////// + // ////////////////////////////////////////////////////////////////// + // See the explanations, within the BomRoot class, for all + // the types which require to be specified below + // ////////////////////////////////////////////////////////////////// + /** Definition allowing to retrieve the associated BOM structure type. */ + typedef AirlineFeatureStructure_T Structure_T; + /** Definition allowing to retrieve the associated parent BOM content type. */ - typedef AirlineFeatureSet Parent_T; + typedef BomRoot Parent_T; - /** Definition allowing to retrieve the associated BOM structure type. */ - typedef AirlineFeatureStructure_T BomStructure_T; + /** Define the list of children holder types. */ + typedef boost::fusion::map< > ChildrenHolderMap_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: // //////////// Setters ///////////// /** Intialisation method. */ void init (const ForecasterMode_T&, const HistoricalDataLimit_T&, const OptimizerStruct_T&, const ControlMode_T&); - public: // /////////// Display support methods ///////////// @@ -67,21 +56,9 @@ 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 and destructors ///////////////// /** Constructors are private so as to force the usage of the Factory @@ -89,8 +66,7 @@ /** Default constructors. */ AirlineFeature (); AirlineFeature (const AirlineFeature&); - AirlineFeature (const BomKey_T&, BomStructure_T&); - + AirlineFeature (const Key_T&, Structure_T&); /** Destructor. */ virtual ~AirlineFeature(); @@ -98,7 +74,7 @@ protected: // ////////////////////// Attributes /////////////////////////// /** Reference structure. */ - BomStructure_T& _airlineFeatureStructure; + Structure_T& _structure; }; } Modified: trunk/stdair/stdair/bom/AirlineFeatureContent.cpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureContent.cpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/bom/AirlineFeatureContent.cpp 2010-04-22 11:03:11 UTC (rev 177) @@ -10,7 +10,7 @@ // //////////////////////////////////////////////////////////////////// AirlineFeatureContent:: - AirlineFeatureContent (const BomKey_T& iKey) + AirlineFeatureContent (const Key_T& iKey) : _key (iKey) { } Modified: trunk/stdair/stdair/bom/AirlineFeatureContent.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureContent.hpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/bom/AirlineFeatureContent.hpp 2010-04-22 11:03:11 UTC (rev 177) @@ -5,7 +5,6 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/STDAIR_Types.hpp> #include <stdair/bom/BomContent.hpp> #include <stdair/bom/AirlineFeatureKey.hpp> #include <stdair/bom/OptimizerStruct.hpp> @@ -17,12 +16,12 @@ public: // Type definitions. /** Definition allowing to retrieve the associated BOM key type. */ - typedef AirlineFeatureKey_T BomKey_T; + typedef AirlineFeatureKey_T Key_T; public: // /////////// Getters //////////// /** Get the airline feature key. */ - const BomKey_T& getKey() const { + const Key_T& getKey() const { return _key; } @@ -44,29 +43,23 @@ /** 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; - + const std::string describeShortKey() const { return _key.toString(); } protected: /** Default constructors. */ AirlineFeatureContent (); AirlineFeatureContent (const AirlineFeatureContent&); - AirlineFeatureContent (const BomKey_T&); - + AirlineFeatureContent (const Key_T&); /** Destructor. */ virtual ~AirlineFeatureContent(); protected: // Attributes /** The key of both structure and content objects. */ - BomKey_T _key; + Key_T _key; /** The type of forecaster. */ ForecasterMode_T _forecasterMode; Modified: trunk/stdair/stdair/bom/AirlineFeatureKey.cpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureKey.cpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/bom/AirlineFeatureKey.cpp 2010-04-22 11:03:11 UTC (rev 177) @@ -31,9 +31,4 @@ 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 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/bom/AirlineFeatureKey.hpp 2010-04-22 11:03:11 UTC (rev 177) @@ -5,20 +5,13 @@ // Import section // ////////////////////////////////////////////////////////////////////// // 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); @@ -30,9 +23,6 @@ /** Get the airline code. */ 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. */ @@ -49,9 +39,6 @@ marketing classes for the same segment-date. */ const std::string toString() const; - /** Display of the key. */ - const std::string describe() const; - private: // Attributes /** Airline code. */ Deleted: trunk/stdair/stdair/bom/AirlineFeatureSet.cpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureSet.cpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/bom/AirlineFeatureSet.cpp 2010-04-22 11:03:11 UTC (rev 177) @@ -1,92 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <cassert> -#include <istream> -#include <ostream> -#include <sstream> -// STDAIR -#include <stdair/bom/AirlineFeatureSetStructure.hpp> -#include <stdair/bom/AirlineFeatureSet.hpp> -#include <stdair/bom/AirlineFeature.hpp> -#include <stdair/bom/BomList.hpp> -#include <stdair/bom/BomMap.hpp> - -namespace stdair { - - // //////////////////////////////////////////////////////////////////// - AirlineFeatureSet:: - AirlineFeatureSet (const BomKey_T& iKey, - BomStructure_T& ioAirlineFeatureSetStructure) - : AirlineFeatureSetContent (iKey), - _bomStructure (ioAirlineFeatureSetStructure) { - } - - // //////////////////////////////////////////////////////////////////// - AirlineFeatureSet::~AirlineFeatureSet () { - } - - // ////////////////////////////////////////////////////////////////////// - void AirlineFeatureSet::toStream (std::ostream& ioOut) const { - ioOut << toString(); - } - - // ////////////////////////////////////////////////////////////////////// - void AirlineFeatureSet::fromStream (std::istream& ioIn) { - } - - // ////////////////////////////////////////////////////////////////////// - std::string AirlineFeatureSet::toString() const { - return describeShortKey(); - } - - // ////////////////////////////////////////////////////////////////////// - const std::string AirlineFeatureSet::describeKey() const { - return _key.describe(); - } - - // ////////////////////////////////////////////////////////////////////// - const std::string AirlineFeatureSet::describeShortKey() const { - return _key.toString(); - } - - // ////////////////////////////////////////////////////////////////////// - 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 _bomStructure.getChildrenHolder(); - } - - // ////////////////////////////////////////////////////////////////////// - AirlineFeatureMap_T AirlineFeatureSet::getAirlineFeatureMap () const { - return _bomStructure.getChildrenHolder(); - } - - // ////////////////////////////////////////////////////////////////////// - AirlineFeature* AirlineFeatureSet:: - getAirlineFeature (const AirlineFeatureKey_T& iKey) const { - return _bomStructure.getContentChild (iKey); - } - -} Deleted: trunk/stdair/stdair/bom/AirlineFeatureSet.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureSet.hpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/bom/AirlineFeatureSet.hpp 2010-04-22 11:03:11 UTC (rev 177) @@ -1,110 +0,0 @@ -#ifndef __STDAIR_BOM_AIRLINEFEATURESET_HPP -#define __STDAIR_BOM_AIRLINEFEATURESET_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <iosfwd> -#include <string> -// 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 AirlineFeatureKey_T; - struct AirlineFeatureSetKey_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; - - /** 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; - - /** 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. */ - AirlineFeature* getAirlineFeature (const AirlineFeatureKey_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 _bomStructure; - } - - - protected: - // ///////////////// Constructors and destructors ///////////////// - /** 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& _bomStructure; - }; - -} -#endif // __STDAIR_BOM_AIRLINEFEATURESET_HPP Deleted: trunk/stdair/stdair/bom/AirlineFeatureSetContent.cpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureSetContent.cpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/bom/AirlineFeatureSetContent.cpp 2010-04-22 11:03:11 UTC (rev 177) @@ -1,20 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <cassert> -// STDAIR -#include <stdair/bom/AirlineFeatureSetContent.hpp> - -namespace stdair { - - // //////////////////////////////////////////////////////////////////// - AirlineFeatureSetContent::AirlineFeatureSetContent (const BomKey_T& iKey) - : _key (iKey) { - } - - // //////////////////////////////////////////////////////////////////// - AirlineFeatureSetContent::~AirlineFeatureSetContent () { - } - -} Deleted: trunk/stdair/stdair/bom/AirlineFeatureSetContent.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureSetContent.hpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/bom/AirlineFeatureSetContent.hpp 2010-04-22 11:03:11 UTC (rev 177) @@ -1,68 +0,0 @@ -#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 Deleted: trunk/stdair/stdair/bom/AirlineFeatureSetKey.cpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureSetKey.cpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/bom/AirlineFeatureSetKey.cpp 2010-04-22 11:03:11 UTC (rev 177) @@ -1,38 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// 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) { - } - - // //////////////////////////////////////////////////////////////////// - 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(); - } - -} Deleted: trunk/stdair/stdair/bom/AirlineFeatureSetKey.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureSetKey.hpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/bom/AirlineFeatureSetKey.hpp 2010-04-22 11:03:11 UTC (rev 177) @@ -1,49 +0,0 @@ -#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. */ - 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. - }; - -} -#endif // __STDAIR_BOM_AIRLINEFEATURESETKEY_HPP Deleted: trunk/stdair/stdair/bom/AirlineFeatureSetStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureSetStructure.hpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/bom/AirlineFeatureSetStructure.hpp 2010-04-22 11:03:11 UTC (rev 177) @@ -1,152 +0,0 @@ -#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/BomStopStructure.hpp> -#include <stdair/bom/BomStopContent.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> - 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; - - /** 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. */ - typedef typename BOM_CONTENT::BomKey_T BomKey_T; - - /** Definition allowing to retrieve the associated children type. */ - typedef boost::mpl::vector<AirlineFeatureStructure<ContentChild_T>, BomStopStructure> ChildrenBomTypeList_T; - - /** Definition allowing to retrive the default children bom holder type. */ - typedef BomChildrenHolderImp<BomStopContent> 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 holder of airline features. */ - const ChildrenBomHolder_T& getChildrenHolder() const { - assert (_childrenHolder != NULL); - return *_childrenHolder; - } - - /** Get the holder of airline features. */ - void getChildrenHolder (ChildrenBomHolder_T*& ioChildrenHolder) { - ioChildrenHolder = _childrenHolder; - } - - /** 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 (getChildrenHolder()); - 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 //////////////// - /** Default children holder setter. */ - void setChildrenHolder (DefaultChildrenBomHolder_T&) { } - - /** Set the children holder. */ - void setChildrenHolder (ChildrenBomHolder_T& ioChildrenHolder) { - _childrenHolder = &ioChildrenHolder; - } - - 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 describeShortKey(); } - - /** Get a string describing the whole key (differentiating two objects - at any level). */ - const std::string describeKey() const { return getKey().describe(); } - - /** 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), _childrenHolder (NULL) { }; - AirlineFeatureSetStructure (const AirlineFeatureSetStructure&); - - /** Destructor. */ - ~AirlineFeatureSetStructure () { } - - private: - // Attributes - /** The actual functional (Business Object) content. */ - BOM_CONTENT* _content; - - /** Holder of inventories. */ - ChildrenBomHolder_T* _childrenHolder; - }; - -} -#endif // __STDAIR_BOM_AIRLINEFEATURESETSTRUCTURE_HPP - Deleted: trunk/stdair/stdair/bom/AirlineFeatureSetTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureSetTypes.hpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/bom/AirlineFeatureSetTypes.hpp 2010-04-22 11:03:11 UTC (rev 177) @@ -1,19 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -#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 - Deleted: trunk/stdair/stdair/bom/AirlineFeatureStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureStructure.hpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/bom/AirlineFeatureStructure.hpp 2010-04-22 11:03:11 UTC (rev 177) @@ -1,113 +0,0 @@ -#ifndef __STDAIR_BOM_AIRLINEFEATURESTRUCTURE_HPP -#define __STDAIR_BOM_AIRLINEFEATURESTRUCTURE_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <iosfwd> -// MPL -#include <boost/mpl/vector.hpp> -// STDAIR -#include <stdair/bom/BomStopStructure.hpp> -#include <stdair/bom/BomStopContent.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 <BomStopStructure, - BomStopStructure> ChildrenBomTypeList_T; - - /** Definition allowing to retrieve the default children bom holder type. */ - typedef BomChildrenHolderImp<BomStopContent> 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 holder setter. */ - void setChildrenHolder (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 describeShortKey(); } - - /** Get a string describing the whole key (differentiating two objects - at any level). */ - const std::string describeKey() const { return getKey().describe(); } - - /** 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 Modified: trunk/stdair/stdair/bom/AirlineFeatureTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureTypes.hpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/bom/AirlineFeatureTypes.hpp 2010-04-22 11:03:11 UTC (rev 177) @@ -12,19 +12,17 @@ namespace stdair { // Forward declarations. - template <typename BOM_CONTENT> class AirlineFeatureStructure; + template <typename CONTENT> class Structure; + template <typename CONTENT> class BomChildrenHolderImp; template <typename BOM> struct BomList_T; template <typename BOM> struct BomMap_T; class AirlineFeature; /** Define the airline feature structure. */ - typedef AirlineFeatureStructure<AirlineFeature> AirlineFeatureStructure_T; - - /** Define the airline feature structure list. */ - typedef std::vector<AirlineFeatureStructure_T*> AirlineFeatureStructureList_T; + typedef Structure<AirlineFeature> AirlineFeatureStructure_T; - /** Define the airline feature structure map. */ - typedef std::map<const std::string, AirlineFeatureStructure_T*> AirlineFeatureStructureMap_T; + /** Define the airline feature holder. */ + typedef BomChildrenHolderImp<AirlineFeature> AirlineFeatureHolder_T; /** Define the airline feature list. */ typedef BomList_T<AirlineFeature> AirlineFeatureList_T; Modified: trunk/stdair/stdair/bom/AirportDate.cpp =================================================================== --- trunk/stdair/stdair/bom/AirportDate.cpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/bom/AirportDate.cpp 2010-04-22 11:03:11 UTC (rev 177) @@ -1,22 +1,18 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// C -#include <assert.h> +// STL +#include <cassert> // STDAIR #include <stdair/basic/BasConst_Inventory.hpp> -#include <stdair/bom/AirportDateStructure.hpp> -#include <stdair/bom/AirportDate.hpp> -#include <stdair/bom/OutboundPath.hpp> -#include <stdair/bom/BomList.hpp> -#include <stdair/bom/BomMap.hpp> +#include <stdair/bom/BomSource.hpp> namespace stdair { // //////////////////////////////////////////////////////////////////// - AirportDate::AirportDate (const BomKey_T& iKey, - BomStructure_T& ioAirportStructure) - : AirportDateContent (iKey), _airportDateStructure (ioAirportStructure) { + AirportDate::AirportDate (const Key_T& iKey, + Structure_T& ioAirportStructure) + : AirportDateContent (iKey), _structure (ioAirportStructure) { } // //////////////////////////////////////////////////////////////////// @@ -35,34 +31,25 @@ // //////////////////////////////////////////////////////////////////// std::string AirportDate::toString() const { std::ostringstream oStr; - - // First, put the key of that level oStr << describeShortKey() << std::endl; - - // Then, browse the children - // [...] (no child for now) - return oStr.str(); } // //////////////////////////////////////////////////////////////////// const std::string AirportDate::describeKey() const { - return _key.describe(); + std::ostringstream oStr; + oStr << _structure.describeParentKey() << ", " << describeShortKey(); + return oStr.str(); } // //////////////////////////////////////////////////////////////////// - const std::string AirportDate::describeShortKey() const { - return _key.toString(); - } - - // //////////////////////////////////////////////////////////////////// OutboundPathList_T AirportDate::getOutboundPathList () const { - return _airportDateStructure.getChildrenHolder(); + return _structure.getChildrenHolder<OutboundPath>(); } // //////////////////////////////////////////////////////////////////// OutboundPathMap_T AirportDate::getOutboundPathMap () const { - return _airportDateStructure.getChildrenHolder(); + return _structure.getChildrenHolder<OutboundPath>(); } Modified: trunk/stdair/stdair/bom/AirportDate.hpp =================================================================== --- trunk/stdair/stdair/bom/AirportDate.hpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/bom/AirportDate.hpp 2010-04-22 11:03:11 UTC (rev 177) @@ -5,17 +5,14 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/NetworkDate.hpp> -#include <stdair/bom/AirportDateStructure.hpp> #include <stdair/bom/AirportDateContent.hpp> #include <stdair/bom/AirportDateTypes.hpp> #include <stdair/bom/OutboundPathTypes.hpp> namespace stdair { // Forward declarations - class FacBomContent; - struct AirportDateKey_T; - struct OutboundPathKey_T; + class NetworkDate; + class OutboundPath; /** Class representing the actual functional/business content for a airport-date. */ @@ -23,21 +20,38 @@ friend class FacBomContent; public: - // Type definitions + // ////////////////////////////////////////////////////////////////// + // See the explanations, within the BomRoot class, for all + // the types which require to be specified below + // ////////////////////////////////////////////////////////////////// + /** Definition allowing to retrieve the associated BOM structure type. */ + typedef AirportDateStructure_T Structure_T; + /** Definition allowing to retrieve the associated parent BOM content type. */ typedef NetworkDate Parent_T; - /** Definition allowing to retrieve the associated BOM structure type. */ - typedef AirportDateStructure_T BomStructure_T; + /** Define the list of children holder types. */ + typedef boost::fusion::map< + boost::fusion::pair<OutboundPath, OutboundPathHolder_T*> + > ChildrenHolderMap_T; + // ////////////////////////////////////////////////////////////////// + + public: + // /////////// Getters ///////////// + /** Get a list or map of a children type for iteration methods. */ + OutboundPathList_T getOutboundPathList () const; + OutboundPathMap_T getOutboundPathMap () const; - /** Definition allowing to retrieve the associated BOM key type. */ - typedef AirportDateKey_T BomKey_T; - - /** Definition allowing to retrieve the associated - BOM content child type. */ - typedef OutboundPath ContentChild_T; + /** Get the OutboundPathListList. */ + const OutboundPathListList_T& getOutboundPathListList () const { + return _outboundPathListList; + } + public: + // //////////// Business Methods ////////////// + /** Build the list of lists of outbound paths. **/ + void buildOutboundPathListList (stdair::OutboundPath&); public: // /////////// Display support methods ///////// @@ -56,49 +70,21 @@ 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; - - public: - // /////////// Getters ///////////// - /** Get a OutboundPathList_T for iteration methods. */ - OutboundPathList_T getOutboundPathList () const; - - /** Get a OutboundPathMap_T for iteration methods. */ - OutboundPathMap_T getOutboundPathMap () const; - - /** Get the OutboundPathListList. */ - const OutboundPathListList_T& getOutboundPathListList () const { - return _outboundPathListList; - } - - private: - /** Retrieve the BOM structure object. */ - BomStructure_T& getBomStructure () { - return _airportDateStructure; - } - - public: - // //////////// Business Methods ////////////// - /** Build the list of lists of outbound paths. **/ - void buildOutboundPathListList (stdair::OutboundPath&); - protected: /** Constructors are private so as to force the usage of the Factory layer. */ + /** Constructors. */ + AirportDate (const Key_T&, Structure_T&); + /** Destructor. */ + virtual ~AirportDate(); /** Default constructors. */ AirportDate (); AirportDate (const AirportDate&); - AirportDate (const BomKey_T&, BomStructure_T&); - /** Destructor. */ - virtual ~AirportDate(); - protected: // Attributes /** Reference structure. */ - BomStructure_T& _airportDateStructure; + Structure_T& _structure; /** The list of lists of OutboundPaths, used uniquement for the construction of the main list of OutboundPaths in Modified: trunk/stdair/stdair/bom/AirportDateContent.cpp =================================================================== --- trunk/stdair/stdair/bom/AirportDateContent.cpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/bom/AirportDateContent.cpp 2010-04-22 11:03:11 UTC (rev 177) @@ -9,7 +9,7 @@ namespace stdair { // //////////////////////////////////////////////////////////////////// - AirportDateContent::AirportDateContent (const BomKey_T& iKey) \ + AirportDateContent::AirportDateContent (const Key_T& iKey) \ : _key (iKey) { } Modified: trunk/stdair/stdair/bom/AirportDateContent.hpp =================================================================== --- trunk/stdair/stdair/bom/AirportDateContent.hpp 2010-04-18 10:44:47 UTC (rev 176) +++ trunk/stdair/stdair/bom/AirportDateContent.hpp 2010-04-22 11:03:11 UTC (rev 177) @@ -15,12 +15,12 @@ public: // Type definitions. /** Definition allowing to retrieve the associated BOM key type. */ - typedef AirportDateKey_T BomKey_T; + typedef AirportDateKey_T Key_T; public: // /////////// Getters ///////////// /** Get the airport-date key. */ - const BomKey_T& getKey() const { + const Key_T& getKey() const { return _key; } @@ -42... [truncated message content] |
From: <den...@us...> - 2010-04-18 10:44:53
|
Revision: 176 http://stdair.svn.sourceforge.net/stdair/?rev=176&view=rev Author: denis_arnaud Date: 2010-04-18 10:44:47 +0000 (Sun, 18 Apr 2010) Log Message: ----------- [Test Samples] The inventory dumps have a new subclass-related field. Modified Paths: -------------- trunk/stdair/test/samples/invdump01.csv Modified: trunk/stdair/test/samples/invdump01.csv =================================================================== --- trunk/stdair/test/samples/invdump01.csv 2010-04-18 00:01:55 UTC (rev 175) +++ trunk/stdair/test/samples/invdump01.csv 2010-04-18 10:44:47 UTC (rev 176) @@ -1,2 +1,2 @@ -150310/SV/5/110310/INT/KBP;JFK;110310;1410;110310;1555;J,45,47,0,19,25,27,0,20,11:-19:47,11:-18:46,11:-17:45,11:-16:44,11:-15:43,11:-14:42,11:-13:41,11:-12:40,11:-11:39,11:-10:38,11:-9:37,11:-8:36,11:-7:35,11:-6:34,11:-5:33,11:-4:32,11:-3:31,11:-2:30,11:-1:29,11:0:28,11:1:27,11:2:26,11:3:25,11:4:24,11:5:23,11:6:22,69:7:21,127:8:20,184:9:19,242:10:18,300:11:17,478:12:16,656:13:15,833:14:14,1011:15:13,1071:16:12,1131:17:11,1191:18:10,1251:19:9,1431:20:8,1611:21:7,1790:22:6,1970:23:5,1983:24:4,1995:25:3,2008:26:2,2020:27:1;Y,218,225,0,199,17,24,0,201,42:-200:225,42:-199:224,42:-198:223,43:-197:222,44:-196:221,45:-195:220,45:-194:219,46:-193:218,47:-192:217,48:-191:216,48:-190:215,49:-189:214,50:-188:213,51:-187:212,51:-186:211,52:-185:210,53:-184:209,54:-183:208,54:-182:207,55:-181:206,56:-180:205,56:-179:204,57:-178:203,58:-177:202,59:-176:201,59:-175:200,60:-174:199,61:-173:198,62:-172:197,62:-171:196,63:-170:195,64:-169:194,65:-168:193,65:-167:192,66:-166:191,67:-165:190,67:-164:189,68:-163:188,69:-162:187,70:-161:186,70:-160:185,71:-159:184,72:-158:183,73:-157:182,73:-156:181,74:-155:180,75:-154:179,76:-153:178,76:-152:177,77:-151:176,78:-150:175,78:-149:174,79:-148:173,80:-147:172,81:-146:171,81:-145:170,82:-144:169,83:-143:168,84:-142:167,84:-141:166,85:-140:165,86:-139:164,87:-138:163,87:-137:162,88:-136:161,89:-135:160,89:-134:159,90:-133:158,91:-132:157,92:-131:156,92:-130:155,93:-129:154,94:-128:153,95:-127:152,95:-126:151,96:-125:150,97:-124:149,98:-123:148,98:-122:147,99:-121:146,100:-120:145,100:-119:144,101:-118:143,102:-117:142,103:-116:141,103:-115:140,104:-114:139,105:-113:138,106:-112:137,106:-111:136,107:-110:135,108:-109:134,109:-108:133,109:-107:132,110:-106:131,111:-105:130,111:-104:129,112:-103:128,113:-102:127,114:-101:126,114:-100:125,115:-99:124,116:-98:123,117:-97:122,117:-96:121,118:-95:120,119:-94:119,120:-93:118,120:-92:117,121:-91:116,122:-90:115,122:-89:114,123:-88:113,124:-87:112,125:-86:111,125:-85:110,126:-84:109,127:-83:108,128:-82:107,128:-81:106,129:-80:105,130:-79:104,131:-78:103,131:-77:102,132:-76:101,133:-75:100,133:-74:99,134:-73:98,135:-72:97,136:-71:96,136:-70:95,137:-69:94,138:-68:93,139:-67:92,139:-66:91,140:-65:90,141:-64:89,142:-63:88,142:-62:87,143:-61:86,144:-60:85,144:-59:84,145:-58:83,146:-57:82,147:-56:81,147:-55:80,148:-54:79,149:-53:78,150:-52:77,150:-51:76,151:-50:75,152:-49:74,153:-48:73,153:-47:72,154:-46:71,155:-45:70,155:-44:69,156:-43:68,157:-42:67,158:-41:66,158:-40:65,159:-39:64,160:-38:63,161:-37:62,161:-36:61,162:-35:60,163:-34:59,164:-33:58,164:-32:57,165:-31:56,166:-30:55,166:-29:54,167:-28:53,168:-27:52,169:-26:51,169:-25:50,170:-24:49,171:-23:48,172:-22:47,172:-21:46,173:-20:45,174:-19:44,175:-18:43,175:-17:42,176:-16:41,177:-15:40,177:-14:39,178:-13:38,179:-12:37,180:-11:36,180:-10:35,181:-9:34,182:-8:33,183:-7:32,183:-6:31,184:-5:30,185:-4:29,186:-3:28,186:-2:27,187:-1:26,188:0:25,188:1:24,197:2:23,206:3:22,215:4:21,224:5:20,233:6:19,242:7:18,251:8:17,260:9:16,269:10:15,305:11:14,341:12:13,378:13:12,414:14:11,450:15:10,454:16:9,458:17:8,521:18:7,583:19:6,761:20:5,762:21:4,762:22:3,1005:23:2,1248:24:1/HEL;JFK;J,19,J|0:45:5:0:0:1:0:0:0:0:1:26:26:27,C|0:40:6:0:0:2:0:0:0:0:2:22:22:27,D|0:34:9:0:0:5:0:0:0:0:5:18:18:20,I|0:25:10:0:0:6:0:0:0:0:6:14:14:19,F|0:15:8:0:0:3:0:0:0:0:3:10:1:12,U|0:7:7:0:0:2:0:0:0:0:2:5:0:10;Y,199,Y|0:223:2:12:0:1:0:0:0:0:1:24:24:24,B|0:221:1:12:0:0:0:0:0:0:0:23:23:23,H|0:220:3:7:0:2:0:0:0:0:2:22:22:23,K|0:217:3:0:0:2:0:0:0:0:2:21:21:22,M|0:214:1:0:0:0:0:0:0:0:0:20:20:22,P|0:213:1:0:0:0:0:0:0:0:0:19:19:19,T|0:212:2:0:0:0:0:0:0:0:0:18:18:19,L|0:210:5:4:0:3:0:0:0:0:3:16:11:11,V|0:205:7:1:0:5:0:0:0:0:5:14:14:14,S|0:198:7:6:0:5:0:0:0:0:5:12:9:9,N|0:191:2:0:0:0:0:0:0:0:0:10:10:12,Q|0:185:33:1:0:31:0:0:0:0:31:4:4:11,O|0:152:15:8:8:13:0:0:0:0:13:2:2:3,Z|0:137:46:1:5:46:0:0:0:0:46:0:-6:9,R|0:91:41:3:3:41:0:0:0:0:41:0:-5:-5,G|0:189:2:2:0:0:0:0:0:0:0:8:8:9,W|0:50:45:0:3:45:0:0:0:0:45:0:-25:3,X|0:5:5:0:0:5:0:0:0:0:5:0:-5:-10,E|0:0:0:0:0:0:0:0:0:0:0:0:0:-201,A|0:187:2:0:0:0:0:0:0:0:0:6:5:5; -150310/SV/5/110510/INT/KBP;JFK;110510;1410;110510;1550;J,32,32,0,4,28,28,0,4,11:-3:32,58:-2:31,104:-1:30,150:0:29,196:1:28,210:2:27,224:3:26,237:4:25,251:5:24,264:6:23,278:7:22,291:8:21,305:9:20,328:10:19,375:11:18,422:12:17,469:13:16,517:14:15,564:15:14,647:16:13,734:17:12,765:18:11,795:19:10,826:20:9,856:21:8,886:22:7,954:23:6,1041:24:5,1128:25:4,1262:26:3,1396:27:2,1722:28:1;Y,265,274,0,105,160,169,0,105,45:-104:274,45:-103:273,45:-102:272,45:-101:271,45:-100:270,45:-99:269,45:-98:268,45:-97:267,45:-96:266,45:-95:265,45:-94:264,45:-93:263,45:-92:262,45:-91:261,45:-90:260,45:-89:259,45:-88:258,45:-87:257,45:-86:256,45:-85:255,45:-84:254,45:-83:253,45:-82:252,45:-81:251,45:-80:250,45:-79:249,45:-78:248,45:-77:247,45:-76:246,45:-75:245,45:-74:244,45:-73:243,45:-72:242,45:-71:241,45:-70:240,45:-69:239,45:-68:238,45:-67:237,45:-66:236,45:-65:235,45:-64:234,45:-63:233,45:-62:232,45:-61:231,45:-60:230,45:-59:229,45:-58:228,45:-57:227,45:-56:226,45:-55:225,45:-54:224,45:-53:223,45:-52:222,45:-51:221,45:-50:220,45:-49:219,45:-48:218,45:-47:217,45:-46:216,45:-45:215,45:-44:214,45:-43:213,45:-42:212,45:-41:211,45:-40:210,45:-39:209,45:-38:208,45:-37:207,45:-36:206,45:-35:205,45:-34:204,45:-33:203,45:-32:202,45:-31:201,45:-30:200,45:-29:199,45:-28:198,45:-27:197,45:-26:196,45:-25:195,45:-24:194,45:-23:193,45:-22:192,45:-21:191,45:-20:190,45:-19:189,45:-18:188,45:-17:187,45:-16:186,45:-15:185,45:-14:184,45:-13:183,45:-12:182,45:-11:181,45:-10:180,45:-9:179,45:-8:178,45:-7:177,45:-6:176,45:-5:175,45:-4:174,45:-3:173,45:-2:172,45:-1:171,45:0:170,45:1:169,45:2:168,45:3:167,45:4:166,45:5:165,45:6:164,45:7:163,45:8:162,45:9:161,45:10:160,45:11:159,45:12:158,45:13:157,45:14:156,45:15:155,45:16:154,45:17:153,45:18:152,45:19:151,45:20:150,45:21:149,45:22:148,45:23:147,45:24:146,45:25:145,45:26:144,45:27:143,45:28:142,45:29:141,45:30:140,45:31:139,45:32:138,45:33:137,45:34:136,45:35:135,47:36:134,50:37:133,53:38:132,56:39:131,59:40:130,61:41:129,64:42:128,67:43:127,70:44:126,73:45:125,76:46:124,78:47:123,81:48:122,84:49:121,87:50:120,90:51:119,93:52:118,95:53:117,98:54:116,101:55:115,104:56:114,107:57:113,108:58:112,109:59:111,110:60:110,111:61:109,112:62:108,113:63:107,114:64:106,115:65:105,116:66:104,117:67:103,118:68:102,119:69:101,120:70:100,121:71:99,122:72:98,123:73:97,123:74:96,123:75:95,123:76:94,123:77:93,124:78:92,124:79:91,124:80:90,124:81:89,125:82:88,125:83:87,125:84:86,125:85:85,125:86:84,126:87:83,126:88:82,126:89:81,126:90:80,130:91:79,134:92:78,138:93:77,145:94:76,154:95:75,162:96:74,164:97:73,166:98:72,168:99:71,170:100:70,172:101:69,175:102:68,180:103:67,186:104:66,192:105:65,198:106:64,209:107:63,219:108:62,225:109:61,231:110:60,235:111:59,238:112:58,241:113:57,243:114:56,244:115:55,244:116:54,244:117:53,244:118:52,245:119:51,245:120:50,245:121:49,245:122:48,246:123:47,246:124:46,246:125:45,246:126:44,247:127:43,247:128:42,250:129:41,252:130:40,255:131:39,258:132:38,260:133:37,263:134:36,266:135:35,269:136:34,271:137:33,287:138:32,304:139:31,320:140:30,336:141:29,343:142:28,350:143:27,397:144:26,414:145:25,429:146:24,469:147:23,510:148:22,550:149:21,591:150:20,631:151:19,635:152:18,639:153:17,654:154:16,667:155:15,699:156:14,730:157:13,761:158:12,761:159:11,761:160:10,801:161:9,841:162:8,881:163:7,948:164:6,1015:165:5,1081:166:4,1093:167:3,1105:168:2,1117:169:1/HEL;JFK;J,4,J|0:32:4:5:0:4:0:0:0:0:4:28:28:28,C|0:28:3:0:0:0:0:0:0:0:0:28:28:28,D|0:25:4:4:0:0:0:0:0:0:0:25:25:27,I|0:21:12:1:0:0:0:0:0:0:0:21:21:26,F|0:9:2:0:0:0:0:0:0:0:0:9:4:18,U|0:7:7:0:0:0:0:0:0:0:0:7:2:8;Y,105,Y|0:274:4:6:0:1:0:0:0:0:1:169:169:169,B|0:270:2:0:0:0:0:0:0:0:0:166:166:169,H|0:268:3:0:0:0:0:0:0:0:0:164:164:166,K|0:265:3:0:0:0:0:0:0:0:0:161:161:164,M|0:262:3:5:0:0:0:0:0:0:0:158:158:162,P|0:259:4:0:0:0:0:0:0:0:0:155:155:156,T|0:255:4:0:0:0:0:0:0:0:0:151:150:150,L|0:251:8:2:0:2:0:0:0:0:2:147:140:140,V|0:243:4:0:0:0:0:0:0:0:0:141:141:146,S|0:239:14:4:8:0:0:0:0:0:0:137:135:135,N|0:225:6:2:0:0:0:0:0:0:0:123:123:143,Q|0:191:13:0:0:6:0:0:0:0:6:110:110:140,O|0:178:18:4:6:0:0:0:0:0:0:103:103:107,Z|0:160:40:1:3:23:0:0:0:0:23:85:17:137,R|0:120:100:5:7:50:0:0:0:0:50:68:0:103,G|0:219:24:1:0:21:21:0:0:0:21:117:117:133,W|0:20:10:1:0:1:0:0:0:0:1:18:18:107,X|0:10:7:1:0:1:0:0:0:0:1:9:9:103,E|0:3:3:0:0:0:0:0:0:0:0:3:0:-105,A|0:195:4:0:0:0:0:0:0:0:0:114:110:110; +110310/SV/5/110310/INT/KBP;JFK;110310;1410;110310;1555;J,45,47,0,19,25,27,0,20,11:-19:47,11:-18:46,11:-17:45,11:-16:44,11:-15:43,11:-14:42,11:-13:41,11:-12:40,11:-11:39,11:-10:38,11:-9:37,11:-8:36,11:-7:35,11:-6:34,11:-5:33,11:-4:32,11:-3:31,11:-2:30,11:-1:29,11:0:28,11:1:27,11:2:26,11:3:25,11:4:24,11:5:23,11:6:22,69:7:21,127:8:20,184:9:19,242:10:18,300:11:17,478:12:16,656:13:15,833:14:14,1011:15:13,1071:16:12,1131:17:11,1191:18:10,1251:19:9,1431:20:8,1611:21:7,1790:22:6,1970:23:5,1983:24:4,1995:25:3,2008:26:2,2020:27:1;Y,218,225,0,199,17,24,0,201,42:-200:225,42:-199:224,42:-198:223,43:-197:222,44:-196:221,45:-195:220,45:-194:219,46:-193:218,47:-192:217,48:-191:216,48:-190:215,49:-189:214,50:-188:213,51:-187:212,51:-186:211,52:-185:210,53:-184:209,54:-183:208,54:-182:207,55:-181:206,56:-180:205,56:-179:204,57:-178:203,58:-177:202,59:-176:201,59:-175:200,60:-174:199,61:-173:198,62:-172:197,62:-171:196,63:-170:195,64:-169:194,65:-168:193,65:-167:192,66:-166:191,67:-165:190,67:-164:189,68:-163:188,69:-162:187,70:-161:186,70:-160:185,71:-159:184,72:-158:183,73:-157:182,73:-156:181,74:-155:180,75:-154:179,76:-153:178,76:-152:177,77:-151:176,78:-150:175,78:-149:174,79:-148:173,80:-147:172,81:-146:171,81:-145:170,82:-144:169,83:-143:168,84:-142:167,84:-141:166,85:-140:165,86:-139:164,87:-138:163,87:-137:162,88:-136:161,89:-135:160,89:-134:159,90:-133:158,91:-132:157,92:-131:156,92:-130:155,93:-129:154,94:-128:153,95:-127:152,95:-126:151,96:-125:150,97:-124:149,98:-123:148,98:-122:147,99:-121:146,100:-120:145,100:-119:144,101:-118:143,102:-117:142,103:-116:141,103:-115:140,104:-114:139,105:-113:138,106:-112:137,106:-111:136,107:-110:135,108:-109:134,109:-108:133,109:-107:132,110:-106:131,111:-105:130,111:-104:129,112:-103:128,113:-102:127,114:-101:126,114:-100:125,115:-99:124,116:-98:123,117:-97:122,117:-96:121,118:-95:120,119:-94:119,120:-93:118,120:-92:117,121:-91:116,122:-90:115,122:-89:114,123:-88:113,124:-87:112,125:-86:111,125:-85:110,126:-84:109,127:-83:108,128:-82:107,128:-81:106,129:-80:105,130:-79:104,131:-78:103,131:-77:102,132:-76:101,133:-75:100,133:-74:99,134:-73:98,135:-72:97,136:-71:96,136:-70:95,137:-69:94,138:-68:93,139:-67:92,139:-66:91,140:-65:90,141:-64:89,142:-63:88,142:-62:87,143:-61:86,144:-60:85,144:-59:84,145:-58:83,146:-57:82,147:-56:81,147:-55:80,148:-54:79,149:-53:78,150:-52:77,150:-51:76,151:-50:75,152:-49:74,153:-48:73,153:-47:72,154:-46:71,155:-45:70,155:-44:69,156:-43:68,157:-42:67,158:-41:66,158:-40:65,159:-39:64,160:-38:63,161:-37:62,161:-36:61,162:-35:60,163:-34:59,164:-33:58,164:-32:57,165:-31:56,166:-30:55,166:-29:54,167:-28:53,168:-27:52,169:-26:51,169:-25:50,170:-24:49,171:-23:48,172:-22:47,172:-21:46,173:-20:45,174:-19:44,175:-18:43,175:-17:42,176:-16:41,177:-15:40,177:-14:39,178:-13:38,179:-12:37,180:-11:36,180:-10:35,181:-9:34,182:-8:33,183:-7:32,183:-6:31,184:-5:30,185:-4:29,186:-3:28,186:-2:27,187:-1:26,188:0:25,188:1:24,197:2:23,206:3:22,215:4:21,224:5:20,233:6:19,242:7:18,251:8:17,260:9:16,269:10:15,305:11:14,341:12:13,378:13:12,414:14:11,450:15:10,454:16:9,458:17:8,521:18:7,583:19:6,761:20:5,762:21:4,762:22:3,1005:23:2,1248:24:1/KBP;JFK;J,19,J|0:45::5:0:0:1:0:0:0:0:1::26:26:27,C|0:40:J0:6:0:0:2:0:0:0:0:2::22:22:27,D|0:34:C0:9:0:0:5:0:0:0:0:5::18:18:20,I|0:25:D0:10:0:0:6:0:0:0:0:6::14:14:19,F|0:15:I0:8:0:0:3:0:0:0:0:3::10:1:12,U|0:7:F0:7:0:0:2:0:0:0:0:2::5:0:10;Y,199,Y|0:223::2:12:0:1:0:0:0:0:1::24:24:24,B|0:221:Y0:1:12:0:0:0:0:0:0:0::23:23:23,H|0:220:B0:3:7:0:2:0:0:0:0:2::22:22:23,K|0:217:H0:3:0:0:2:0:0:0:0:2::21:21:22,M|0:214:K0:1:0:0:0:0:0:0:0:0::20:20:22,P|0:213:M0:1:0:0:0:0:0:0:0:0::19:19:19,T|0:212:P0:2:0:0:0:0:0:0:0:0::18:18:19,L|0:210:T0:5:4:0:3:0:0:0:0:3::16:11:11,V|0:205:L0:7:1:0:5:0:0:0:0:5::14:14:14,S|0:198:V0:7:6:0:5:0:0:0:0:5::12:9:9,N|0:191:S0:2:0:0:0:0:0:0:0:0::10:10:12,Q|0:185:A0:33:1:0:31:0:0:0:0:31::4:4:11,O|0:152:Q0:15:8:8:13:0:0:0:0:13::2:2:3,Z|0:137:O0:46:1:5:46:0:0:0:0:46::0:-6:9,R|0:91:Z0:41:3:3:41:0:0:0:0:41::0:-5:-5,G|0:189:N0:2:2:0:0:0:0:0:0:0::8:8:9,W|0:50:R0:45:0:3:45:0:0:0:0:45::0:-25:3,X|0:5:W0:5:0:0:5:0:0:0:0:5::0:-5:-10,E|0:0:X0:0:0:0:0:0:0:0:0:0::0:0:-201,A|0:187:G0:2:0:0:0:0:0:0:0:0::6:5:5; +110510/SV/5/110510/INT/KBP;JFK;110510;1410;110510;1550;J,32,32,0,4,28,28,0,4,11:-3:32,58:-2:31,104:-1:30,150:0:29,196:1:28,210:2:27,224:3:26,237:4:25,251:5:24,264:6:23,278:7:22,291:8:21,305:9:20,328:10:19,375:11:18,422:12:17,469:13:16,517:14:15,564:15:14,647:16:13,734:17:12,765:18:11,795:19:10,826:20:9,856:21:8,886:22:7,954:23:6,1041:24:5,1128:25:4,1262:26:3,1396:27:2,1722:28:1;Y,265,274,0,105,160,169,0,105,45:-104:274,45:-103:273,45:-102:272,45:-101:271,45:-100:270,45:-99:269,45:-98:268,45:-97:267,45:-96:266,45:-95:265,45:-94:264,45:-93:263,45:-92:262,45:-91:261,45:-90:260,45:-89:259,45:-88:258,45:-87:257,45:-86:256,45:-85:255,45:-84:254,45:-83:253,45:-82:252,45:-81:251,45:-80:250,45:-79:249,45:-78:248,45:-77:247,45:-76:246,45:-75:245,45:-74:244,45:-73:243,45:-72:242,45:-71:241,45:-70:240,45:-69:239,45:-68:238,45:-67:237,45:-66:236,45:-65:235,45:-64:234,45:-63:233,45:-62:232,45:-61:231,45:-60:230,45:-59:229,45:-58:228,45:-57:227,45:-56:226,45:-55:225,45:-54:224,45:-53:223,45:-52:222,45:-51:221,45:-50:220,45:-49:219,45:-48:218,45:-47:217,45:-46:216,45:-45:215,45:-44:214,45:-43:213,45:-42:212,45:-41:211,45:-40:210,45:-39:209,45:-38:208,45:-37:207,45:-36:206,45:-35:205,45:-34:204,45:-33:203,45:-32:202,45:-31:201,45:-30:200,45:-29:199,45:-28:198,45:-27:197,45:-26:196,45:-25:195,45:-24:194,45:-23:193,45:-22:192,45:-21:191,45:-20:190,45:-19:189,45:-18:188,45:-17:187,45:-16:186,45:-15:185,45:-14:184,45:-13:183,45:-12:182,45:-11:181,45:-10:180,45:-9:179,45:-8:178,45:-7:177,45:-6:176,45:-5:175,45:-4:174,45:-3:173,45:-2:172,45:-1:171,45:0:170,45:1:169,45:2:168,45:3:167,45:4:166,45:5:165,45:6:164,45:7:163,45:8:162,45:9:161,45:10:160,45:11:159,45:12:158,45:13:157,45:14:156,45:15:155,45:16:154,45:17:153,45:18:152,45:19:151,45:20:150,45:21:149,45:22:148,45:23:147,45:24:146,45:25:145,45:26:144,45:27:143,45:28:142,45:29:141,45:30:140,45:31:139,45:32:138,45:33:137,45:34:136,45:35:135,47:36:134,50:37:133,53:38:132,56:39:131,59:40:130,61:41:129,64:42:128,67:43:127,70:44:126,73:45:125,76:46:124,78:47:123,81:48:122,84:49:121,87:50:120,90:51:119,93:52:118,95:53:117,98:54:116,101:55:115,104:56:114,107:57:113,108:58:112,109:59:111,110:60:110,111:61:109,112:62:108,113:63:107,114:64:106,115:65:105,116:66:104,117:67:103,118:68:102,119:69:101,120:70:100,121:71:99,122:72:98,123:73:97,123:74:96,123:75:95,123:76:94,123:77:93,124:78:92,124:79:91,124:80:90,124:81:89,125:82:88,125:83:87,125:84:86,125:85:85,125:86:84,126:87:83,126:88:82,126:89:81,126:90:80,130:91:79,134:92:78,138:93:77,145:94:76,154:95:75,162:96:74,164:97:73,166:98:72,168:99:71,170:100:70,172:101:69,175:102:68,180:103:67,186:104:66,192:105:65,198:106:64,209:107:63,219:108:62,225:109:61,231:110:60,235:111:59,238:112:58,241:113:57,243:114:56,244:115:55,244:116:54,244:117:53,244:118:52,245:119:51,245:120:50,245:121:49,245:122:48,246:123:47,246:124:46,246:125:45,246:126:44,247:127:43,247:128:42,250:129:41,252:130:40,255:131:39,258:132:38,260:133:37,263:134:36,266:135:35,269:136:34,271:137:33,287:138:32,304:139:31,320:140:30,336:141:29,343:142:28,350:143:27,397:144:26,414:145:25,429:146:24,469:147:23,510:148:22,550:149:21,591:150:20,631:151:19,635:152:18,639:153:17,654:154:16,667:155:15,699:156:14,730:157:13,761:158:12,761:159:11,761:160:10,801:161:9,841:162:8,881:163:7,948:164:6,1015:165:5,1081:166:4,1093:167:3,1105:168:2,1117:169:1/KBP;JFK;J,4,J|0:32::4:5:0:4:0:0:0:0:4::28:28:28,C|0:28:J0:3:0:0:0:0:0:0:0:0::28:28:28,D|0:25:C0:4:4:0:0:0:0:0:0:0::25:25:27,I|0:21:D0:12:1:0:0:0:0:0:0:0::21:21:26,F|0:9:I0:2:0:0:0:0:0:0:0:0::9:4:18,U|0:7:F0:7:0:0:0:0:0:0:0:0::7:2:8;Y,105,Y|0:274::4:6:0:1:0:0:0:0:1::169:169:169,B|0:270:Y0:2:0:0:0:0:0:0:0:0::166:166:169,H|0:268:B0:3:0:0:0:0:0:0:0:0::164:164:166,K|0:265:H0:3:0:0:0:0:0:0:0:0::161:161:164,M|0:262:K0:3:5:0:0:0:0:0:0:0::158:158:162,P|0:259:M0:4:0:0:0:0:0:0:0:0::155:155:156,T|0:255:P0:4:0:0:0:0:0:0:0:0::151:150:150,L|0:251:T0:8:2:0:2:0:0:0:0:2::147:140:140,V|0:243:L0:4:0:0:0:0:0:0:0:0::141:141:146,S|0:239:V0:14:4:8:0:0:0:0:0:0::137:135:135,N|0:225:S0:6:2:0:0:0:0:0:0:0::123:123:143,Q|0:191:A0:13:0:0:6:0:0:0:0:6::110:110:140,O|0:178:Q0:18:4:6:0:0:0:0:0:0::103:103:107,Z|0:160:O0:40:1:3:23:0:0:0:0:23::85:17:137,R|0:120:Z0:100:5:7:50:0:0:0:0:50::68:0:103,G|0:219:N0:24:1:0:21:21:0:0:0:21::117:117:133,W|0:20:R0:10:1:0:1:0:0:0:0:1::18:18:107,X|0:10:W0:7:1:0:1:0:0:0:0:1::9:9:103,E|0:3:X0:3:0:0:0:0:0:0:0:0::3:0:-105,A|0:195:G0:4:0:0:0:0:0:0:0:0::114:110:110; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2010-04-18 00:02:01
|
Revision: 175 http://stdair.svn.sourceforge.net/stdair/?rev=175&view=rev Author: denis_arnaud Date: 2010-04-18 00:01:55 +0000 (Sun, 18 Apr 2010) Log Message: ----------- [Yield] Added YieldStore BOM object (there is some work in CmdBomManager to switch BomRoot and BR). Added Paths: ----------- trunk/stdair/test/samples/yieldstore01.csv Added: trunk/stdair/test/samples/yieldstore01.csv =================================================================== --- trunk/stdair/test/samples/yieldstore01.csv (rev 0) +++ trunk/stdair/test/samples/yieldstore01.csv 2010-04-18 00:01:55 UTC (rev 175) @@ -0,0 +1,2 @@ + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2010-04-18 00:01:48
|
Revision: 174 http://stdair.svn.sourceforge.net/stdair/?rev=174&view=rev Author: denis_arnaud Date: 2010-04-18 00:01:41 +0000 (Sun, 18 Apr 2010) Log Message: ----------- [Yield] Added YieldStore BOM object (there is some work in CmdBomManager to switch BomRoot and BR). Modified Paths: -------------- trunk/stdair/stdair/STDAIR_Service.hpp trunk/stdair/stdair/batches/stdair.cpp trunk/stdair/stdair/bom/BR.cpp trunk/stdair/stdair/bom/BR.hpp trunk/stdair/stdair/bom/BomRoot.cpp trunk/stdair/stdair/bom/BomRoot.hpp trunk/stdair/stdair/bom/FD.hpp trunk/stdair/stdair/bom/IN.hpp trunk/stdair/stdair/bom/sources.mk trunk/stdair/stdair/command/CmdBomManager.cpp trunk/stdair/stdair/command/CmdBomManager.hpp trunk/stdair/stdair/service/STDAIR_Service.cpp Added Paths: ----------- trunk/stdair/stdair/bom/YieldStore.cpp trunk/stdair/stdair/bom/YieldStore.hpp trunk/stdair/stdair/bom/YieldStoreContent.cpp trunk/stdair/stdair/bom/YieldStoreContent.hpp trunk/stdair/stdair/bom/YieldStoreKey.cpp trunk/stdair/stdair/bom/YieldStoreKey.hpp trunk/stdair/stdair/bom/YieldStoreTypes.hpp Modified: trunk/stdair/stdair/STDAIR_Service.hpp =================================================================== --- trunk/stdair/stdair/STDAIR_Service.hpp 2010-04-09 15:31:37 UTC (rev 173) +++ trunk/stdair/stdair/STDAIR_Service.hpp 2010-04-18 00:01:41 UTC (rev 174) @@ -14,6 +14,7 @@ // Forward declarations class BomRoot; + class YieldStore; class Inventory; /** Interface for the STDAIR Services. */ @@ -48,6 +49,11 @@ <br>If not existing, a ObjectNotFoundException exception is thrown. */ Inventory& getInventory (const AirlineCode_T& iAirlineCode) const; + /** Retrieve the Yield Store corresponding to the given airline code + (YieldStore key). + <br>If not existing, a ObjectNotFoundException exception is thrown. */ + YieldStore& getYieldStore (const AirlineCode_T& iAirlineCode) const; + // ///////////////// Getters /////////////////// /** Get a reference on the BomRoot object. @@ -64,6 +70,11 @@ <br>If not existing, a ObjectNotFoundException exception is thrown. */ Inventory& createInventory (const AirlineCode_T& iAirlineCode) const; + /** Retrieve the YieldStore corresponding to the given airline code + (YieldStore key). + <br>If not existing, a ObjectNotFoundException exception is thrown. */ + YieldStore& createYieldStore (const AirlineCode_T& iAirlineCode) const; + /** Add the airline-specific AirlineFeature object to its AirlineFeatureSet parent. */ void addAirlineFeature (const AirlineCode_T& iAirlineCode) const; Modified: trunk/stdair/stdair/batches/stdair.cpp =================================================================== --- trunk/stdair/stdair/batches/stdair.cpp 2010-04-09 15:31:37 UTC (rev 173) +++ trunk/stdair/stdair/batches/stdair.cpp 2010-04-18 00:01:41 UTC (rev 174) @@ -23,7 +23,9 @@ // ///////// M A I N //////////// int main (int argc, char* argv[]) { + try { + stdair::BR& lBR = stdair::FacBomContent::instance().testCreate<stdair::BR> (); Modified: trunk/stdair/stdair/bom/BR.cpp =================================================================== --- trunk/stdair/stdair/bom/BR.cpp 2010-04-09 15:31:37 UTC (rev 173) +++ trunk/stdair/stdair/bom/BR.cpp 2010-04-18 00:01:41 UTC (rev 174) @@ -6,6 +6,7 @@ // STDAIR #include <stdair/bom/Structure.hpp> #include <stdair/bom/BR.hpp> +#include <stdair/bom/YieldStore.hpp> #include <stdair/bom/IN.hpp> #include <stdair/bom/BomList.hpp> #include <stdair/bom/BomMap.hpp> @@ -22,6 +23,16 @@ } // //////////////////////////////////////////////////////////////////// + const YieldStoreList_T BR::getYieldStoreList () const { + return _structure.getChildrenHolder<YieldStore>(); + } + + // //////////////////////////////////////////////////////////////////// + const YieldStoreMap_T BR::getYieldStoreMap () const { + return _structure.getChildrenHolder<YieldStore>(); + } + + // //////////////////////////////////////////////////////////////////// const INList_T BR::getINList () const { return _structure.getChildrenHolder<IN>(); } @@ -30,4 +41,5 @@ const INMap_T BR::getINMap () const { return _structure.getChildrenHolder<IN>(); } + } Modified: trunk/stdair/stdair/bom/BR.hpp =================================================================== --- trunk/stdair/stdair/bom/BR.hpp 2010-04-09 15:31:37 UTC (rev 173) +++ trunk/stdair/stdair/bom/BR.hpp 2010-04-18 00:01:41 UTC (rev 174) @@ -11,10 +11,12 @@ // STDAIR #include <stdair/bom/BomRootContent.hpp> #include <stdair/bom/BRTypes.hpp> +#include <stdair/bom/YieldStoreTypes.hpp> #include <stdair/bom/INTypes.hpp> namespace stdair { // Forward declarations. + class YieldStore; class IN; /** Class representing the actual functional/business content @@ -29,6 +31,7 @@ /** Define the list of children holder types. */ typedef boost::fusion::map< + boost::fusion::pair<YieldStore, YieldStoreHolder_T*>, boost::fusion::pair<IN, INHolder_T*> > ChildrenHolderTypeMap_T; /** Definition allowing to retrieve the parent type. */ @@ -59,8 +62,11 @@ public: // /////////// Getters ///////////// + const YieldStoreList_T getYieldStoreList () const; + const YieldStoreMap_T getYieldStoreMap () const; const INList_T getINList () const; const INMap_T getINMap () const; + private: /** Retrieve the BOM structure object. */ @@ -74,7 +80,7 @@ /** Default constructors. */ BR (); BR (const BR&); - BR (const BomKey_T& iKey, BomStructure_T& ioStructure); + BR (const BomKey_T&, BomStructure_T&); /** Destructor. */ virtual ~BR(); Modified: trunk/stdair/stdair/bom/BomRoot.cpp =================================================================== --- trunk/stdair/stdair/bom/BomRoot.cpp 2010-04-09 15:31:37 UTC (rev 173) +++ trunk/stdair/stdair/bom/BomRoot.cpp 2010-04-18 00:01:41 UTC (rev 174) @@ -8,6 +8,7 @@ #include <stdair/bom/BomRoot.hpp> #include <stdair/bom/BomList.hpp> #include <stdair/bom/BomMap.hpp> +#include <stdair/bom/YieldStore.hpp> #include <stdair/bom/Inventory.hpp> #include <stdair/bom/Network.hpp> #include <stdair/bom/DemandStream.hpp> @@ -56,6 +57,23 @@ } // //////////////////////////////////////////////////////////////////// + YieldStore* BomRoot::getYieldStore (const AirlineCode_T& iAirlineCode) const { + YieldStore* oYieldStore_ptr = NULL; + + // TODO: migrate to the new StdAir structure (e.g., IN, FD, etc.) + /* + YieldStoreMap_T lYieldStoreMap = getYieldStoreMap (); + YieldStoreMap_T::iterator itInv = lYieldStoreMap.find (iAirlineCode); + + if (itInv != lYieldStoreMap.end()) { + oYieldStore_ptr = itInv->second; + } + */ + + return oYieldStore_ptr; + } + + // //////////////////////////////////////////////////////////////////// Inventory* BomRoot::getInventory (const AirlineCode_T& iAirlineCode) const { Inventory* oInventory_ptr = NULL; Modified: trunk/stdair/stdair/bom/BomRoot.hpp =================================================================== --- trunk/stdair/stdair/bom/BomRoot.hpp 2010-04-09 15:31:37 UTC (rev 173) +++ trunk/stdair/stdair/bom/BomRoot.hpp 2010-04-18 00:01:41 UTC (rev 174) @@ -15,9 +15,11 @@ #include <stdair/bom/DemandStreamTypes.hpp> namespace stdair { + // Forward declarations. class FacBomContent; class AirlineFeatureSet; + class YieldStore; class DemandStream; struct BomRootKey_T; @@ -141,6 +143,11 @@ <br>If not existing, return the NULL pointer. */ Network* getNetwork (const NetworkID_T&) const; + /** Retrieve, if existing, the YieldStore corresponding to the + given airline code (YieldStore key). + <br>If not existing, return the NULL pointer. */ + YieldStore* getYieldStore (const AirlineCode_T&) const; + /** Retrieve the DemandStream which corresponds to the given key. */ DemandStream& getDemandStream (const DemandStreamKeyStr_T&) const; Modified: trunk/stdair/stdair/bom/FD.hpp =================================================================== --- trunk/stdair/stdair/bom/FD.hpp 2010-04-09 15:31:37 UTC (rev 173) +++ trunk/stdair/stdair/bom/FD.hpp 2010-04-18 00:01:41 UTC (rev 174) @@ -16,6 +16,7 @@ #include <stdair/bom/LDTypes.hpp> namespace stdair { + // Forward declarations. class IN; class SD; Modified: trunk/stdair/stdair/bom/IN.hpp =================================================================== --- trunk/stdair/stdair/bom/IN.hpp 2010-04-09 15:31:37 UTC (rev 173) +++ trunk/stdair/stdair/bom/IN.hpp 2010-04-18 00:01:41 UTC (rev 174) @@ -15,6 +15,7 @@ #include <stdair/bom/NDTypes.hpp> namespace stdair { + // Forward declarations. class BR; class FD; Added: trunk/stdair/stdair/bom/YieldStore.cpp =================================================================== --- trunk/stdair/stdair/bom/YieldStore.cpp (rev 0) +++ trunk/stdair/stdair/bom/YieldStore.cpp 2010-04-18 00:01:41 UTC (rev 174) @@ -0,0 +1,25 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// STDAIR +#include <stdair/bom/Structure.hpp> +#include <stdair/bom/BR.hpp> +#include <stdair/bom/YieldStore.hpp> +#include <stdair/bom/BomList.hpp> +#include <stdair/bom/BomMap.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + YieldStore::YieldStore (const BomKey_T& iKey, + BomStructure_T& ioYieldStoreStructure) + : YieldStoreContent (iKey), _structure (ioYieldStoreStructure) { + } + + // //////////////////////////////////////////////////////////////////// + YieldStore::~YieldStore () { + } + +} Added: trunk/stdair/stdair/bom/YieldStore.hpp =================================================================== --- trunk/stdair/stdair/bom/YieldStore.hpp (rev 0) +++ trunk/stdair/stdair/bom/YieldStore.hpp 2010-04-18 00:01:41 UTC (rev 174) @@ -0,0 +1,87 @@ +#ifndef __STDAIR_BOM_YIELDSTORE_HPP +#define __STDAIR_BOM_YIELDSTORE_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <iosfwd> +// BOOST Fusion +#include <boost/fusion/include/map.hpp> +// STDAIR +#include <stdair/bom/YieldStoreContent.hpp> +#include <stdair/bom/YieldStoreTypes.hpp> + +namespace stdair { + + // Forward declarations. + class BR; + + /** Class representing the actual functional/business content + for the Bom root. */ + class YieldStore : public YieldStoreContent { + friend class FacBomContent; + + public: + // ///////////////////////////////////////////////////////////////////////// + /** Definition allowing to retrieve the associated parent. */ + typedef BR Parent_T; + + /** Definition allowing to retrieve the associated BOM structure type. */ + typedef YieldStoreStructure_T BomStructure_T; + + /** Define the list of children holder types. */ + typedef boost::fusion::map< > ChildrenHolderTypeMap_T; + // ///////////////////////////////////////////////////////////////////////// + + public: + // /////////// Getters ///////////// + + + private: + /** Retrieve the BOM structure object. */ + BomStructure_T& getStructure () { + return _structure; + } + + + 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 _key.toString(); } + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + const std::string describeShortKey() const { return _key.toString(); } + + + protected: + /** Constructors are private so as to force the usage of the Factory + layer. */ + /** Default constructors. */ + YieldStore (); + YieldStore (const YieldStore&); + YieldStore (const BomKey_T& iKey, BomStructure_T& ioStructure); + /** Destructor. */ + virtual ~YieldStore(); + + private: + // Attributes + /** Reference structure. */ + BomStructure_T& _structure; + }; + +} +#endif // __STDAIR_BOM_YIELDSTORE_HPP Added: trunk/stdair/stdair/bom/YieldStoreContent.cpp =================================================================== --- trunk/stdair/stdair/bom/YieldStoreContent.cpp (rev 0) +++ trunk/stdair/stdair/bom/YieldStoreContent.cpp 2010-04-18 00:01:41 UTC (rev 174) @@ -0,0 +1,20 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// STDAIR +#include <stdair/bom/YieldStoreContent.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + YieldStoreContent::YieldStoreContent (const BomKey_T& iKey) : _key (iKey) { + } + + // //////////////////////////////////////////////////////////////////// + YieldStoreContent::~YieldStoreContent () { + } + +} + Added: trunk/stdair/stdair/bom/YieldStoreContent.hpp =================================================================== --- trunk/stdair/stdair/bom/YieldStoreContent.hpp (rev 0) +++ trunk/stdair/stdair/bom/YieldStoreContent.hpp 2010-04-18 00:01:41 UTC (rev 174) @@ -0,0 +1,75 @@ +#ifndef __STDAIR_BOM_YIELDSTORECONTENT_HPP +#define __STDAIR_BOM_YIELDSTORECONTENT_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/STDAIR_Types.hpp> +#include <stdair/bom/BomContent.hpp> +#include <stdair/bom/YieldStoreKey.hpp> + +namespace stdair { + + /** Class representing the actual attributes for an airline YieldStore. */ + class YieldStoreContent : public BomContent { + public : + // Type definitions + /** Definition allowing to retrieve the associated BOM key type. */ + typedef YieldStoreKey_T BomKey_T; + + 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; + + public: + // ////////// Getters //////////// + /** Get the airline code. */ + const AirlineCode_T& getAirlineCode () const { + return _key.getAirlineCode(); + } + + /** Get the YieldStore key. */ + const BomKey_T& getKey() const { + return _key; + } + + + public: + // ///////// Setters ////////// + + + protected: + /** Default constructors. */ + YieldStoreContent (const BomKey_T&); + YieldStoreContent (const YieldStoreContent&); + + /** Destructor. */ + virtual ~YieldStoreContent(); + + protected: + // Attributes + /** The key of both structure and content objects. */ + BomKey_T _key; + }; + +} +#endif // __STDAIR_BOM_YIELDSTORECONTENT_HPP + Added: trunk/stdair/stdair/bom/YieldStoreKey.cpp =================================================================== --- trunk/stdair/stdair/bom/YieldStoreKey.cpp (rev 0) +++ trunk/stdair/stdair/bom/YieldStoreKey.cpp 2010-04-18 00:01:41 UTC (rev 174) @@ -0,0 +1,43 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/YieldStoreKey.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + YieldStoreKey_T::YieldStoreKey_T (const AirlineCode_T& iAirlineCode) + : _airlineCode (iAirlineCode) { + } + // //////////////////////////////////////////////////////////////////// + YieldStoreKey_T::YieldStoreKey_T (const YieldStoreKey_T& iKey) + : _airlineCode (iKey._airlineCode) { + } + + // //////////////////////////////////////////////////////////////////// + YieldStoreKey_T::~YieldStoreKey_T () { + } + + // //////////////////////////////////////////////////////////////////// + void YieldStoreKey_T::toStream (std::ostream& ioOut) const { + ioOut << "YieldStoreKey: " << toString() << std::endl; + } + + // //////////////////////////////////////////////////////////////////// + void YieldStoreKey_T::fromStream (std::istream& ioIn) { + } + + // //////////////////////////////////////////////////////////////////// + const std::string YieldStoreKey_T::toString() const { + std::ostringstream oStr; + oStr << _airlineCode; + return oStr.str(); + } + + // //////////////////////////////////////////////////////////////////// + const std::string YieldStoreKey_T::describe() const { + return toString(); + } + +} Added: trunk/stdair/stdair/bom/YieldStoreKey.hpp =================================================================== --- trunk/stdair/stdair/bom/YieldStoreKey.hpp (rev 0) +++ trunk/stdair/stdair/bom/YieldStoreKey.hpp 2010-04-18 00:01:41 UTC (rev 174) @@ -0,0 +1,70 @@ +#ifndef __STDAIR_BOM_YIELDSTOREKEY_HPP +#define __STDAIR_BOM_YIELDSTOREKEY_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/STDAIR_Types.hpp> +#include <stdair/bom/BomKey.hpp> +#include <stdair/bom/BomRootKey.hpp> + +namespace stdair { + + /** Key of YieldStore. */ + struct YieldStoreKey_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 ////////// + YieldStoreKey_T () { }; + + public: + // /////////// Construction /////////// + /** Constructors. */ + YieldStoreKey_T (const AirlineCode_T& iAirlineCode); + YieldStoreKey_T (const YieldStoreKey_T&); + /** Destructor. */ + ~YieldStoreKey_T (); + + // /////////// Getters ////////// + /** Get the airline code. */ + const AirlineCode_T& getAirlineCode() const { + return _airlineCode; + } + + // /////////// 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. */ + 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. */ + AirlineCode_T _airlineCode; + }; + +} +#endif // __STDAIR_BOM_YIELDSTOREKEY_HPP Added: trunk/stdair/stdair/bom/YieldStoreTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/YieldStoreTypes.hpp (rev 0) +++ trunk/stdair/stdair/bom/YieldStoreTypes.hpp 2010-04-18 00:01:41 UTC (rev 174) @@ -0,0 +1,32 @@ +// ////////////////////////////////////////////////////////////////////// +#ifndef __STDAIR_BOM_YIELDSTORETYPES_HPP +#define __STDAIR_BOM_YIELDSTORETYPES_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// + +namespace stdair { + + // Forward declarations. + template <typename CONTENT> class Structure; + template <typename CONTENT> class BomChildrenHolderImp; + template <typename BOM> struct BomList_T; + template <typename BOM> struct BomMap_T; + class YieldStore; + + /** Define the BomRootStructure. */ + typedef Structure<YieldStore> YieldStoreStructure_T; + + /** Define the Inventory holder type. */ + typedef BomChildrenHolderImp<YieldStore> YieldStoreHolder_T; + + /** Define the Inventory list. */ + typedef BomList_T<YieldStore> YieldStoreList_T; + + /** Define the Inventory map. */ + typedef BomMap_T<YieldStore> YieldStoreMap_T; + +} +#endif // __STDAIR_BOM_YIELDSTORETYPES_HPP + Modified: trunk/stdair/stdair/bom/sources.mk =================================================================== --- trunk/stdair/stdair/bom/sources.mk 2010-04-09 15:31:37 UTC (rev 173) +++ trunk/stdair/stdair/bom/sources.mk 2010-04-18 00:01:41 UTC (rev 174) @@ -3,6 +3,7 @@ $(top_srcdir)/stdair/bom/BomMap.hpp \ $(top_srcdir)/stdair/bom/BomKey.hpp \ $(top_srcdir)/stdair/bom/BomRootKey.hpp \ + $(top_srcdir)/stdair/bom/YieldStoreKey.hpp \ $(top_srcdir)/stdair/bom/InventoryKey.hpp \ $(top_srcdir)/stdair/bom/FlightDateKey.hpp \ $(top_srcdir)/stdair/bom/LegDateKey.hpp \ @@ -98,6 +99,9 @@ $(top_srcdir)/stdair/bom/BomManager.hpp \ $(top_srcdir)/stdair/bom/Structure.hpp \ $(top_srcdir)/stdair/bom/BRTypes.hpp \ + $(top_srcdir)/stdair/bom/YieldStore.hpp \ + $(top_srcdir)/stdair/bom/YieldStoreTypes.hpp \ + $(top_srcdir)/stdair/bom/YieldStoreContent.hpp \ $(top_srcdir)/stdair/bom/IN.hpp \ $(top_srcdir)/stdair/bom/FD.hpp \ $(top_srcdir)/stdair/bom/FDTypes.hpp \ @@ -117,6 +121,7 @@ $(top_srcdir)/stdair/bom/NDTypes.hpp bom_cc_sources = \ $(top_srcdir)/stdair/bom/BomRootKey.cpp \ + $(top_srcdir)/stdair/bom/YieldStoreKey.cpp \ $(top_srcdir)/stdair/bom/InventoryKey.cpp \ $(top_srcdir)/stdair/bom/FlightDateKey.cpp \ $(top_srcdir)/stdair/bom/LegDateKey.cpp \ @@ -171,6 +176,8 @@ $(top_srcdir)/stdair/bom/EventStruct.cpp \ $(top_srcdir)/stdair/bom/EventQueue.cpp \ $(top_srcdir)/stdair/bom/BomManager.cpp \ + $(top_srcdir)/stdair/bom/YieldStore.cpp \ + $(top_srcdir)/stdair/bom/YieldStoreContent.cpp \ $(top_srcdir)/stdair/bom/BR.cpp \ $(top_srcdir)/stdair/bom/IN.cpp \ $(top_srcdir)/stdair/bom/FD.cpp \ Modified: trunk/stdair/stdair/command/CmdBomManager.cpp =================================================================== --- trunk/stdair/stdair/command/CmdBomManager.cpp 2010-04-09 15:31:37 UTC (rev 173) +++ trunk/stdair/stdair/command/CmdBomManager.cpp 2010-04-18 00:01:41 UTC (rev 174) @@ -6,6 +6,8 @@ // Boost #include <boost/make_shared.hpp> // StdAir +#include <stdair/bom/BR.hpp> +#include <stdair/bom/YieldStore.hpp> #include <stdair/bom/BomRoot.hpp> #include <stdair/bom/AirlineFeatureSet.hpp> #include <stdair/bom/AirlineFeature.hpp> @@ -79,7 +81,6 @@ if (lInventory_ptr == NULL) { const InventoryKey_T lInventoryKey (iAirlineCode); - // Instantiate an Inventory object with the given airline code lInventory_ptr = &createInventoryInternal (ioBomRoot, iAirlineCode); assert (lInventory_ptr != NULL); @@ -109,4 +110,40 @@ return *lInventory_ptr; } + // ////////////////////////////////////////////////////////////////////// + YieldStore& CmdBomManager:: + createYieldStoreInternal (BomRoot& ioBomRoot, + const AirlineCode_T& iAirlineCode) { + YieldStoreKey_T lYieldStoreKey (iAirlineCode); + + // Instantiate an YieldStore object with the given airline code + YieldStore& lYieldStore = + stdair::FacBomContent::instance().testCreate<YieldStore> (lYieldStoreKey); + + // TODO: migrate to the new StdAir structure (e.g., IN, FD, etc.) + // Link the created YieldStore with the bom root. + // FacBomContent::testLink<YieldStore> (lYieldStore, ioBomRoot); + + return lYieldStore; + } + + // ////////////////////////////////////////////////////////////////////// + YieldStore& CmdBomManager:: + getOrCreateYieldStore (BomRoot& ioBomRoot, + const AirlineCode_T& iAirlineCode) { + YieldStore* lYieldStore_ptr = ioBomRoot.getYieldStore (iAirlineCode); + + // If there is no YieldStore object for that airline already, create one + if (lYieldStore_ptr == NULL) { + const YieldStoreKey_T lYieldStoreKey (iAirlineCode); + + // Instantiate a YieldStore object with the given airline code + lYieldStore_ptr = &createYieldStoreInternal (ioBomRoot, iAirlineCode); + assert (lYieldStore_ptr != NULL); + } + assert (lYieldStore_ptr != NULL); + + return *lYieldStore_ptr; + } + } Modified: trunk/stdair/stdair/command/CmdBomManager.hpp =================================================================== --- trunk/stdair/stdair/command/CmdBomManager.hpp 2010-04-09 15:31:37 UTC (rev 173) +++ trunk/stdair/stdair/command/CmdBomManager.hpp 2010-04-18 00:01:41 UTC (rev 174) @@ -30,6 +30,18 @@ created . */ static Inventory& getOrCreateInventory (BomRoot&, const AirlineCode_T&); + /** If needed, create the YieldStore corresponding to the given airline code + (YieldStore key), link it to the BomRoot object and to the + associated AirlineFeature object, itself retrieved from the + AirlineFeatureSet object. + Otherwise, just retrieve the reference on the existing YieldStore object + corresponding to the given airline code. + <br>If not existing, a ObjectNotFoundException exception is thrown. + @param BomRoot& Root of the BOM tree. + @param const AirlineCode_T& Airline code for the YieldStore to be + created . */ + static YieldStore& getOrCreateYieldStore (BomRoot&, const AirlineCode_T&); + /** Initialise the AirlineFeatureSet object, and attach it to the BomRoot. @param BomRoot& Root of the BOM tree. */ static void initAirlineFeatureSet (BomRoot&); @@ -54,6 +66,14 @@ @param const AirlineCode_T& Airline code for the inventory to be created . */ static Inventory& createInventoryInternal (BomRoot&, const AirlineCode_T&); + + /** Create the YieldStore corresponding to the given airline code + (YieldStore key). + @param BomRoot& Root of the BOM tree. + @param const AirlineCode_T& Airline code for the YieldStore to be + created . */ + static YieldStore& createYieldStoreInternal (BomRoot&, + const AirlineCode_T&); }; } Modified: trunk/stdair/stdair/service/STDAIR_Service.cpp =================================================================== --- trunk/stdair/stdair/service/STDAIR_Service.cpp 2010-04-09 15:31:37 UTC (rev 173) +++ trunk/stdair/stdair/service/STDAIR_Service.cpp 2010-04-18 00:01:41 UTC (rev 174) @@ -9,6 +9,7 @@ #include <stdair/bom/BomRoot.hpp> #include <stdair/bom/Network.hpp> #include <stdair/bom/Inventory.hpp> +#include <stdair/bom/YieldStore.hpp> #include <stdair/factory/FacSupervisor.hpp> #include <stdair/factory/FacBomContent.hpp> #include <stdair/command/CmdBomManager.hpp> @@ -129,6 +130,19 @@ return *lInventory_ptr; } + // ////////////////////////////////////////////////////////////////////// + YieldStore& STDAIR_Service:: + getYieldStore (const AirlineCode_T& iAirlineCode) const { + + YieldStore* lYieldStore_ptr = _bomRoot.getYieldStore (iAirlineCode); + if (lYieldStore_ptr == NULL) { + throw ObjectNotFoundException(); + } + assert (lYieldStore_ptr != NULL); + + return *lYieldStore_ptr; + } + /** Note that the AirlineFeature is linked both to the Inventory and to the AirlineFeatureSet, which in turn is linked to the BomRoot. @@ -144,4 +158,13 @@ return oInventory; } + // ////////////////////////////////////////////////////////////////////// + YieldStore& STDAIR_Service:: + createYieldStore (const AirlineCode_T& iAirlineCode) const { + // Delegate to the dedicated command + YieldStore& oYieldStore = + CmdBomManager::getOrCreateYieldStore (_bomRoot, iAirlineCode); + return oYieldStore; + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2010-04-09 15:31:44
|
Revision: 173 http://stdair.svn.sourceforge.net/stdair/?rev=173&view=rev Author: quannaus Date: 2010-04-09 15:31:37 +0000 (Fri, 09 Apr 2010) Log Message: ----------- [Dev] Added some attributes for test. Modified Paths: -------------- trunk/stdair/stdair/bom/BookingClassContent.hpp trunk/stdair/stdair/bom/BucketContent.cpp trunk/stdair/stdair/bom/BucketContent.hpp trunk/stdair/stdair/bom/BucketKey.cpp trunk/stdair/stdair/bom/BucketKey.hpp trunk/stdair/stdair/bom/LegCabinContent.hpp trunk/stdair/stdair/bom/sources.mk Modified: trunk/stdair/stdair/bom/BookingClassContent.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassContent.hpp 2010-04-09 15:07:22 UTC (rev 172) +++ trunk/stdair/stdair/bom/BookingClassContent.hpp 2010-04-09 15:31:37 UTC (rev 173) @@ -248,6 +248,22 @@ /** Destructor. */ virtual ~BookingClassContent(); + public: + // for AIRINV Test + stdair::SubclassCode_T _subclassCode; + stdair::AuthorizationLevel_T _cumulatedProtection; + stdair::AuthorizationLevel_T _protection; + stdair::OverbookingRate_T _noShowPercentage; + stdair::OverbookingRate_T _overbookingPercentage; + stdair::NbOfBookings_T _groupNbOfBookings; + stdair::NbOfBookings_T _groupPendingNbOfBookings; + stdair::NbOfBookings_T _staffNbOfBookings; + stdair::NbOfBookings_T _wlNbOfBookings; + stdair::NbOfBookings_T _etb; + stdair::Availability_T _netClassAvailability; + stdair::Availability_T _segmentAvailability; + stdair::Availability_T _netRevenueAvailability; + protected: // Attributes /** The key of both structure and content objects. */ Modified: trunk/stdair/stdair/bom/BucketContent.cpp =================================================================== --- trunk/stdair/stdair/bom/BucketContent.cpp 2010-04-09 15:07:22 UTC (rev 172) +++ trunk/stdair/stdair/bom/BucketContent.cpp 2010-04-09 15:31:37 UTC (rev 173) @@ -12,46 +12,12 @@ // //////////////////////////////////////////////////////////////////// BucketContent::BucketContent (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) { + : _key (iKey) { } // //////////////////////////////////////////////////////////////////// BucketContent::~BucketContent () { } - // //////////////////////////////////////////////////////////////////// - void BucketContent::setRemainingDemandMean(NbOfBookings_T& iMean) { - _remainingDemandMean = iMean; - _remainingProductDemandMean = iMean; - } - - // //////////////////////////////////////////////////////////////////// - void BucketContent::setRemainingDemandSD(NbOfBookings_T& iSD) { - _remainingDemandSD = iSD; - _remainingProductDemandSD = iSD; - } - } Modified: trunk/stdair/stdair/bom/BucketContent.hpp =================================================================== --- trunk/stdair/stdair/bom/BucketContent.hpp 2010-04-09 15:07:22 UTC (rev 172) +++ trunk/stdair/stdair/bom/BucketContent.hpp 2010-04-09 15:31:37 UTC (rev 173) @@ -23,199 +23,8 @@ const BomKey_T& getKey() const { 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. */ @@ -245,83 +54,16 @@ /** Destructor. */ virtual ~BucketContent(); - protected: + public: // Attributes /** The key of both structure and content objects. */ BomKey_T _key; - - /** Number of current bookings in the booking. */ - NbOfBookings_T _nbOfBookings; + // test AIRINV + stdair::Yield_T _yieldRangeUpperValue; + stdair::CabinCapacity_T _availability; + stdair::NbOfSeats_T _nbOfSeats; + stdair::SeatIndex_T _seatIndex; - /** 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/BucketKey.cpp =================================================================== --- trunk/stdair/stdair/bom/BucketKey.cpp 2010-04-09 15:07:22 UTC (rev 172) +++ trunk/stdair/stdair/bom/BucketKey.cpp 2010-04-09 15:31:37 UTC (rev 173) @@ -7,8 +7,7 @@ namespace stdair { // //////////////////////////////////////////////////////////////////// - BucketKey_T::BucketKey_T (const ClassCode_T& iClassCode) - : _classCode (iClassCode) { + BucketKey_T::BucketKey_T () { } // //////////////////////////////////////////////////////////////////// @@ -27,7 +26,6 @@ // //////////////////////////////////////////////////////////////////// const std::string BucketKey_T::toString() const { std::ostringstream oStr; - oStr << _classCode; return oStr.str(); } Modified: trunk/stdair/stdair/bom/BucketKey.hpp =================================================================== --- trunk/stdair/stdair/bom/BucketKey.hpp 2010-04-09 15:07:22 UTC (rev 172) +++ trunk/stdair/stdair/bom/BucketKey.hpp 2010-04-09 15:31:37 UTC (rev 173) @@ -21,16 +21,11 @@ public: // /////////// Construction /////////// /** Constructor. */ - BucketKey_T (const ClassCode_T& iClassCode); + BucketKey_T (); /** Destructor. */ ~BucketKey_T (); - // /////////// Getters ////////// - /** Get the class code. */ - const ClassCode_T& getClassCode () const { - return _classCode; - } // /////////// Setters ///////////// void setParentKey (const ParentKey_T& iParentKey) { @@ -60,9 +55,6 @@ // Attributes /** Leg-cabin key.*/ ParentKey_T _parentKey; - - /** Cabin code. */ - ClassCode_T _classCode; }; } Modified: trunk/stdair/stdair/bom/LegCabinContent.hpp =================================================================== --- trunk/stdair/stdair/bom/LegCabinContent.hpp 2010-04-09 15:07:22 UTC (rev 172) +++ trunk/stdair/stdair/bom/LegCabinContent.hpp 2010-04-09 15:31:37 UTC (rev 173) @@ -120,6 +120,21 @@ /** Destructor. */ virtual ~LegCabinContent(); + public: + // Test AIRINV + stdair::CapacityAdjustment_T _adjustment; + stdair::CapacityAdjustment_T _dcsRegrade; + stdair::AuthorizationLevel_T _au; + stdair::UPR_T _upr; + stdair::NbOfBookings_T _nbOfBookings; + stdair::Availability_T _nav; + stdair::Availability_T _gav; + stdair::OverbookingRate_T _acp; + stdair::NbOfBookings_T _etb; + stdair::NbOfBookings_T _staffNbOfBookings; + stdair::NbOfBookings_T _wlNbOfBookings; + stdair::NbOfBookings_T _groupNbOfBookings; + protected: // Attributes /** The key of both structure and content objects. */ Modified: trunk/stdair/stdair/bom/sources.mk =================================================================== --- trunk/stdair/stdair/bom/sources.mk 2010-04-09 15:07:22 UTC (rev 172) +++ trunk/stdair/stdair/bom/sources.mk 2010-04-09 15:31:37 UTC (rev 173) @@ -125,7 +125,6 @@ $(top_srcdir)/stdair/bom/SegmentCabinKey.cpp \ $(top_srcdir)/stdair/bom/BookingClassKey.cpp \ $(top_srcdir)/stdair/bom/BucketKey.cpp \ - $(top_srcdir)/stdair/bom/BucketKey.cpp \ $(top_srcdir)/stdair/bom/NetworkKey.cpp \ $(top_srcdir)/stdair/bom/NetworkDateKey.cpp \ $(top_srcdir)/stdair/bom/AirportDateKey.cpp \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2010-04-09 15:07:29
|
Revision: 172 http://stdair.svn.sourceforge.net/stdair/?rev=172&view=rev Author: quannaus Date: 2010-04-09 15:07:22 +0000 (Fri, 09 Apr 2010) Log Message: ----------- [Dev] Added several inventory objects. Modified Paths: -------------- trunk/stdair/stdair/batches/stdair.cpp trunk/stdair/stdair/bom/BR.cpp trunk/stdair/stdair/bom/BR.hpp trunk/stdair/stdair/bom/BomMap.hpp trunk/stdair/stdair/bom/FD.cpp trunk/stdair/stdair/bom/FD.hpp trunk/stdair/stdair/bom/IN.cpp trunk/stdair/stdair/bom/IN.hpp trunk/stdair/stdair/bom/LegCabinKey.hpp trunk/stdair/stdair/bom/ND.cpp trunk/stdair/stdair/bom/ND.hpp trunk/stdair/stdair/bom/Structure.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/BC.cpp trunk/stdair/stdair/bom/BC.hpp trunk/stdair/stdair/bom/BCTypes.hpp trunk/stdair/stdair/bom/BK.cpp trunk/stdair/stdair/bom/BK.hpp trunk/stdair/stdair/bom/BKTypes.hpp trunk/stdair/stdair/bom/BucketContent.cpp trunk/stdair/stdair/bom/BucketContent.hpp trunk/stdair/stdair/bom/BucketKey.cpp trunk/stdair/stdair/bom/BucketKey.hpp trunk/stdair/stdair/bom/LC.cpp trunk/stdair/stdair/bom/LC.hpp trunk/stdair/stdair/bom/LCTypes.hpp trunk/stdair/stdair/bom/LD.cpp trunk/stdair/stdair/bom/LD.hpp trunk/stdair/stdair/bom/LDTypes.hpp trunk/stdair/stdair/bom/SC.cpp trunk/stdair/stdair/bom/SC.hpp trunk/stdair/stdair/bom/SCTypes.hpp trunk/stdair/stdair/bom/SD.cpp trunk/stdair/stdair/bom/SD.hpp trunk/stdair/stdair/bom/SDTypes.hpp Removed Paths: ------------- trunk/stdair/stdair/bom/BRKey.hpp trunk/stdair/stdair/bom/FDKey.hpp trunk/stdair/stdair/bom/INKey.hpp trunk/stdair/stdair/bom/NDKey.hpp Modified: trunk/stdair/stdair/batches/stdair.cpp =================================================================== --- trunk/stdair/stdair/batches/stdair.cpp 2010-04-08 12:00:36 UTC (rev 171) +++ trunk/stdair/stdair/batches/stdair.cpp 2010-04-09 15:07:22 UTC (rev 172) @@ -7,16 +7,15 @@ // StdAir #include <stdair/STDAIR_Types.hpp> #include <stdair/bom/BR.hpp> -#include <stdair/bom/BRKey.hpp> #include <stdair/bom/BRTypes.hpp> #include <stdair/bom/IN.hpp> -#include <stdair/bom/INKey.hpp> +#include <stdair/bom/InventoryKey.hpp> #include <stdair/bom/INTypes.hpp> #include <stdair/bom/FD.hpp> -#include <stdair/bom/FDKey.hpp> +#include <stdair/bom/FlightDateKey.hpp> #include <stdair/bom/FDTypes.hpp> #include <stdair/bom/ND.hpp> -#include <stdair/bom/NDKey.hpp> +#include <stdair/bom/NetworkDateKey.hpp> #include <stdair/bom/NDTypes.hpp> #include <stdair/bom/BomList.hpp> #include <stdair/factory/FacBomContent.hpp> @@ -25,21 +24,20 @@ // ///////// M A I N //////////// int main (int argc, char* argv[]) { try { - stdair::BRKey_T lBRKey; stdair::BR& lBR = - stdair::FacBomContent::instance().testCreate<stdair::BR> (lBRKey); + stdair::FacBomContent::instance().testCreate<stdair::BR> (); - stdair::INKey_T lINKey ("BA"); + stdair::InventoryKey_T lINKey ("BA"); stdair::IN& lIN = stdair::FacBomContent::instance().testCreate<stdair::IN> (lINKey); stdair::FacBomContent::testLink (lIN, lBR); - stdair::FDKey_T lFDKey (17); + stdair::FlightDateKey_T lFDKey (17, stdair::Date_T (2010, 02, 14)); stdair::FD& lFD = stdair::FacBomContent::instance().testCreate<stdair::FD> (lFDKey); stdair::FacBomContent::testLink (lFD, lIN); - stdair::NDKey_T lNDKey (1); + stdair::NetworkDateKey_T lNDKey (stdair::Date_T (2010, 02, 14)); stdair::ND& lND = stdair::FacBomContent::instance().testCreate<stdair::ND> (lNDKey); stdair::FacBomContent::testLink (lND, lIN); Copied: trunk/stdair/stdair/bom/BC.cpp (from rev 171, trunk/stdair/stdair/bom/FD.cpp) =================================================================== --- trunk/stdair/stdair/bom/BC.cpp (rev 0) +++ trunk/stdair/stdair/bom/BC.cpp 2010-04-09 15:07:22 UTC (rev 172) @@ -0,0 +1,21 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// STDAIR +#include <stdair/bom/Structure.hpp> +#include <stdair/bom/BC.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + BC::BC (const BomKey_T& iKey, BomStructure_T& ioBCStructure) + : BookingClassContent (iKey), _structure (ioBCStructure) { + } + + // //////////////////////////////////////////////////////////////////// + BC::~BC () { + } + +} Copied: trunk/stdair/stdair/bom/BC.hpp (from rev 171, trunk/stdair/stdair/bom/FD.hpp) =================================================================== --- trunk/stdair/stdair/bom/BC.hpp (rev 0) +++ trunk/stdair/stdair/bom/BC.hpp 2010-04-09 15:07:22 UTC (rev 172) @@ -0,0 +1,83 @@ +#ifndef __STDAIR_BOM_BC_HPP +#define __STDAIR_BOM_BC_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <iosfwd> +// BOOST Fusion +#include <boost/fusion/include/map.hpp> +// STDAIR +#include <stdair/bom/Structure.hpp> +#include <stdair/bom/BookingClassContent.hpp> +#include <stdair/bom/BCTypes.hpp> +#include <stdair/bom/BCTypes.hpp> + +namespace stdair { + // Forward declarations. + class SC; + + /** Class representing the actual functional/business content + for the Bom root. */ + class BC : public BookingClassContent { + friend class FacBomContent; + + public: + // ///////////////////////////////////////////////////////////////////////// + /** Definition allowing to retrieve the associated parent. */ + typedef SC Parent_T; + + /** Definition allowing to retrieve the associated BOM structure type. */ + typedef BCStructure_T BomStructure_T; + + /** Define the list of children holder types. */ + typedef boost::fusion::map< > ChildrenHolderTypeMap_T; + // ///////////////////////////////////////////////////////////////////////// + + private: + /** Retrieve the BOM structure object. */ + BomStructure_T& getStructure () { + return _structure; + } + + 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 _key.toString(); } + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + const std::string describeShortKey() const { return _key.toString(); } + + protected: + /** Constructors are private so as to force the usage of the Factory + layer. */ + /** Default constructors. */ + BC (); + BC (const BC&); + BC (const BomKey_T& iKey, BomStructure_T& ioStructure); + /** Destructor. */ + virtual ~BC(); + + private: + // Attributes + /** Reference structure. */ + BomStructure_T& _structure; + + }; + +} +#endif // __STDAIR_BOM_BC_HPP Copied: trunk/stdair/stdair/bom/BCTypes.hpp (from rev 169, trunk/stdair/stdair/bom/FDTypes.hpp) =================================================================== --- trunk/stdair/stdair/bom/BCTypes.hpp (rev 0) +++ trunk/stdair/stdair/bom/BCTypes.hpp 2010-04-09 15:07:22 UTC (rev 172) @@ -0,0 +1,31 @@ +// ////////////////////////////////////////////////////////////////////// +#ifndef __STDAIR_BOM_BCTYPES_HPP +#define __STDAIR_BOM_BCTYPES_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// + +namespace stdair { + // Forward declarations. + template <typename CONTENT> class Structure; + template <typename CONTENT> class BomChildrenHolderImp; + template <typename BOM> struct BomList_T; + template <typename BOM> struct BomMap_T; + class BC; + + /** Define the BomRootStructure. */ + typedef Structure<BC> BCStructure_T; + + /** Define the Inventory holder type. */ + typedef BomChildrenHolderImp<BC> BCHolder_T; + + /** Define the Inventory list. */ + typedef BomList_T<BC> BCList_T; + + /** Define the Inventory map. */ + typedef BomMap_T<BC> BCMap_T; + +} +#endif // __STDAIR_BOM_BCTYPES_HPP + Copied: trunk/stdair/stdair/bom/BK.cpp (from rev 171, trunk/stdair/stdair/bom/FD.cpp) =================================================================== --- trunk/stdair/stdair/bom/BK.cpp (rev 0) +++ trunk/stdair/stdair/bom/BK.cpp 2010-04-09 15:07:22 UTC (rev 172) @@ -0,0 +1,21 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// STDAIR +#include <stdair/bom/Structure.hpp> +#include <stdair/bom/BK.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + BK::BK (const BomKey_T& iKey, BomStructure_T& ioBKStructure) + : BucketContent (iKey), _structure (ioBKStructure) { + } + + // //////////////////////////////////////////////////////////////////// + BK::~BK () { + } + +} Copied: trunk/stdair/stdair/bom/BK.hpp (from rev 171, trunk/stdair/stdair/bom/FD.hpp) =================================================================== --- trunk/stdair/stdair/bom/BK.hpp (rev 0) +++ trunk/stdair/stdair/bom/BK.hpp 2010-04-09 15:07:22 UTC (rev 172) @@ -0,0 +1,83 @@ +#ifndef __STDAIR_BOM_BK_HPP +#define __STDAIR_BOM_BK_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <iosfwd> +// BOOST Fusion +#include <boost/fusion/include/map.hpp> +// STDAIR +#include <stdair/bom/Structure.hpp> +#include <stdair/bom/BucketContent.hpp> +#include <stdair/bom/BKTypes.hpp> +#include <stdair/bom/BKTypes.hpp> + +namespace stdair { + // Forward declarations. + class LC; + + /** Class representing the actual functional/business content + for the Bom root. */ + class BK : public BucketContent { + friend class FacBomContent; + + public: + // ///////////////////////////////////////////////////////////////////////// + /** Definition allowing to retrieve the associated parent. */ + typedef LC Parent_T; + + /** Definition allowing to retrieve the associated BOM structure type. */ + typedef BKStructure_T BomStructure_T; + + /** Define the list of children holder types. */ + typedef boost::fusion::map< > ChildrenHolderTypeMap_T; + // ///////////////////////////////////////////////////////////////////////// + + private: + /** Retrieve the BOM structure object. */ + BomStructure_T& getStructure () { + return _structure; + } + + 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 _key.toString(); } + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + const std::string describeShortKey() const { return _key.toString(); } + + protected: + /** Constructors are private so as to force the usage of the Factory + layer. */ + /** Default constructors. */ + BK (); + BK (const BK&); + BK (const BomKey_T& iKey, BomStructure_T& ioStructure); + /** Destructor. */ + virtual ~BK(); + + private: + // Attributes + /** Reference structure. */ + BomStructure_T& _structure; + + }; + +} +#endif // __STDAIR_BOM_BK_HPP Copied: trunk/stdair/stdair/bom/BKTypes.hpp (from rev 169, trunk/stdair/stdair/bom/FDTypes.hpp) =================================================================== --- trunk/stdair/stdair/bom/BKTypes.hpp (rev 0) +++ trunk/stdair/stdair/bom/BKTypes.hpp 2010-04-09 15:07:22 UTC (rev 172) @@ -0,0 +1,31 @@ +// ////////////////////////////////////////////////////////////////////// +#ifndef __STDAIR_BOM_BKTYPES_HPP +#define __STDAIR_BOM_BKTYPES_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// + +namespace stdair { + // Forward declarations. + template <typename CONTENT> class Structure; + template <typename CONTENT> class BomChildrenHolderImp; + template <typename BOM> struct BomList_T; + template <typename BOM> struct BomMap_T; + class BK; + + /** Define the BomRootStructure. */ + typedef Structure<BK> BKStructure_T; + + /** Define the Inventory holder type. */ + typedef BomChildrenHolderImp<BK> BKHolder_T; + + /** Define the Inventory list. */ + typedef BomList_T<BK> BKList_T; + + /** Define the Inventory map. */ + typedef BomMap_T<BK> BKMap_T; + +} +#endif // __STDAIR_BOM_BKTYPES_HPP + Modified: trunk/stdair/stdair/bom/BR.cpp =================================================================== --- trunk/stdair/stdair/bom/BR.cpp 2010-04-08 12:00:36 UTC (rev 171) +++ trunk/stdair/stdair/bom/BR.cpp 2010-04-09 15:07:22 UTC (rev 172) @@ -8,13 +8,13 @@ #include <stdair/bom/BR.hpp> #include <stdair/bom/IN.hpp> #include <stdair/bom/BomList.hpp> -#include <stdair/bom/Structure.hpp> +#include <stdair/bom/BomMap.hpp> namespace stdair { // //////////////////////////////////////////////////////////////////// - BR::BR (const Key_T& iKey, BomStructure_T& ioBRStructure) - : _key (iKey), _structure (ioBRStructure) { + BR::BR (const BomKey_T& iKey, BomStructure_T& ioBRStructure) + : BomRootContent (iKey), _structure (ioBRStructure) { } // //////////////////////////////////////////////////////////////////// @@ -26,4 +26,8 @@ return _structure.getChildrenHolder<IN>(); } + // //////////////////////////////////////////////////////////////////// + const INMap_T BR::getINMap () const { + return _structure.getChildrenHolder<IN>(); + } } Modified: trunk/stdair/stdair/bom/BR.hpp =================================================================== --- trunk/stdair/stdair/bom/BR.hpp 2010-04-08 12:00:36 UTC (rev 171) +++ trunk/stdair/stdair/bom/BR.hpp 2010-04-09 15:07:22 UTC (rev 172) @@ -9,19 +9,17 @@ // BOOST Fusion #include <boost/fusion/include/map.hpp> // STDAIR -#include <stdair/bom/BomContent.hpp> -#include <stdair/bom/BRKey.hpp> +#include <stdair/bom/BomRootContent.hpp> #include <stdair/bom/BRTypes.hpp> #include <stdair/bom/INTypes.hpp> namespace stdair { // Forward declarations. - class FacBomContent; class IN; /** Class representing the actual functional/business content for the Bom root. */ - class BR : public BomContent { + class BR : public BomRootContent { friend class FacBomContent; public: @@ -29,9 +27,6 @@ /** Definition allowing to retrieve the associated BOM structure type. */ typedef BRStructure_T BomStructure_T; - /** Definition allowing to retrieve the associated BOM key type. */ - typedef BRKey_T Key_T; - /** Define the list of children holder types. */ typedef boost::fusion::map< boost::fusion::pair<IN, INHolder_T*> > ChildrenHolderTypeMap_T; @@ -64,15 +59,9 @@ public: // /////////// Getters ///////////// - const Key_T& getKey () const { - return _key; - } - const INList_T getINList () const; + const INMap_T getINMap () const; - public: - // //////////// Setters ////////////// - private: /** Retrieve the BOM structure object. */ BomStructure_T& getStructure () { @@ -85,15 +74,12 @@ /** Default constructors. */ BR (); BR (const BR&); - BR (const Key_T& iKey, BomStructure_T& ioStructure); + BR (const BomKey_T& iKey, BomStructure_T& ioStructure); /** Destructor. */ virtual ~BR(); private: // Attributes - /** Key. */ - Key_T _key; - /** Reference structure. */ BomStructure_T& _structure; }; Deleted: trunk/stdair/stdair/bom/BRKey.hpp =================================================================== --- trunk/stdair/stdair/bom/BRKey.hpp 2010-04-08 12:00:36 UTC (rev 171) +++ trunk/stdair/stdair/bom/BRKey.hpp 2010-04-09 15:07:22 UTC (rev 172) @@ -1,30 +0,0 @@ -#ifndef __STDAIR_BOM_BRKEY_HPP -#define __STDAIR_BOM_BRKEY_HPP - -#include <sstream> - -namespace stdair { - struct BRKey_T { - - // /////////// Display support methods ///////// - void toStream (std::ostream& ioOut) const { - ioOut << "BRKey: " << toString() << std::endl; - } - - void fromStream (std::istream& ioIn) { - } - - const std::string toString() const { - std::ostringstream oStr; - oStr << " -- ROOT -- "; - return oStr.str(); - } - - const std::string describe() const { - return toString(); - } - - }; -} - -#endif // __STDAIR_BOM_BRKEY_HPP Modified: trunk/stdair/stdair/bom/BomMap.hpp =================================================================== --- trunk/stdair/stdair/bom/BomMap.hpp 2010-04-08 12:00:36 UTC (rev 171) +++ trunk/stdair/stdair/bom/BomMap.hpp 2010-04-09 15:07:22 UTC (rev 172) @@ -6,6 +6,8 @@ // ////////////////////////////////////////////////////////////////////// // STL #include <map> +// STDAIR +#include <stdair/basic/BasTypes.hpp> namespace stdair { @@ -30,8 +32,11 @@ // 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; + typedef BomIterator_T<BOM, + typename BomStructureMap_T::const_iterator> iterator; + typedef BomIterator_T<BOM, + typename BomStructureMap_T::const_reverse_iterator + > reverse_iterator; // ///////////////////////////////////////////////////////////////////////// public: Copied: trunk/stdair/stdair/bom/BucketContent.cpp (from rev 169, trunk/stdair/stdair/bom/BookingClassContent.cpp) =================================================================== --- trunk/stdair/stdair/bom/BucketContent.cpp (rev 0) +++ trunk/stdair/stdair/bom/BucketContent.cpp 2010-04-09 15:07:22 UTC (rev 172) @@ -0,0 +1,57 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// STDAIR +#include <stdair/basic/BasConst_BookingClass.hpp> +#include <stdair/basic/BasConst_Yield.hpp> +#include <stdair/bom/BucketContent.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + BucketContent::BucketContent (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) { + } + + // //////////////////////////////////////////////////////////////////// + BucketContent::~BucketContent () { + } + + // //////////////////////////////////////////////////////////////////// + void BucketContent::setRemainingDemandMean(NbOfBookings_T& iMean) { + _remainingDemandMean = iMean; + _remainingProductDemandMean = iMean; + } + + // //////////////////////////////////////////////////////////////////// + void BucketContent::setRemainingDemandSD(NbOfBookings_T& iSD) { + _remainingDemandSD = iSD; + _remainingProductDemandSD = iSD; + } + +} + Copied: trunk/stdair/stdair/bom/BucketContent.hpp (from rev 169, trunk/stdair/stdair/bom/BookingClassContent.hpp) =================================================================== --- trunk/stdair/stdair/bom/BucketContent.hpp (rev 0) +++ trunk/stdair/stdair/bom/BucketContent.hpp 2010-04-09 15:07:22 UTC (rev 172) @@ -0,0 +1,329 @@ +#ifndef __STDAIR_BOM_BUCKETCONTENT_HPP +#define __STDAIR_BOM_BUCKETCONTENT_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/BomContent.hpp> +#include <stdair/bom/BucketKey.hpp> + +namespace stdair { + + /** Class representing the actual attributes for an airline booking class. */ + class BucketContent : public BomContent { + public: + // Type definitions. + /** Definition allowing to retrieve the associated BOM key type. */ + typedef BucketKey_T BomKey_T; + + public: + // /////////// Getters //////////// + /** Get the booking class key. */ + const BomKey_T& getKey() const { + 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. */ + 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. */ + BucketContent (const BomKey_T&); + BucketContent (const BucketContent&); + + /** Destructor. */ + virtual ~BucketContent(); + + protected: + // 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; + + }; + +} +#endif // __STDAIR_BOM_BUCKETCONTENT_HPP + Copied: trunk/stdair/stdair/bom/BucketKey.cpp (from rev 169, trunk/stdair/stdair/bom/BookingClassKey.cpp) =================================================================== --- trunk/stdair/stdair/bom/BucketKey.cpp (rev 0) +++ trunk/stdair/stdair/bom/BucketKey.cpp 2010-04-09 15:07:22 UTC (rev 172) @@ -0,0 +1,41 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/BucketKey.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + BucketKey_T::BucketKey_T (const ClassCode_T& iClassCode) + : _classCode (iClassCode) { + } + + // //////////////////////////////////////////////////////////////////// + BucketKey_T::~BucketKey_T () { + } + + // //////////////////////////////////////////////////////////////////// + void BucketKey_T::toStream (std::ostream& ioOut) const { + ioOut << "BucketKey: " << toString() << std::endl; + } + + // //////////////////////////////////////////////////////////////////// + void BucketKey_T::fromStream (std::istream& ioIn) { + } + + // //////////////////////////////////////////////////////////////////// + const std::string BucketKey_T::toString() const { + std::ostringstream oStr; + oStr << _classCode; + return oStr.str(); + } + + // //////////////////////////////////////////////////////////////////// + const std::string BucketKey_T::describe() const { + std::ostringstream oStr; + oStr << _parentKey.describe() << ", " << toString(); + return oStr.str(); + } + +} Copied: trunk/stdair/stdair/bom/BucketKey.hpp (from rev 169, trunk/stdair/stdair/bom/BookingClassKey.hpp) =================================================================== --- trunk/stdair/stdair/bom/BucketKey.hpp (rev 0) +++ trunk/stdair/stdair/bom/BucketKey.hpp 2010-04-09 15:07:22 UTC (rev 172) @@ -0,0 +1,69 @@ +#ifndef __STDAIR_BOM_BUCKETKEY_HPP +#define __STDAIR_BOM_BUCKETKEY_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/STDAIR_Types.hpp> +#include <stdair/bom/BomKey.hpp> +#include <stdair/bom/LegCabinKey.hpp> + +namespace stdair { + /** Key of booking-class. */ + struct BucketKey_T : public BomKey_T { + + public: + // /////////// Typedefs //////////// + /** Definition allowing to retrieve the parent key type. */ + typedef LegCabinKey_T ParentKey_T; + + public: + // /////////// Construction /////////// + /** Constructor. */ + BucketKey_T (const ClassCode_T& iClassCode); + + /** Destructor. */ + ~BucketKey_T (); + + // /////////// Getters ////////// + /** Get the class code. */ + const ClassCode_T& getClassCode () const { + return _classCode; + } + + // /////////// 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. */ + 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-cabin. */ + const std::string toString() const; + + /** Display of the key. */ + const std::string describe() const; + + private: + // Attributes + /** Leg-cabin key.*/ + ParentKey_T _parentKey; + + /** Cabin code. */ + ClassCode_T _classCode; + }; + +} +#endif // __STDAIR_BOM_BUCKETKEY_HPP Modified: trunk/stdair/stdair/bom/FD.cpp =================================================================== --- trunk/stdair/stdair/bom/FD.cpp 2010-04-08 12:00:36 UTC (rev 171) +++ trunk/stdair/stdair/bom/FD.cpp 2010-04-09 15:07:22 UTC (rev 172) @@ -5,17 +5,42 @@ #include <cassert> // STDAIR #include <stdair/bom/Structure.hpp> +#include <stdair/bom/IN.hpp> #include <stdair/bom/FD.hpp> +#include <stdair/bom/LD.hpp> +#include <stdair/bom/SD.hpp> +#include <stdair/bom/BomList.hpp> +#include <stdair/bom/BomMap.hpp> namespace stdair { // //////////////////////////////////////////////////////////////////// - FD::FD (const Key_T& iKey, BomStructure_T& ioFDStructure) - : _key (iKey), _structure (ioFDStructure) { + FD::FD (const BomKey_T& iKey, BomStructure_T& ioFDStructure) + : FlightDateContent (iKey), _structure (ioFDStructure) { } // //////////////////////////////////////////////////////////////////// FD::~FD () { } + + // //////////////////////////////////////////////////////////////////// + const LDList_T FD::getLDList () const { + return _structure.getChildrenHolder<LD>(); + } + + // //////////////////////////////////////////////////////////////////// + const LDMap_T FD::getLDMap () const { + return _structure.getChildrenHolder<LD>(); + } + + // //////////////////////////////////////////////////////////////////// + const SDList_T FD::getSDList () const { + return _structure.getChildrenHolder<SD>(); + } + + // //////////////////////////////////////////////////////////////////// + const SDMap_T FD::getSDMap () const { + return _structure.getChildrenHolder<SD>(); + } } Modified: trunk/stdair/stdair/bom/FD.hpp =================================================================== --- trunk/stdair/stdair/bom/FD.hpp 2010-04-08 12:00:36 UTC (rev 171) +++ trunk/stdair/stdair/bom/FD.hpp 2010-04-09 15:07:22 UTC (rev 172) @@ -10,18 +10,20 @@ #include <boost/fusion/include/map.hpp> // STDAIR #include <stdair/bom/Structure.hpp> -#include <stdair/bom/BomContent.hpp> -#include <stdair/bom/FDKey.hpp> +#include <stdair/bom/FlightDateContent.hpp> #include <stdair/bom/FDTypes.hpp> +#include <stdair/bom/SDTypes.hpp> +#include <stdair/bom/LDTypes.hpp> namespace stdair { // Forward declarations. class IN; - class FacBomContent; + class SD; + class LD; /** Class representing the actual functional/business content for the Bom root. */ - class FD : public BomContent { + class FD : public FlightDateContent { friend class FacBomContent; public: @@ -31,15 +33,26 @@ /** Definition allowing to retrieve the associated BOM structure type. */ typedef FDStructure_T BomStructure_T; - - /** Definition allowing to retrieve the associated BOM key type. */ - typedef FDKey_T Key_T; /** Define the list of children holder types. */ - typedef boost::fusion::map< > ChildrenHolderTypeMap_T; + typedef boost::fusion::map< + boost::fusion::pair<SD, SDHolder_T*>, + boost::fusion::pair<LD, LDHolder_T*> > ChildrenHolderTypeMap_T; // ///////////////////////////////////////////////////////////////////////// + public: + // /////////// Getters ///////////// + const SDList_T getSDList () const; + const SDMap_T getSDMap () const; + const LDList_T getLDList () const; + const LDMap_T getLDMap () const; + private: + /** Retrieve the BOM structure object. */ + BomStructure_T& getStructure () { + return _structure; + } + public: // /////////// Display support methods ///////// /** Dump a Business Object into an output stream. @@ -55,43 +68,24 @@ /** Get a string describing the whole key (differentiating two objects at any level). */ - const std::string describeKey() const { return _key.describe(); } + 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.describe(); } + const std::string describeShortKey() const { return _key.toString(); } - - public: - // /////////// Getters ///////////// - const Key_T& getKey () const { - return _key; - } - - public: - // //////////// Setters ////////////// - - private: - /** Retrieve the BOM structure object. */ - BomStructure_T& getStructure () { - return _structure; - } - protected: /** Constructors are private so as to force the usage of the Factory layer. */ /** Default constructors. */ FD (); FD (const FD&); - FD (const Key_T& iKey, BomStructure_T& ioStructure); + FD (const BomKey_T& iKey, BomStructure_T& ioStructure); /** Destructor. */ virtual ~FD(); private: // Attributes - /** Key. */ - Key_T _key; - /** Reference structure. */ BomStructure_T& _structure; Deleted: trunk/stdair/stdair/bom/FDKey.hpp =================================================================== --- trunk/stdair/stdair/bom/FDKey.hpp 2010-04-08 12:00:36 UTC (rev 171) +++ trunk/stdair/stdair/bom/FDKey.hpp 2010-04-09 15:07:22 UTC (rev 172) @@ -1,50 +0,0 @@ -#ifndef __STDAIR_BOM_FDKEY_HPP -#define __STDAIR_BOM_FDKEY_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/STDAIR_Types.hpp> -#include <stdair/bom/BomKey.hpp> - - -namespace stdair { - struct FDKey_T : public BomKey_T { - - // /////////// Display support methods ///////// - void toStream (std::ostream& ioOut) const { - ioOut << "FDKey: " << toString() << std::endl; - } - - void fromStream (std::istream& ioIn) { - } - - const std::string toString() const { - std::ostringstream oStr; - oStr << _flightNumber; - return oStr.str(); - } - - const std::string describe() const { - return toString(); - } - - public: - // /////////// Construction /////////// - /** Constructors. */ - FDKey_T (const int& iFlightNumber) : _flightNumber (iFlightNumber) { } - FDKey_T (const FDKey_T& iKey) - : _flightNumber (iKey._flightNumber) { } - /** Destructor. */ - ~FDKey_T () { } - - private: - // Attributes - /** Flight number. */ - int _flightNumber; - - }; -} - -#endif // __STDAIR_BOM_FDKEY_HPP Modified: trunk/stdair/stdair/bom/IN.cpp =================================================================== --- trunk/stdair/stdair/bom/IN.cpp 2010-04-08 12:00:36 UTC (rev 171) +++ trunk/stdair/stdair/bom/IN.cpp 2010-04-09 15:07:22 UTC (rev 172) @@ -10,12 +10,13 @@ #include <stdair/bom/FD.hpp> #include <stdair/bom/ND.hpp> #include <stdair/bom/BomList.hpp> +#include <stdair/bom/BomMap.hpp> namespace stdair { // //////////////////////////////////////////////////////////////////// - IN::IN (const Key_T& iKey, BomStructure_T& ioINStructure) - : _key (iKey), _structure (ioINStructure) { + IN::IN (const BomKey_T& iKey, BomStructure_T& ioINStructure) + : InventoryContent (iKey), _structure (ioINStructure) { } // //////////////////////////////////////////////////////////////////// @@ -28,8 +29,18 @@ } // //////////////////////////////////////////////////////////////////// + const NDMap_T IN::getNDMap () const { + return _structure.getChildrenHolder<ND>(); + } + + // //////////////////////////////////////////////////////////////////// const FDList_T IN::getFDList () const { return _structure.getChildrenHolder<FD>(); } + + // //////////////////////////////////////////////////////////////////// + const FDMap_T IN::getFDMap () const { + return _structure.getChildrenHolder<FD>(); + } } Modified: trunk/stdair/stdair/bom/IN.hpp =================================================================== --- trunk/stdair/stdair/bom/IN.hpp 2010-04-08 12:00:36 UTC (rev 171) +++ trunk/stdair/stdair/bom/IN.hpp 2010-04-09 15:07:22 UTC (rev 172) @@ -9,8 +9,7 @@ // BOOST Fusion #include <boost/fusion/include/map.hpp> // STDAIR -#include <stdair/bom/BomContent.hpp> -#include <stdair/bom/INKey.hpp> +#include <stdair/bom/InventoryContent.hpp> #include <stdair/bom/INTypes.hpp> #include <stdair/bom/FDTypes.hpp> #include <stdair/bom/NDTypes.hpp> @@ -20,11 +19,10 @@ class BR; class FD; class ND; - class FacBomContent; /** Class representing the actual functional/business content for the Bom root. */ - class IN : public BomContent { + class IN : public InventoryContent { friend class FacBomContent; public: @@ -34,9 +32,6 @@ /** Definition allowing to retrieve the associated BOM structure type. */ typedef INStructure_T BomStructure_T; - - /** Definition allowing to retrieve the associated BOM key type. */ - typedef INKey_T Key_T; /** Define the list of children holder types. */ typedef boost::fusion::map< @@ -45,6 +40,19 @@ // ///////////////////////////////////////////////////////////////////////// public: + // /////////// Getters ///////////// + const FDList_T getFDList () const; + const FDMap_T getFDMap () const; + const NDList_T getNDList () const; + const NDMap_T getNDMap () const; + + private: + /** Retrieve the BOM structure object. */ + BomStructure_T& getStructure () { + return _structure; + } + + public: // /////////// Display support methods ///////// /** Dump a Business Object into an output stream. @param ostream& the output stream. */ @@ -59,47 +67,25 @@ /** Get a string describing the whole key (differentiating two objects at any level). */ - const std::string describeKey() const { return _key.describe(); } + 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.describe(); } + const std::string describeShortKey() const { return _key.toString(); } - public: - // /////////// Getters ///////////// - const Key_T& getKey () const { - return _key; - } - - const FDList_T getFDList () const; - - const NDList_T getNDList () const; - - public: - // //////////// Setters ////////////// - - private: - /** Retrieve the BOM structure object. */ - BomStructure_T& getStructure () { - return _structure; - } - protected: /** Constructors are private so as to force the usage of the Factory layer. */ /** Default constructors. */ IN (); IN (const IN&); - IN (const Key_T& iKey, BomStructure_T& ioStructure); + IN (const BomKey_T& iKey, BomStructure_T& ioStructure); /** Destructor. */ virtual ~IN(); private: // Attributes - /** Key. */ - Key_T _key; - /** Reference structure. */ BomStructure_T& _structure; Deleted: trunk/stdair/stdair/bom/INKey.hpp =================================================================== --- trunk/stdair/stdair/bom/INKey.hpp 2010-04-08 12:00:36 UTC (rev 171) +++ trunk/stdair/stdair/bom/INKey.hpp 2010-04-09 15:07:22 UTC (rev 172) @@ -1,50 +0,0 @@ -#ifndef __STDAIR_BOM_INKEY_HPP -#define __STDAIR_BOM_INKEY_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/STDAIR_Types.hpp> -#include <stdair/bom/BomKey.hpp> - - -namespace stdair { - struct INKey_T : public BomKey_T { - - // /////////// Display support methods ///////// - void toStream (std::ostream& ioOut) const { - ioOut << "INKey: " << toString() << std::endl; - } - - void fromStream (std::istream& ioIn) { - } - - const std::string toString() const { - std::ostringstream oStr; - oStr << _airlineCode; - return oStr.str(); - } - - const std::string describe() const { - return toString(); - } - - public: - // /////////// Construction /////////// - /** Constructors. */ - INKey_T (const AirlineCode_T& iAirlineCode) : _airlineCode (iAirlineCode) { } - INKey_T (const INKey_T& iKey) - : _airlineCode (iKey._airlineCode) { } - /** Destructor. */ - ~INKey_T () { } - - private: - // Attributes - /** Airline code. */ - AirlineCode_T _airlineCode; - - }; -} - -#endif // __STDAIR_BOM_INKEY_HPP Copied: trunk/stdair/stdair/bom/LC.cpp (from rev 171, trunk/stdair/stdair/bom/FD.cpp) =================================================================== --- trunk/stdair/stdair/bom/LC.cpp (rev 0) +++ trunk/stdair/stdair/bom/LC.cpp 2010-04-09 15:07:22 UTC (rev 172) @@ -0,0 +1,35 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// STDAIR +#include <stdair/bom/Structure.hpp> +#include <stdair/bom/LD.hpp> +#include <stdair/bom/LC.hpp> +#include <stdair/bom/BK.hpp> +#include <stdair/bom/BomList.hpp> +#include <stdair/bom/BomMap.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + LC::LC (const BomKey_T& iKey, BomStructure_T& ioLCStructure) + : LegCabinContent (iKey), _structure (ioLCStructure) { + } + + // //////////////////////////////////////////////////////////////////// + LC::~LC () { + } + + // //////////////////////////////////////////////////////////////////// + const BKList_T LC::getBKList () const { + return _structure.getChildrenHolder<BK>(); + } + + // //////////////////////////////////////////////////////////////////// + const BKMap_T LC::getBKMap () const { + return _structure.getChildrenHolder<BK>(); + } + +} Copied: trunk/stdair/stdair/bom/LC.hpp (from rev 171, trunk/stdair/stdair/bom/FD.hpp) =================================================================== --- trunk/stdair/stdair/bom/LC.hpp (rev 0) +++ trunk/stdair/stdair/bom/LC.hpp 2010-04-09 15:07:22 UTC (rev 172) @@ -0,0 +1,90 @@ +#ifndef __STDAIR_BOM_LC_HPP +#define __STDAIR_BOM_LC_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <iosfwd> +// BOOST Fusion +#include <boost/fusion/include/map.hpp> +// STDAIR +#include <stdair/bom/Structure.hpp> +#include <stdair/bom/LegCabinContent.hpp> +#include <stdair/bom/LCTypes.hpp> +#include <stdair/bom/BKTypes.hpp> + +namespace stdair { + // Forward declarations. + class LD; + class BK; + + /** Class representing the actual functional/business content + for the Bom root. */ + class LC : public LegCabinContent { + friend class FacBomContent; + + public: + // ///////////////////////////////////////////////////////////////////////// + /** Definition allowing to retrieve the associated parent. */ + typedef LD Parent_T; + + /** Definition allowing to retrieve the associated BOM structure type. */ + typedef LCStructure_T BomStructure_T; + + /** Define the list of children holder types. */ + typedef boost::fusion::map< + boost::fusion::pair<BK, BKHolder_T*> > ChildrenHolderTypeMap_T; + // ///////////////////////////////////////////////////////////////////////// + + public: + // /////////// Getters ///////////// + const BKList_T getBKList () const; + const BKMap_T getBKMap () const; + + private: + /** Retrieve the BOM structure object. */ + BomStructure_T& getStructure () { + return _structure; + } + + 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 _key.toString(); } + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + const std::string describeShortKey() const { return _key.toString(); } + + protected: + /** Constructors are private so as to force the usage of the Factory + layer. */ + /** Default constructors. */ + LC (); + LC (const LC&); + LC (const BomKey_T& iKey, BomStructure_T& ioStructure); + /** Destructor. */ + virtual ~LC(); + + private: + // Attributes + /** Reference structure. */ + BomStructure_T& _structure; + + }; + +} +#endif // __STDAIR_BOM_LC_HPP Copied: trunk/stdair/stdair/bom/LCTypes.hpp (from rev 169, trunk/stdair/stdair/bom/FDTypes.hpp) =================================================================== --- trunk/stdair/stdair/bom/LCTypes.hpp (rev 0) +++ trunk/stdair/stdair/bom/LCTypes.hpp 2010-04-09 15:07:22 UTC (rev 172) @@ -0,0 +1,31 @@ +// ////////////////////////////////////////////////////////////////////// +#ifndef __STDAIR_BOM_LCTYPES_HPP +#define __STDAIR_BOM_LCTYPES_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// + +namespace stdair { + // Forward declarations. + template <typename CONTENT> class Structure; + template <typename CONTENT> class BomChildrenHolderImp; + template <typename BOM> struct BomList_T; + template <typename BOM> struct BomMap_T; + class LC; + + /** Define the BomRootStructure. */ + typedef Structure<LC> LCStructure_T; + + /** Define the Inventory holder type. */ + typedef BomChildrenHolderImp<LC> LCHolder_T; + + /** Define the Inventory list. */ + typedef BomList_T<LC> LCList_T; + + /** Define the Inventory map. */ + typedef BomMap_T<LC> LCMap_T; + +} +#endif // __STDAIR_BOM_LCTYPES_HPP + Copied: trunk/stdair/stdair/bom/LD.cpp (from rev 171, trunk/stdair/stdair/bom/FD.cpp) =================================================================== --- trunk/stdair/stdair/bom/LD.cpp (rev 0) +++ trunk/stdair/stdair/bom/LD.cpp 2010-04-09 15:07:22 UTC (rev 172) @@ -0,0 +1,35 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// STDAIR +#include <stdair/bom/Structure.hpp> +#include <stdair/bom/FD.hpp> +#include <stdair/bom/LD.hpp> +#include <stdair/bom/LC.hpp> +#include <stdair/bom/BomList.hpp> +#include <stdair/bom/BomMap.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + LD::LD (const BomKey_T& iKey, BomStructure_T& ioLDStructure) + : LegDateContent (iKey), _structure (ioLDStructure) { + } + + // //////////////////////////////////////////////////////////////////// + LD::~LD () { + } + + // //////////////////////////////////////////////////////////////////// + const LCList_T LD::getLCList () const { + return _structure.getChildrenHolder<LC>(); + } + + // //////////////////////////////////////////////////////////////////// + const LCMap_T LD::getLCMap () const { + return _structure.getChildrenHolder<LC>(); + } + +} Copied: trunk/stdair/stdair/bom/LD.hpp (from rev 171, trunk/stdair/stdair/bom/FD.hpp) =================================================================== --- trunk/stdair/stdair/bom/LD.hpp (rev 0) +++ trunk/stdair/stdair/bom/LD.hpp 2010-04-09 15:07:22 UTC (rev 172) @@ -0,0 +1,90 @@ +#ifndef __STDAIR_BOM_LD_HPP +#define __STDAIR_BOM_LD_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <iosfwd> +// BOOST Fusion +#include <boost/fusion/include/map.hpp> +// STDAIR +#include <stdair/bom/Structure.hpp> +#include <stdair/bom/LegDateContent.hpp> +#include <stdair/bom/LDTypes.hpp> +#include <stdair/bom/LCTypes.hpp> + +namespace stdair { + // Forward declarations. + class FD; + class LC; + + /** Class representing the actual functional/business content + for the Bom root. */ + class LD : public LegDateContent { + friend class FacBomContent; + + public: + // ///////////////////////////////////////////////////////////////////////// + /** Definition allowing to retrieve the associated parent. */ + typedef FD Parent_T; + + /** Definition allowing to retrieve the associated BOM structure type. */ + typedef LDStructure_T BomStructure_T; + + /** Define the list of children holder types. */ + typedef boost::fusion::map< + boost::fusion::pair<LC, LCHolder_T*> > ChildrenHolderTypeMap_T; + // ///////////////////////////////////////////////////////////////////////// + + public: + // /////////// Getters ///////////// + const LCList_T getLCList () const; + const LCMap_T getLCMap () const; + + private: + /** Retrieve the BOM structure object. */ + BomStructure_T& getStructure () { + return _structure; + } + + 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 _key.toString(); } + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + const std::string describeShortKey() const { return _key.toString(); } + + protected: + /** Constructors are private so as to force the usage of the Factory + layer. */ + /** Default constructors. */ + LD (); + LD (const LD&); + LD (const BomKey_T& iKey, BomStructure_T& ioStructure); + /** Destructor. */ + virtual ~LD(); + + private: + // Attributes + /** Reference structure. */ + BomStructure_T& _structure; + + }; + +} +#endif // __STDAIR_BOM_LD_HPP Copied: trunk/stdair/stdair/bom/LDTypes.hpp (from rev 169, trunk/stdair/stdair/bom/FDTypes.hpp) =================================================================== --- trunk/stdair/stdair/bom/LDTypes.hpp (rev 0) +++ trunk/stdair/stdair/bom/LDTypes.hpp 2010-04-09 15:07:22 UTC (rev 172) @@ -0,0 +1,31 @@ +// ////////////////////////////////////////////////////////////////////// +#ifndef __STDAIR_BOM_LDTYPES_HPP +#define __STDAIR_BOM_LDTYPES_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// + +namespace stdair { + // Forward declarations. + template <typename CONTENT> class Structure; + template <typename CONTENT> class BomChildrenHolderImp; + template <typename BOM> struct BomList_T; + template <typename BOM> struct BomMap_T; + class LD; + + /** Define the BomRootStructure. */ + typedef Structure<LD> LDStructure... [truncated message content] |
From: <qua...@us...> - 2010-04-08 12:00:47
|
Revision: 171 http://stdair.svn.sourceforge.net/stdair/?rev=171&view=rev Author: quannaus Date: 2010-04-08 12:00:36 +0000 (Thu, 08 Apr 2010) Log Message: ----------- [Dev] Added the pointer of parent to the bom structure. Modified Paths: -------------- trunk/stdair/stdair/bom/BR.hpp trunk/stdair/stdair/bom/BRKey.hpp trunk/stdair/stdair/bom/FD.hpp trunk/stdair/stdair/bom/IN.hpp trunk/stdair/stdair/bom/ND.hpp trunk/stdair/stdair/bom/Structure.hpp trunk/stdair/stdair/bom/sources.mk trunk/stdair/stdair/factory/FacBomStructure.hpp Added Paths: ----------- trunk/stdair/stdair/bom/BR.cpp trunk/stdair/stdair/bom/FD.cpp trunk/stdair/stdair/bom/IN.cpp trunk/stdair/stdair/bom/ND.cpp Copied: trunk/stdair/stdair/bom/BR.cpp (from rev 169, trunk/stdair/stdair/bom/BomRoot.cpp) =================================================================== --- trunk/stdair/stdair/bom/BR.cpp (rev 0) +++ trunk/stdair/stdair/bom/BR.cpp 2010-04-08 12:00:36 UTC (rev 171) @@ -0,0 +1,29 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// STDAIR +#include <stdair/bom/Structure.hpp> +#include <stdair/bom/BR.hpp> +#include <stdair/bom/IN.hpp> +#include <stdair/bom/BomList.hpp> +#include <stdair/bom/Structure.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + BR::BR (const Key_T& iKey, BomStructure_T& ioBRStructure) + : _key (iKey), _structure (ioBRStructure) { + } + + // //////////////////////////////////////////////////////////////////// + BR::~BR () { + } + + // //////////////////////////////////////////////////////////////////// + const INList_T BR::getINList () const { + return _structure.getChildrenHolder<IN>(); + } + +} Modified: trunk/stdair/stdair/bom/BR.hpp =================================================================== --- trunk/stdair/stdair/bom/BR.hpp 2010-04-07 14:59:18 UTC (rev 170) +++ trunk/stdair/stdair/bom/BR.hpp 2010-04-08 12:00:36 UTC (rev 171) @@ -6,14 +6,13 @@ // ////////////////////////////////////////////////////////////////////// // STL #include <iosfwd> +// BOOST Fusion +#include <boost/fusion/include/map.hpp> // STDAIR -#include <stdair/bom/Structure.hpp> #include <stdair/bom/BomContent.hpp> #include <stdair/bom/BRKey.hpp> #include <stdair/bom/BRTypes.hpp> #include <stdair/bom/INTypes.hpp> -#include <stdair/bom/IN.hpp> -#include <stdair/bom/BomList.hpp> namespace stdair { // Forward declarations. @@ -36,6 +35,9 @@ /** Define the list of children holder types. */ typedef boost::fusion::map< boost::fusion::pair<IN, INHolder_T*> > ChildrenHolderTypeMap_T; + + /** Definition allowing to retrieve the parent type. */ + typedef BR Parent_T; // ///////////////////////////////////////////////////////////////////////// public: @@ -66,9 +68,7 @@ return _key; } - const INList_T getINList () const { - return _structure.getChildrenHolder<IN> (); - } + const INList_T getINList () const; public: // //////////// Setters ////////////// @@ -85,10 +85,9 @@ /** Default constructors. */ BR (); BR (const BR&); - BR (const Key_T& iKey, BomStructure_T& ioStructure) - : _key (iKey), _structure (ioStructure) { } + BR (const Key_T& iKey, BomStructure_T& ioStructure); /** Destructor. */ - virtual ~BR() { } + virtual ~BR(); private: // Attributes Modified: trunk/stdair/stdair/bom/BRKey.hpp =================================================================== --- trunk/stdair/stdair/bom/BRKey.hpp 2010-04-07 14:59:18 UTC (rev 170) +++ trunk/stdair/stdair/bom/BRKey.hpp 2010-04-08 12:00:36 UTC (rev 171) @@ -1,6 +1,8 @@ #ifndef __STDAIR_BOM_BRKEY_HPP #define __STDAIR_BOM_BRKEY_HPP +#include <sstream> + namespace stdair { struct BRKey_T { Copied: trunk/stdair/stdair/bom/FD.cpp (from rev 169, trunk/stdair/stdair/bom/BomRoot.cpp) =================================================================== --- trunk/stdair/stdair/bom/FD.cpp (rev 0) +++ trunk/stdair/stdair/bom/FD.cpp 2010-04-08 12:00:36 UTC (rev 171) @@ -0,0 +1,21 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// STDAIR +#include <stdair/bom/Structure.hpp> +#include <stdair/bom/FD.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + FD::FD (const Key_T& iKey, BomStructure_T& ioFDStructure) + : _key (iKey), _structure (ioFDStructure) { + } + + // //////////////////////////////////////////////////////////////////// + FD::~FD () { + } + +} Modified: trunk/stdair/stdair/bom/FD.hpp =================================================================== --- trunk/stdair/stdair/bom/FD.hpp 2010-04-07 14:59:18 UTC (rev 170) +++ trunk/stdair/stdair/bom/FD.hpp 2010-04-08 12:00:36 UTC (rev 171) @@ -6,6 +6,8 @@ // ////////////////////////////////////////////////////////////////////// // STL #include <iosfwd> +// BOOST Fusion +#include <boost/fusion/include/map.hpp> // STDAIR #include <stdair/bom/Structure.hpp> #include <stdair/bom/BomContent.hpp> @@ -81,10 +83,9 @@ /** Default constructors. */ FD (); FD (const FD&); - FD (const Key_T& iKey, BomStructure_T& ioStructure) - : _key (iKey), _structure (ioStructure) { } + FD (const Key_T& iKey, BomStructure_T& ioStructure); /** Destructor. */ - virtual ~FD() { } + virtual ~FD(); private: // Attributes Copied: trunk/stdair/stdair/bom/IN.cpp (from rev 169, trunk/stdair/stdair/bom/BomRoot.cpp) =================================================================== --- trunk/stdair/stdair/bom/IN.cpp (rev 0) +++ trunk/stdair/stdair/bom/IN.cpp 2010-04-08 12:00:36 UTC (rev 171) @@ -0,0 +1,35 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// STDAIR +#include <stdair/bom/Structure.hpp> +#include <stdair/bom/BR.hpp> +#include <stdair/bom/IN.hpp> +#include <stdair/bom/FD.hpp> +#include <stdair/bom/ND.hpp> +#include <stdair/bom/BomList.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + IN::IN (const Key_T& iKey, BomStructure_T& ioINStructure) + : _key (iKey), _structure (ioINStructure) { + } + + // //////////////////////////////////////////////////////////////////// + IN::~IN () { + } + + // //////////////////////////////////////////////////////////////////// + const NDList_T IN::getNDList () const { + return _structure.getChildrenHolder<ND>(); + } + + // //////////////////////////////////////////////////////////////////// + const FDList_T IN::getFDList () const { + return _structure.getChildrenHolder<FD>(); + } + +} Modified: trunk/stdair/stdair/bom/IN.hpp =================================================================== --- trunk/stdair/stdair/bom/IN.hpp 2010-04-07 14:59:18 UTC (rev 170) +++ trunk/stdair/stdair/bom/IN.hpp 2010-04-08 12:00:36 UTC (rev 171) @@ -6,20 +6,20 @@ // ////////////////////////////////////////////////////////////////////// // STL #include <iosfwd> +// BOOST Fusion +#include <boost/fusion/include/map.hpp> // STDAIR -#include <stdair/bom/Structure.hpp> #include <stdair/bom/BomContent.hpp> #include <stdair/bom/INKey.hpp> #include <stdair/bom/INTypes.hpp> #include <stdair/bom/FDTypes.hpp> #include <stdair/bom/NDTypes.hpp> -#include <stdair/bom/FD.hpp> -#include <stdair/bom/ND.hpp> -#include <stdair/bom/BomList.hpp> namespace stdair { // Forward declarations. class BR; + class FD; + class ND; class FacBomContent; /** Class representing the actual functional/business content @@ -72,13 +72,9 @@ return _key; } - const FDList_T getFDList () const { - return _structure.getChildrenHolder<FD> (); - } + const FDList_T getFDList () const; - const NDList_T getNDList () const { - return _structure.getChildrenHolder<ND> (); - } + const NDList_T getNDList () const; public: // //////////// Setters ////////////// @@ -95,10 +91,9 @@ /** Default constructors. */ IN (); IN (const IN&); - IN (const Key_T& iKey, BomStructure_T& ioStructure) - : _key (iKey), _structure (ioStructure) { } + IN (const Key_T& iKey, BomStructure_T& ioStructure); /** Destructor. */ - virtual ~IN() { } + virtual ~IN(); private: // Attributes Copied: trunk/stdair/stdair/bom/ND.cpp (from rev 169, trunk/stdair/stdair/bom/BomRoot.cpp) =================================================================== --- trunk/stdair/stdair/bom/ND.cpp (rev 0) +++ trunk/stdair/stdair/bom/ND.cpp 2010-04-08 12:00:36 UTC (rev 171) @@ -0,0 +1,21 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// STDAIR +#include <stdair/bom/Structure.hpp> +#include <stdair/bom/ND.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + ND::ND (const Key_T& iKey, BomStructure_T& ioNDStructure) + : _key (iKey), _structure (ioNDStructure) { + } + + // //////////////////////////////////////////////////////////////////// + ND::~ND () { + } + +} Modified: trunk/stdair/stdair/bom/ND.hpp =================================================================== --- trunk/stdair/stdair/bom/ND.hpp 2010-04-07 14:59:18 UTC (rev 170) +++ trunk/stdair/stdair/bom/ND.hpp 2010-04-08 12:00:36 UTC (rev 171) @@ -6,6 +6,8 @@ // ////////////////////////////////////////////////////////////////////// // STL #include <iosfwd> +// BOOST Fusion +#include <boost/fusion/include/map.hpp> // STDAIR #include <stdair/bom/Structure.hpp> #include <stdair/bom/BomContent.hpp> @@ -81,10 +83,9 @@ /** Default constructors. */ ND (); ND (const ND&); - ND (const Key_T& iKey, BomStructure_T& ioStructure) - : _key (iKey), _structure (ioStructure) { } + ND (const Key_T& iKey, BomStructure_T& ioStructure); /** Destructor. */ - virtual ~ND() { } + virtual ~ND(); private: // Attributes Modified: trunk/stdair/stdair/bom/Structure.hpp =================================================================== --- trunk/stdair/stdair/bom/Structure.hpp 2010-04-07 14:59:18 UTC (rev 170) +++ trunk/stdair/stdair/bom/Structure.hpp 2010-04-08 12:00:36 UTC (rev 171) @@ -6,8 +6,8 @@ // ////////////////////////////////////////////////////////////////////// // STL #include <cassert> +#include <iostream> // BOOST Fusion -#include <boost/fusion/container/map.hpp> #include <boost/fusion/include/map.hpp> #include <boost/fusion/sequence/intrinsic/at_key.hpp> // STDAIR @@ -31,11 +31,14 @@ typedef CONTENT Content_T; /** Definition allowing to retrieve the associated key type. */ - typedef typename CONTENT::Key_T Key_T; + typedef typename Content_T::Key_T Key_T; /** Definition allowing to retrieve the map of children holder type. */ - typedef typename CONTENT::ChildrenHolderTypeMap_T ChildrenHolderTypeMap_T; + typedef typename Content_T::ChildrenHolderTypeMap_T ChildrenHolderTypeMap_T; + /** Definition allowing to retrieve the parent structure type. */ + typedef typename Content_T::Parent_T::BomStructure_T Parent_T; + public: // ////////// GETTERS //////////// const Key_T& getKey () const { @@ -79,7 +82,7 @@ /** Constructors are private so as to force the usage of the Factory layer. */ /** Default constructors. */ - Structure () : _content (NULL) { }; + Structure () : _parent (NULL), _content (NULL) { }; Structure (const Structure&); /** Destructor. */ @@ -87,8 +90,11 @@ private: // Attributes + /** The parent structure. */ + Parent_T* _parent; + /** The actual functional (Business Object) content. */ - CONTENT* _content; + Content_T* _content; /** The map of children holders. */ ChildrenHolderTypeMap_T _holderMap; Modified: trunk/stdair/stdair/bom/sources.mk =================================================================== --- trunk/stdair/stdair/bom/sources.mk 2010-04-07 14:59:18 UTC (rev 170) +++ trunk/stdair/stdair/bom/sources.mk 2010-04-08 12:00:36 UTC (rev 171) @@ -157,4 +157,8 @@ $(top_srcdir)/stdair/bom/DemandStream.cpp \ $(top_srcdir)/stdair/bom/EventStruct.cpp \ $(top_srcdir)/stdair/bom/EventQueue.cpp \ - $(top_srcdir)/stdair/bom/BomManager.cpp + $(top_srcdir)/stdair/bom/BomManager.cpp \ + $(top_srcdir)/stdair/bom/BR.cpp \ + $(top_srcdir)/stdair/bom/IN.cpp \ + $(top_srcdir)/stdair/bom/FD.cpp \ + $(top_srcdir)/stdair/bom/ND.cpp Modified: trunk/stdair/stdair/factory/FacBomStructure.hpp =================================================================== --- trunk/stdair/stdair/factory/FacBomStructure.hpp 2010-04-07 14:59:18 UTC (rev 170) +++ trunk/stdair/stdair/factory/FacBomStructure.hpp 2010-04-08 12:00:36 UTC (rev 171) @@ -92,6 +92,8 @@ static bool testLinkParentWithChild (typename STRUCTURE_CHILD::Content_T::Parent_T::BomStructure_T& ioParent, STRUCTURE_CHILD& ioChild) { + ioChild._parent = &ioParent; + typedef typename STRUCTURE_CHILD::Content_T CHILD_CONTENT_T; // Retrive the bom children holder corresponding the the children type. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |