From: <qua...@us...> - 2009-11-05 10:54:17
|
Revision: 60 http://stdair.svn.sourceforge.net/stdair/?rev=60&view=rev Author: quannaus Date: 2009-11-05 10:54:06 +0000 (Thu, 05 Nov 2009) Log Message: ----------- [Dev] Replaced the list and map structure with templates. Modified Paths: -------------- trunk/stdair/stdair/bom/AirlineFeature.hpp trunk/stdair/stdair/bom/AirlineFeatureSet.cpp trunk/stdair/stdair/bom/AirlineFeatureSet.hpp trunk/stdair/stdair/bom/AirlineFeatureTypes.hpp trunk/stdair/stdair/bom/BomRoot.cpp trunk/stdair/stdair/bom/BomRoot.hpp trunk/stdair/stdair/bom/BookingClass.hpp trunk/stdair/stdair/bom/BookingClassTypes.hpp trunk/stdair/stdair/bom/FlightDate.cpp trunk/stdair/stdair/bom/FlightDate.hpp trunk/stdair/stdair/bom/FlightDateTypes.hpp trunk/stdair/stdair/bom/Inventory.cpp trunk/stdair/stdair/bom/Inventory.hpp trunk/stdair/stdair/bom/InventoryStructure.hpp trunk/stdair/stdair/bom/InventoryTypes.hpp trunk/stdair/stdair/bom/LegCabin.hpp trunk/stdair/stdair/bom/LegCabinTypes.hpp trunk/stdair/stdair/bom/LegDate.cpp trunk/stdair/stdair/bom/LegDate.hpp trunk/stdair/stdair/bom/LegDateTypes.hpp trunk/stdair/stdair/bom/SegmentCabin.cpp trunk/stdair/stdair/bom/SegmentCabin.hpp trunk/stdair/stdair/bom/SegmentCabinTypes.hpp trunk/stdair/stdair/bom/SegmentDate.cpp trunk/stdair/stdair/bom/SegmentDate.hpp trunk/stdair/stdair/bom/SegmentDateTypes.hpp trunk/stdair/stdair/bom/sources.mk Added Paths: ----------- trunk/stdair/stdair/bom/BomList.hpp trunk/stdair/stdair/bom/BomMap.hpp Removed Paths: ------------- trunk/stdair/stdair/bom/AirlineFeatureList.cpp trunk/stdair/stdair/bom/AirlineFeatureList.hpp trunk/stdair/stdair/bom/AirlineFeatureMap.cpp trunk/stdair/stdair/bom/AirlineFeatureMap.hpp trunk/stdair/stdair/bom/BookingClassList.cpp trunk/stdair/stdair/bom/BookingClassList.hpp trunk/stdair/stdair/bom/BookingClassMap.cpp trunk/stdair/stdair/bom/BookingClassMap.hpp trunk/stdair/stdair/bom/FlightDateList.cpp trunk/stdair/stdair/bom/FlightDateList.hpp trunk/stdair/stdair/bom/FlightDateMap.cpp trunk/stdair/stdair/bom/FlightDateMap.hpp trunk/stdair/stdair/bom/InventoryList.cpp trunk/stdair/stdair/bom/InventoryList.hpp trunk/stdair/stdair/bom/InventoryMap.cpp trunk/stdair/stdair/bom/InventoryMap.hpp trunk/stdair/stdair/bom/LegCabinList.cpp trunk/stdair/stdair/bom/LegCabinList.hpp trunk/stdair/stdair/bom/LegCabinMap.cpp trunk/stdair/stdair/bom/LegCabinMap.hpp trunk/stdair/stdair/bom/LegDateList.cpp trunk/stdair/stdair/bom/LegDateList.hpp trunk/stdair/stdair/bom/LegDateMap.cpp trunk/stdair/stdair/bom/LegDateMap.hpp trunk/stdair/stdair/bom/SegmentCabinList.cpp trunk/stdair/stdair/bom/SegmentCabinList.hpp trunk/stdair/stdair/bom/SegmentCabinMap.cpp trunk/stdair/stdair/bom/SegmentCabinMap.hpp trunk/stdair/stdair/bom/SegmentDateList.cpp trunk/stdair/stdair/bom/SegmentDateList.hpp trunk/stdair/stdair/bom/SegmentDateMap.cpp trunk/stdair/stdair/bom/SegmentDateMap.hpp Modified: trunk/stdair/stdair/bom/AirlineFeature.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeature.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/AirlineFeature.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -15,8 +15,6 @@ // Forward declarations class FacBomContent; struct AirlineFeatureKey_T; - struct AirlineFeatureList_T; - struct AirlineFeatureMap_T; /** Class representing the actual functional/business content for a segment-cabin. */ Deleted: trunk/stdair/stdair/bom/AirlineFeatureList.cpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureList.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/AirlineFeatureList.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,50 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <cassert> -// STDAIR -#include <stdair/bom/BomChildrenHolderImp.hpp> -#include <stdair/bom/AirlineFeature.hpp> -#include <stdair/bom/AirlineFeatureList.hpp> - -namespace stdair { - - // //////////////////////////////////////////////////////////////////// - AirlineFeatureList_T:: - AirlineFeatureList_T (const AirlineFeatureHolder_T& iAirlineFeatureHolder) - : _airlineFeatureHolder (iAirlineFeatureHolder) { - } - - // //////////////////////////////////////////////////////////////////// - AirlineFeatureList_T:: - AirlineFeatureList_T (const AirlineFeatureList_T& iAFList) - : _airlineFeatureHolder (iAFList._airlineFeatureHolder) { - } - - // //////////////////////////////////////////////////////////////////// - AirlineFeatureList_T::~AirlineFeatureList_T () { - } - - // ////////////////////////////////////////////////////////////////////// - AirlineFeatureList_T::iterator AirlineFeatureList_T::begin () const { - return _airlineFeatureHolder.listBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - AirlineFeatureList_T::iterator AirlineFeatureList_T::end () const { - return _airlineFeatureHolder.listEnd (); - } - - // ////////////////////////////////////////////////////////////////////// - AirlineFeatureList_T::reverse_iterator AirlineFeatureList_T::rbegin () const { - return _airlineFeatureHolder.listRBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - AirlineFeatureList_T::reverse_iterator AirlineFeatureList_T::rend () const { - return _airlineFeatureHolder.listREnd (); - } - -} - Deleted: trunk/stdair/stdair/bom/AirlineFeatureList.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureList.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/AirlineFeatureList.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,70 +0,0 @@ -#ifndef __STDAIR_BOM_AIRLINEFEATURELIST_HPP -#define __STDAIR_BOM_AIRLINEFEATURELIST_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/bom/AirlineFeatureTypes.hpp> - -namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - template <typename BOM_STRUCTURE> class BomChildrenHolderImp; - class AirlineFeature; - - /** Structure which handles the iterators for a booking class list. */ - struct AirlineFeatureList_T { - - public: - // ///////////////////////////////////////////////////////////////////////// - // See the explanations, within the stdair::BomContentRoot class, for all - // the iterator types specified below - // ///////////////////////////////////////////////////////////////////////// - /** Define the booking class list iterators. */ - typedef BomIterator_T<AirlineFeature, - AirlineFeatureStructureList_T::const_iterator> iterator; - typedef BomIterator_T<AirlineFeature, - AirlineFeatureStructureList_T::const_reverse_iterator> reverse_iterator; - // ///////////////////////////////////////////////////////////////////////// - - /** Define the booking class holder. */ - typedef BomChildrenHolderImp<AirlineFeature> AirlineFeatureHolder_T; - - public: - // /////////// Iteration methods ////////// - /** Initialise the internal iterator on flight date: - return the iterator at the begining of the list. */ - iterator begin () const; - - /** Initialise the internal iterator on flight date: - return the iterator at the end of the list. */ - iterator end () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the rbegining of the list. */ - reverse_iterator rbegin () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the end of the list. */ - reverse_iterator rend () const; - - public: - /** Default constructors. */ - AirlineFeatureList_T (); - AirlineFeatureList_T (const AirlineFeatureList_T&); - AirlineFeatureList_T (const AirlineFeatureHolder_T&); - - /** Destructor. */ - virtual ~AirlineFeatureList_T(); - - private: - // Attributes - /** Reference structure. */ - const AirlineFeatureHolder_T& _airlineFeatureHolder; - }; - -} -#endif // __STDAIR_BOM_AIRLINEFEATURELIST_HPP - Deleted: trunk/stdair/stdair/bom/AirlineFeatureMap.cpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureMap.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/AirlineFeatureMap.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,56 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <cassert> -// STDAIR -#include <stdair/bom/BomChildrenHolderImp.hpp> -#include <stdair/bom/AirlineFeature.hpp> -#include <stdair/bom/AirlineFeatureMap.hpp> - -namespace stdair { - - // //////////////////////////////////////////////////////////////////// - AirlineFeatureMap_T:: - AirlineFeatureMap_T (const AirlineFeatureHolder_T& iAirlineFeatureHolder) - : _airlineFeatureHolder (iAirlineFeatureHolder) { - } - - // //////////////////////////////////////////////////////////////////// - AirlineFeatureMap_T:: - AirlineFeatureMap_T (const AirlineFeatureMap_T& iAFMap) - : _airlineFeatureHolder (iAFMap._airlineFeatureHolder) { - } - - // //////////////////////////////////////////////////////////////////// - AirlineFeatureMap_T::~AirlineFeatureMap_T () { - } - - // ////////////////////////////////////////////////////////////////////// - AirlineFeatureMap_T::iterator AirlineFeatureMap_T::begin () const { - return _airlineFeatureHolder.mapBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - AirlineFeatureMap_T::iterator AirlineFeatureMap_T::end () const { - return _airlineFeatureHolder.mapEnd (); - } - - // ////////////////////////////////////////////////////////////////////// - AirlineFeatureMap_T::reverse_iterator AirlineFeatureMap_T::rbegin () const { - return _airlineFeatureHolder.mapRBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - AirlineFeatureMap_T::reverse_iterator AirlineFeatureMap_T::rend () const { - return _airlineFeatureHolder.mapREnd (); - } - - // ////////////////////////////////////////////////////////////////////// - AirlineFeatureMap_T:: - iterator AirlineFeatureMap_T::find (const MapKey_T& iKey) const { - return _airlineFeatureHolder.find (iKey); - } - -} - Deleted: trunk/stdair/stdair/bom/AirlineFeatureMap.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureMap.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/AirlineFeatureMap.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,74 +0,0 @@ -#ifndef __STDAIR_BOM_AIRLINEFEATUREMAP_HPP -#define __STDAIR_BOM_AIRLINEFEATUREMAP_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/bom/AirlineFeatureTypes.hpp> - -namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - template <typename BOM_STRUCTURE> class BomChildrenHolderImp; - class AirlineFeature; - - /** Structure which handles the iterators for a booking class map. */ - struct AirlineFeatureMap_T { - - public: - // ///////////////////////////////////////////////////////////////////////// - // See the explanations, within the stdair::BomRoot class, for all - // the iterator types specified below - // ///////////////////////////////////////////////////////////////////////// - /** Define the booking class map iterators. */ - typedef BomIterator_T<AirlineFeature, - AirlineFeatureStructureMap_T::const_iterator> iterator; - typedef BomIterator_T<AirlineFeature, - AirlineFeatureStructureMap_T::const_reverse_iterator> reverse_iterator; - // ///////////////////////////////////////////////////////////////////////// - - /** Define the booking class holder. */ - typedef BomChildrenHolderImp<AirlineFeature> AirlineFeatureHolder_T; - - public: - // /////////// Iteration methods ////////// - /** Initialise the internal iterator on flight date: - return the iterator at the begining of the map. */ - iterator begin () const; - - /** Initialise the internal iterator on flight date: - return the iterator at the end of the map. */ - iterator end () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the rbegining of the map. */ - reverse_iterator rbegin () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the end of the map. */ - reverse_iterator rend () const; - - /** Retrieve, if existing, the AirlineFeature corresponding to the - given key. */ - iterator find (const MapKey_T&) const; - - public: - /** Default constructors. */ - AirlineFeatureMap_T (); - AirlineFeatureMap_T (const AirlineFeatureMap_T&); - AirlineFeatureMap_T (const AirlineFeatureHolder_T&); - - /** Destructor. */ - virtual ~AirlineFeatureMap_T(); - - private: - // Attributes - /** Reference structure. */ - const AirlineFeatureHolder_T& _airlineFeatureHolder; - }; - -} -#endif // __STDAIR_BOM_AIRLINEFEATUREMAP_HPP - Modified: trunk/stdair/stdair/bom/AirlineFeatureSet.cpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureSet.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/AirlineFeatureSet.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -7,8 +7,8 @@ #include <stdair/bom/AirlineFeatureSetStructure.hpp> #include <stdair/bom/AirlineFeatureSet.hpp> #include <stdair/bom/AirlineFeature.hpp> -#include <stdair/bom/AirlineFeatureList.hpp> -#include <stdair/bom/AirlineFeatureMap.hpp> +#include <stdair/bom/BomList.hpp> +#include <stdair/bom/BomMap.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/AirlineFeatureSet.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureSet.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/AirlineFeatureSet.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -15,8 +15,6 @@ class FacBomContent; class AirlineFeature; struct AirlineFeatureSetKey_T; - struct AirlineFeatureList_T; - struct AirlineFeatureMap_T; /** Class representing the actual functional/business content for the Bom root. */ Modified: trunk/stdair/stdair/bom/AirlineFeatureTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureTypes.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/AirlineFeatureTypes.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -13,17 +13,25 @@ // Forward declarations. template <typename BOM_CONTENT> class AirlineFeatureStructure; + template <typename BOM> struct BomList_T; + template <typename BOM> struct BomMap_T; class AirlineFeature; - /** Define the AirlineFeature structure. */ + /** Define the airline feature structure. */ typedef AirlineFeatureStructure<AirlineFeature> AirlineFeatureStructure_T; - /** Define the segment-cabin structure list. */ + /** Define the airline feature structure list. */ typedef std::vector<AirlineFeatureStructure_T*> AirlineFeatureStructureList_T; - /** Define the segment-cabin structure map. */ + /** Define the airline feature structure map. */ typedef std::map<const std::string, AirlineFeatureStructure_T*> AirlineFeatureStructureMap_T; + /** Define the airline feature list. */ + typedef BomList_T<AirlineFeature> AirlineFeatureList_T; + + /** Define the airline feature map. */ + typedef BomMap_T<AirlineFeature> AirlineFeatureMap_T; + } #endif // __STDAIR_BOM_AIRLINEFEATURETYPES_HPP Copied: trunk/stdair/stdair/bom/BomList.hpp (from rev 58, trunk/stdair/stdair/bom/InventoryList.hpp) =================================================================== --- trunk/stdair/stdair/bom/BomList.hpp (rev 0) +++ trunk/stdair/stdair/bom/BomList.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -0,0 +1,70 @@ +#ifndef __STDAIR_BOM_BOMLIST_HPP +#define __STDAIR_BOM_BOMLIST_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// + +namespace stdair { + + // Forward declarations + template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; + template <typename BOM_CONTENT> class BomChildrenHolderImp; + + /** Structure which handles the iterators for a bom list. */ + template <typename BOM> struct BomList_T { + + public: + /** Definition that allows to retrieve the corresponding BomStructure + associated to the BOM. */ + typedef typename BOM::BomStructure_T BomStructure_T; + /** Define the list of bom objects. */ + typedef std::vector<BomStructure_T*> BomStructureList_T; + /** Define the bom holder. */ + typedef BomChildrenHolderImp<BOM> BomHolder_T; + + // ///////////////////////////////////////////////////////////////////////// + // See the explanations, within the stdair::BomContentRoot class, for all + // the iterator types specified below + // ///////////////////////////////////////////////////////////////////////// + /** Define the bom list iterators. */ + typedef BomIterator_T<BOM, typename BomStructureList_T::const_iterator> iterator; + typedef BomIterator_T<BOM, typename BomStructureList_T::const_reverse_iterator> reverse_iterator; + // ///////////////////////////////////////////////////////////////////////// + + public: + // /////////// Iteration methods ////////// + /** Initialise the internal iterator on flight date: + return the iterator at the begining of the list. */ + iterator begin () const { return _bomHolder.listBegin(); } + + /** Initialise the internal iterator on flight date: + return the iterator at the end of the list. */ + iterator end () const { return _bomHolder.listEnd(); } + + /** Initialise the internal reverse iterator on flight date: + return the reverse iterator at the rbegining of the list. */ + reverse_iterator rbegin () const { return _bomHolder.listRBegin(); } + + /** Initialise the internal reverse iterator on flight date: + return the reverse iterator at the end of the list. */ + reverse_iterator rend () const { return _bomHolder.listREnd(); } + + public: + /** Default constructors. */ + BomList_T (); + BomList_T (const BomList_T& iBomList) : _bomHolder (iBomList._bomHolder) { } + BomList_T (const BomHolder_T& iBomHolder) : _bomHolder (iBomHolder) { } + + /** Destructor. */ + ~BomList_T() { } + + private: + // Attributes + /** Reference structure. */ + const BomHolder_T& _bomHolder; + }; + +} +#endif // __STDAIR_BOM_BOMLIST_HPP + Copied: trunk/stdair/stdair/bom/BomMap.hpp (from rev 58, trunk/stdair/stdair/bom/InventoryList.hpp) =================================================================== --- trunk/stdair/stdair/bom/BomMap.hpp (rev 0) +++ trunk/stdair/stdair/bom/BomMap.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -0,0 +1,74 @@ +#ifndef __STDAIR_BOM_BOMMAP_HPP +#define __STDAIR_BOM_BOMMAP_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// + +namespace stdair { + + // Forward declarations + template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; + template <typename BOM_CONTENT> class BomChildrenHolderImp; + + /** Structure which handles the iterators for a bom map. */ + template <typename BOM> struct BomMap_T { + + public: + /** Definition that allows to retrieve the corresponding BomStructure + associated to the BOM. */ + typedef typename BOM::BomStructure_T BomStructure_T; + /** Define the map of bom objects. */ + typedef std::map<const MapKey_T, BomStructure_T*> BomStructureMap_T; + /** Define the bom holder. */ + typedef BomChildrenHolderImp<BOM> BomHolder_T; + + // ///////////////////////////////////////////////////////////////////////// + // See the explanations, within the stdair::BomContentRoot class, for all + // the iterator types specified below + // ///////////////////////////////////////////////////////////////////////// + /** Define the bom map iterators. */ + typedef BomIterator_T<BOM, typename BomStructureMap_T::const_iterator> iterator; + typedef BomIterator_T<BOM, typename BomStructureMap_T::const_reverse_iterator> reverse_iterator; + // ///////////////////////////////////////////////////////////////////////// + + public: + // /////////// Iteration methods ////////// + /** Initialise the internal iterator on flight date: + return the iterator at the begining of the map. */ + iterator begin () const { return _bomHolder.mapBegin(); } + + /** Initialise the internal iterator on flight date: + return the iterator at the end of the map. */ + iterator end () const { return _bomHolder.mapEnd(); } + + /** Initialise the internal reverse iterator on flight date: + return the reverse iterator at the rbegining of the map. */ + reverse_iterator rbegin () const { return _bomHolder.mapRBegin(); } + + /** Initialise the internal reverse iterator on flight date: + return the reverse iterator at the end of the map. */ + reverse_iterator rend () const { return _bomHolder.mapREnd(); } + + /** Retrieve, if existing, the Inventory corresponding to the + given key. */ + iterator find (const MapKey_T& iKey) const { return _bomHolder.find (iKey); } + + public: + /** Default constructors. */ + BomMap_T (); + BomMap_T (const BomMap_T& iBomMap) : _bomHolder (iBomMap._bomHolder) { } + BomMap_T (const BomHolder_T& iBomHolder) : _bomHolder (iBomHolder) { } + + /** Destructor. */ + ~BomMap_T() { } + + private: + // Attributes + /** Reference structure. */ + const BomHolder_T& _bomHolder; + }; + +} +#endif // __STDAIR_BOM_BOMMAP_HPP + Modified: trunk/stdair/stdair/bom/BomRoot.cpp =================================================================== --- trunk/stdair/stdair/bom/BomRoot.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/BomRoot.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -6,9 +6,9 @@ // STDAIR #include <stdair/bom/BomRootStructure.hpp> #include <stdair/bom/BomRoot.hpp> +#include <stdair/bom/BomList.hpp> +#include <stdair/bom/BomMap.hpp> #include <stdair/bom/Inventory.hpp> -#include <stdair/bom/InventoryList.hpp> -#include <stdair/bom/InventoryMap.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/BomRoot.hpp =================================================================== --- trunk/stdair/stdair/bom/BomRoot.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/BomRoot.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -15,8 +15,6 @@ class FacBomContent; class AirlineFeatureSet; struct BomRootKey_T; - struct InventoryList_T; - struct InventoryMap_T; /** Class representing the actual functional/business content for the Bom root. */ Modified: trunk/stdair/stdair/bom/BookingClass.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClass.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/BookingClass.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -15,8 +15,6 @@ // Forward declarations class FacBomContent; struct BookingClassKey_T; - struct BookingClassList_T; - struct BookingClassMap_T; /** Class representing the actual functional/business content for a segment-cabin. */ Deleted: trunk/stdair/stdair/bom/BookingClassList.cpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassList.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/BookingClassList.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,50 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <cassert> -// STDAIR -#include <stdair/bom/BomChildrenHolderImp.hpp> -#include <stdair/bom/BookingClass.hpp> -#include <stdair/bom/BookingClassList.hpp> - -namespace stdair { - - // //////////////////////////////////////////////////////////////////// - BookingClassList_T:: - BookingClassList_T (const BookingClassHolder_T& iBookingClassHolder) - : _bookingClassHolder (iBookingClassHolder) { - } - - // //////////////////////////////////////////////////////////////////// - BookingClassList_T:: - BookingClassList_T (const BookingClassList_T& iBCList) - : _bookingClassHolder (iBCList._bookingClassHolder) { - } - - // //////////////////////////////////////////////////////////////////// - BookingClassList_T::~BookingClassList_T () { - } - - // ////////////////////////////////////////////////////////////////////// - BookingClassList_T::iterator BookingClassList_T::begin () const { - return _bookingClassHolder.listBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - BookingClassList_T::iterator BookingClassList_T::end () const { - return _bookingClassHolder.listEnd (); - } - - // ////////////////////////////////////////////////////////////////////// - BookingClassList_T::reverse_iterator BookingClassList_T::rbegin () const { - return _bookingClassHolder.listRBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - BookingClassList_T::reverse_iterator BookingClassList_T::rend () const { - return _bookingClassHolder.listREnd (); - } - -} - Deleted: trunk/stdair/stdair/bom/BookingClassList.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassList.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/BookingClassList.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,70 +0,0 @@ -#ifndef __STDAIR_BOM_BOOKINGCLASSLIST_HPP -#define __STDAIR_BOM_BOOKINGCLASSLIST_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/bom/BookingClassTypes.hpp> - -namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - template <typename BOM_STRUCTURE> class BomChildrenHolderImp; - class BookingClass; - - /** Structure which handles the iterators for a booking class list. */ - struct BookingClassList_T { - - public: - // ///////////////////////////////////////////////////////////////////////// - // See the explanations, within the stdair::BomContentRoot class, for all - // the iterator types specified below - // ///////////////////////////////////////////////////////////////////////// - /** Define the booking class list iterators. */ - typedef BomIterator_T<BookingClass, - BookingClassStructureList_T::const_iterator> iterator; - typedef BomIterator_T<BookingClass, - BookingClassStructureList_T::const_reverse_iterator> reverse_iterator; - // ///////////////////////////////////////////////////////////////////////// - - /** Define the booking class holder. */ - typedef BomChildrenHolderImp<BookingClass> BookingClassHolder_T; - - public: - // /////////// Iteration methods ////////// - /** Initialise the internal iterator on flight date: - return the iterator at the begining of the list. */ - iterator begin () const; - - /** Initialise the internal iterator on flight date: - return the iterator at the end of the list. */ - iterator end () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the rbegining of the list. */ - reverse_iterator rbegin () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the end of the list. */ - reverse_iterator rend () const; - - public: - /** Default constructors. */ - BookingClassList_T (); - BookingClassList_T (const BookingClassList_T&); - BookingClassList_T (const BookingClassHolder_T&); - - /** Destructor. */ - virtual ~BookingClassList_T(); - - private: - // Attributes - /** Reference structure. */ - const BookingClassHolder_T& _bookingClassHolder; - }; - -} -#endif // __STDAIR_BOM_BOOKINGCLASSLIST_HPP - Deleted: trunk/stdair/stdair/bom/BookingClassMap.cpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassMap.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/BookingClassMap.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,56 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <cassert> -// STDAIR -#include <stdair/bom/BomChildrenHolderImp.hpp> -#include <stdair/bom/BookingClass.hpp> -#include <stdair/bom/BookingClassMap.hpp> - -namespace stdair { - - // //////////////////////////////////////////////////////////////////// - BookingClassMap_T:: - BookingClassMap_T (const BookingClassHolder_T& iBookingClassHolder) - : _bookingClassHolder (iBookingClassHolder) { - } - - // //////////////////////////////////////////////////////////////////// - BookingClassMap_T:: - BookingClassMap_T (const BookingClassMap_T& iBCMap) - : _bookingClassHolder (iBCMap._bookingClassHolder) { - } - - // //////////////////////////////////////////////////////////////////// - BookingClassMap_T::~BookingClassMap_T () { - } - - // ////////////////////////////////////////////////////////////////////// - BookingClassMap_T::iterator BookingClassMap_T::begin () const { - return _bookingClassHolder.mapBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - BookingClassMap_T::iterator BookingClassMap_T::end () const { - return _bookingClassHolder.mapEnd (); - } - - // ////////////////////////////////////////////////////////////////////// - BookingClassMap_T::reverse_iterator BookingClassMap_T::rbegin () const { - return _bookingClassHolder.mapRBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - BookingClassMap_T::reverse_iterator BookingClassMap_T::rend () const { - return _bookingClassHolder.mapREnd (); - } - - // ////////////////////////////////////////////////////////////////////// - BookingClassMap_T:: - iterator BookingClassMap_T::find (const MapKey_T& iKey) const { - return _bookingClassHolder.find (iKey); - } - -} - Deleted: trunk/stdair/stdair/bom/BookingClassMap.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassMap.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/BookingClassMap.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,74 +0,0 @@ -#ifndef __STDAIR_BOM_BOOKINGCLASSMAP_HPP -#define __STDAIR_BOM_BOOKINGCLASSMAP_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/bom/BookingClassTypes.hpp> - -namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - template <typename BOM_STRUCTURE> class BomChildrenHolderImp; - class BookingClass; - - /** Structure which handles the iterators for a booking class map. */ - struct BookingClassMap_T { - - public: - // ///////////////////////////////////////////////////////////////////////// - // See the explanations, within the stdair::BomContentRoot class, for all - // the iterator types specified below - // ///////////////////////////////////////////////////////////////////////// - /** Define the booking class map iterators. */ - typedef BomIterator_T<BookingClass, - BookingClassStructureMap_T::const_iterator> iterator; - typedef BomIterator_T<BookingClass, - BookingClassStructureMap_T::const_reverse_iterator> reverse_iterator; - // ///////////////////////////////////////////////////////////////////////// - - /** Define the booking class holder. */ - typedef BomChildrenHolderImp<BookingClass> BookingClassHolder_T; - - public: - // /////////// Iteration methods ////////// - /** Initialise the internal iterator on flight date: - return the iterator at the begining of the map. */ - iterator begin () const; - - /** Initialise the internal iterator on flight date: - return the iterator at the end of the map. */ - iterator end () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the rbegining of the map. */ - reverse_iterator rbegin () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the end of the map. */ - reverse_iterator rend () const; - - /** Retrieve, if existing, the BookingClass corresponding to the - given key. */ - iterator find (const MapKey_T&) const; - - public: - /** Default constructors. */ - BookingClassMap_T (); - BookingClassMap_T (const BookingClassMap_T&); - BookingClassMap_T (const BookingClassHolder_T&); - - /** Destructor. */ - virtual ~BookingClassMap_T(); - - private: - // Attributes - /** Reference structure. */ - const BookingClassHolder_T& _bookingClassHolder; - }; - -} -#endif // __STDAIR_BOM_BOOKINGCLASSMAP_HPP - Modified: trunk/stdair/stdair/bom/BookingClassTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassTypes.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/BookingClassTypes.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -13,17 +13,24 @@ // Forward declarations. template <typename BOM_CONTENT> class BookingClassStructure; + template <typename BOM> struct BomList_T; + template <typename BOM> struct BomMap_T; class BookingClass; - /** Define the BookingClass structure. */ + /** Define the booking class structure. */ typedef BookingClassStructure<BookingClass> BookingClassStructure_T; - /** Define the segment-cabin structure list. */ + /** Define the booking class structure list. */ typedef std::vector<BookingClassStructure_T*> BookingClassStructureList_T; - /** Define the segment-cabin structure map. */ + /** Define the booking class structure map. */ typedef std::map<const std::string, BookingClassStructure_T*> BookingClassStructureMap_T; + /** Define the booking class list. */ + typedef BomList_T<BookingClass> BookingClassList_T; + + /** Define the booking class map. */ + typedef BomMap_T<BookingClass> BookingClassMap_T; } #endif // __STDAIR_BOM_BOOKINGCLASSTYPES_HPP Modified: trunk/stdair/stdair/bom/FlightDate.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/FlightDate.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -10,11 +10,9 @@ #include <stdair/bom/FlightDateStructure.hpp> #include <stdair/bom/FlightDate.hpp> #include <stdair/bom/SegmentDate.hpp> -#include <stdair/bom/SegmentDateList.hpp> -#include <stdair/bom/SegmentDateMap.hpp> #include <stdair/bom/LegDate.hpp> -#include <stdair/bom/LegDateList.hpp> -#include <stdair/bom/LegDateMap.hpp> +#include <stdair/bom/BomList.hpp> +#include <stdair/bom/BomMap.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/FlightDate.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -16,10 +16,6 @@ // Forward declarations class FacBomContent; struct FlightDateKey_T; - struct SegmentDateList_T; - struct SegmentDateMap_T; - struct LegDateList_T; - struct LegDateMap_T; /** Class representing the actual functional/business content for a flight-date. */ Deleted: trunk/stdair/stdair/bom/FlightDateList.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateList.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/FlightDateList.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,50 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <cassert> -// STDAIR -#include <stdair/bom/BomChildrenHolderImp.hpp> -#include <stdair/bom/FlightDate.hpp> -#include <stdair/bom/FlightDateList.hpp> - -namespace stdair { - - // //////////////////////////////////////////////////////////////////// - FlightDateList_T:: - FlightDateList_T (const FlightDateHolder_T& iFlightDateHolder) - : _flightDateHolder (iFlightDateHolder) { - } - - // //////////////////////////////////////////////////////////////////// - FlightDateList_T:: - FlightDateList_T (const FlightDateList_T& iFDList) - : _flightDateHolder (iFDList._flightDateHolder) { - } - - // //////////////////////////////////////////////////////////////////// - FlightDateList_T::~FlightDateList_T () { - } - - // ////////////////////////////////////////////////////////////////////// - FlightDateList_T::iterator FlightDateList_T::begin () const { - return _flightDateHolder.listBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - FlightDateList_T::iterator FlightDateList_T::end () const { - return _flightDateHolder.listEnd (); - } - - // ////////////////////////////////////////////////////////////////////// - FlightDateList_T::reverse_iterator FlightDateList_T::rbegin () const { - return _flightDateHolder.listRBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - FlightDateList_T::reverse_iterator FlightDateList_T::rend () const { - return _flightDateHolder.listREnd (); - } - -} - Deleted: trunk/stdair/stdair/bom/FlightDateList.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateList.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/FlightDateList.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,70 +0,0 @@ -#ifndef __STDAIR_BOM_FLIGHTDATELIST_HPP -#define __STDAIR_BOM_FLIGHTDATELIST_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/bom/FlightDateTypes.hpp> - -namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - template <typename BOM_STRUCTURE> class BomChildrenHolderImp; - class FlightDate; - - /** Structure which handles the iterators for a flight-date list. */ - struct FlightDateList_T { - - public: - // ///////////////////////////////////////////////////////////////////////// - // See the explanations, within the stdair::BomContentRoot class, for all - // the iterator types specified below - // ///////////////////////////////////////////////////////////////////////// - /** Define the flight-date list iterators. */ - typedef BomIterator_T<FlightDate, - FlightDateStructureList_T::const_iterator> iterator; - typedef BomIterator_T<FlightDate, - FlightDateStructureList_T::const_reverse_iterator> reverse_iterator; - // ///////////////////////////////////////////////////////////////////////// - - /** Define the flight-date holder. */ - typedef BomChildrenHolderImp<FlightDate> FlightDateHolder_T; - - public: - // /////////// Iteration methods ////////// - /** Initialise the internal iterator on flight date: - return the iterator at the begining of the list. */ - iterator begin () const; - - /** Initialise the internal iterator on flight date: - return the iterator at the end of the list. */ - iterator end () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the rbegining of the list. */ - reverse_iterator rbegin () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the end of the list. */ - reverse_iterator rend () const; - - public: - /** Default constructors. */ - FlightDateList_T (); - FlightDateList_T (const FlightDateList_T&); - FlightDateList_T (const FlightDateHolder_T&); - - /** Destructor. */ - virtual ~FlightDateList_T(); - - private: - // Attributes - /** Reference structure. */ - const FlightDateHolder_T& _flightDateHolder; - }; - -} -#endif // __STDAIR_BOM_FLIGHTDATELIST_HPP - Deleted: trunk/stdair/stdair/bom/FlightDateMap.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateMap.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/FlightDateMap.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,56 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <cassert> -// STDAIR -#include <stdair/bom/BomChildrenHolderImp.hpp> -#include <stdair/bom/FlightDate.hpp> -#include <stdair/bom/FlightDateMap.hpp> - -namespace stdair { - - // //////////////////////////////////////////////////////////////////// - FlightDateMap_T:: - FlightDateMap_T (const FlightDateHolder_T& iFlightDateHolder) - : _flightDateHolder (iFlightDateHolder) { - } - - // //////////////////////////////////////////////////////////////////// - FlightDateMap_T:: - FlightDateMap_T (const FlightDateMap_T& iFDMap) - : _flightDateHolder (iFDMap._flightDateHolder) { - } - - // //////////////////////////////////////////////////////////////////// - FlightDateMap_T::~FlightDateMap_T () { - } - - // ////////////////////////////////////////////////////////////////////// - FlightDateMap_T::iterator FlightDateMap_T::begin () const { - return _flightDateHolder.mapBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - FlightDateMap_T::iterator FlightDateMap_T::end () const { - return _flightDateHolder.mapEnd (); - } - - // ////////////////////////////////////////////////////////////////////// - FlightDateMap_T::reverse_iterator FlightDateMap_T::rbegin () const { - return _flightDateHolder.mapRBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - FlightDateMap_T::reverse_iterator FlightDateMap_T::rend () const { - return _flightDateHolder.mapREnd (); - } - - // ////////////////////////////////////////////////////////////////////// - FlightDateMap_T:: - iterator FlightDateMap_T::find (const MapKey_T& iKey) const { - return _flightDateHolder.find (iKey); - } - -} - Deleted: trunk/stdair/stdair/bom/FlightDateMap.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateMap.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/FlightDateMap.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,74 +0,0 @@ -#ifndef __STDAIR_BOM_FLIGHTDATEMAP_HPP -#define __STDAIR_BOM_FLIGHTDATEMAP_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/bom/FlightDateTypes.hpp> - -namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - template <typename BOM_STRUCTURE> class BomChildrenHolderImp; - class FlightDate; - - /** Structure which handles the iterators for a flight-date map. */ - struct FlightDateMap_T { - - public: - // ///////////////////////////////////////////////////////////////////////// - // See the explanations, within the stdair::BomContentRoot class, for all - // the iterator types specified below - // ///////////////////////////////////////////////////////////////////////// - /** Define the flight-date map iterators. */ - typedef BomIterator_T<FlightDate, - FlightDateStructureMap_T::const_iterator> iterator; - typedef BomIterator_T<FlightDate, - FlightDateStructureMap_T::const_reverse_iterator> reverse_iterator; - // ///////////////////////////////////////////////////////////////////////// - - /** Define the flight-date holder. */ - typedef BomChildrenHolderImp<FlightDate> FlightDateHolder_T; - - public: - // /////////// Iteration methods ////////// - /** Initialise the internal iterator on flight date: - return the iterator at the begining of the map. */ - iterator begin () const; - - /** Initialise the internal iterator on flight date: - return the iterator at the end of the map. */ - iterator end () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the rbegining of the map. */ - reverse_iterator rbegin () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the end of the map. */ - reverse_iterator rend () const; - - /** Retrieve, if existing, the FlightDate corresponding to the - given key. */ - iterator find (const MapKey_T&) const; - - public: - /** Default constructors. */ - FlightDateMap_T (); - FlightDateMap_T (const FlightDateMap_T&); - FlightDateMap_T (const FlightDateHolder_T&); - - /** Destructor. */ - virtual ~FlightDateMap_T(); - - private: - // Attributes - /** Reference structure. */ - const FlightDateHolder_T& _flightDateHolder; - }; - -} -#endif // __STDAIR_BOM_FLIGHTDATEMAP_HPP - Modified: trunk/stdair/stdair/bom/FlightDateTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateTypes.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/FlightDateTypes.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -13,6 +13,8 @@ // Forward declarations. template <typename BOM_CONTENT> class FlightDateStructure; + template <typename BOM> struct BomList_T; + template <typename BOM> struct BomMap_T; class FlightDate; /** Define the FlightDate structure. */ @@ -24,6 +26,11 @@ /** Define the flight-date structure map. */ typedef std::map<const std::string, FlightDateStructure_T*> FlightDateStructureMap_T; + /** Define the flight-date list. */ + typedef BomList_T<FlightDate> FlightDateList_T; + + /** Define the flight-date map. */ + typedef BomMap_T<FlightDate> FlightDateMap_T; } #endif // __STDAIR_BOM_FLIGHTDATETYPES_HPP Modified: trunk/stdair/stdair/bom/Inventory.cpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/Inventory.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -7,8 +7,8 @@ #include <stdair/bom/InventoryStructure.hpp> #include <stdair/bom/Inventory.hpp> #include <stdair/bom/FlightDate.hpp> -#include <stdair/bom/FlightDateList.hpp> -#include <stdair/bom/FlightDateMap.hpp> +#include <stdair/bom/BomList.hpp> +#include <stdair/bom/BomMap.hpp> namespace stdair { @@ -34,6 +34,7 @@ // ////////////////////////////////////////////////////////////////////// std::string Inventory::toString() const { std::ostringstream oStr; + oStr << _key.toString(); return oStr.str(); } Modified: trunk/stdair/stdair/bom/Inventory.hpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/Inventory.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -10,15 +10,13 @@ #include <stdair/bom/InventoryTypes.hpp> #include <stdair/bom/FlightDateTypes.hpp> #include <stdair/bom/InventoryContent.hpp> -#include <stdair/bom/BookingClassMap.hpp> namespace stdair { // Forward declarations class FacBomContent; class AirlineFeature; + class BookingClass; struct InventoryKey_T; - struct FlightDateList_T; - struct FlightDateMap_T; /** Class representing the actual functional/business content for an airline inventory. */ @@ -43,6 +41,9 @@ /** Definition allowing to retrieve the associated BOM content child type. */ typedef FlightDate ContentChild_T; + + /** Definition allowing to retrieve the specific BookingClass type. */ + typedef BookingClass BookingClassContent_T; // ///////////////////////////////////////////////////////////////////////// public: @@ -138,7 +139,7 @@ const AirlineFeature* _airlineFeature; /** List of booking classes. */ - //BookingClassMap_T _bookingClassList; + //BookingClassHolder_T _bookingClassList; }; } Deleted: trunk/stdair/stdair/bom/InventoryList.cpp =================================================================== --- trunk/stdair/stdair/bom/InventoryList.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/InventoryList.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,50 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <cassert> -// STDAIR -#include <stdair/bom/BomChildrenHolderImp.hpp> -#include <stdair/bom/Inventory.hpp> -#include <stdair/bom/InventoryList.hpp> - -namespace stdair { - - // //////////////////////////////////////////////////////////////////// - InventoryList_T:: - InventoryList_T (const InventoryHolder_T& iInventoryHolder) - : _inventoryHolder (iInventoryHolder) { - } - - // //////////////////////////////////////////////////////////////////// - InventoryList_T:: - InventoryList_T (const InventoryList_T& iINVList) - : _inventoryHolder (iINVList._inventoryHolder) { - } - - // //////////////////////////////////////////////////////////////////// - InventoryList_T::~InventoryList_T () { - } - - // ////////////////////////////////////////////////////////////////////// - InventoryList_T::iterator InventoryList_T::begin () const { - return _inventoryHolder.listBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - InventoryList_T::iterator InventoryList_T::end () const { - return _inventoryHolder.listEnd (); - } - - // ////////////////////////////////////////////////////////////////////// - InventoryList_T::reverse_iterator InventoryList_T::rbegin () const { - return _inventoryHolder.listRBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - InventoryList_T::reverse_iterator InventoryList_T::rend () const { - return _inventoryHolder.listREnd (); - } - -} - Deleted: trunk/stdair/stdair/bom/InventoryList.hpp =================================================================== --- trunk/stdair/stdair/bom/InventoryList.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/InventoryList.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,70 +0,0 @@ -#ifndef __STDAIR_BOM_INVENTORYLIST_HPP -#define __STDAIR_BOM_INVENTORYLIST_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/bom/InventoryTypes.hpp> - -namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - template <typename BOM_STRUCTURE> class BomChildrenHolderImp; - class Inventory; - - /** Structure which handles the iterators for a inventory list. */ - struct InventoryList_T { - - public: - // ///////////////////////////////////////////////////////////////////////// - // See the explanations, within the stdair::BomContentRoot class, for all - // the iterator types specified below - // ///////////////////////////////////////////////////////////////////////// - /** Define the inventory list iterators. */ - typedef BomIterator_T<Inventory, - InventoryStructureList_T::const_iterator> iterator; - typedef BomIterator_T<Inventory, - InventoryStructureList_T::const_reverse_iterator> reverse_iterator; - // ///////////////////////////////////////////////////////////////////////// - - /** Define the inventory holder. */ - typedef BomChildrenHolderImp<Inventory> InventoryHolder_T; - - public: - // /////////// Iteration methods ////////// - /** Initialise the internal iterator on flight date: - return the iterator at the begining of the list. */ - iterator begin () const; - - /** Initialise the internal iterator on flight date: - return the iterator at the end of the list. */ - iterator end () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the rbegining of the list. */ - reverse_iterator rbegin () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the end of the list. */ - reverse_iterator rend () const; - - public: - /** Default constructors. */ - InventoryList_T (); - InventoryList_T (const InventoryList_T&); - InventoryList_T (const InventoryHolder_T&); - - /** Destructor. */ - virtual ~InventoryList_T(); - - private: - // Attributes - /** Reference structure. */ - const InventoryHolder_T& _inventoryHolder; - }; - -} -#endif // __STDAIR_BOM_INVENTORYLIST_HPP - Deleted: trunk/stdair/stdair/bom/InventoryMap.cpp =================================================================== --- trunk/stdair/stdair/bom/InventoryMap.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/InventoryMap.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,56 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <cassert> -// STDAIR -#include <stdair/bom/BomChildrenHolderImp.hpp> -#include <stdair/bom/Inventory.hpp> -#include <stdair/bom/InventoryMap.hpp> - -namespace stdair { - - // //////////////////////////////////////////////////////////////////// - InventoryMap_T:: - InventoryMap_T (const InventoryHolder_T& iInventoryHolder) - : _inventoryHolder (iInventoryHolder) { - } - - // //////////////////////////////////////////////////////////////////// - InventoryMap_T:: - InventoryMap_T (const InventoryMap_T& iINVMap) - : _inventoryHolder (iINVMap._inventoryHolder) { - } - - // //////////////////////////////////////////////////////////////////// - InventoryMap_T::~InventoryMap_T () { - } - - // ////////////////////////////////////////////////////////////////////// - InventoryMap_T::iterator InventoryMap_T::begin () const { - return _inventoryHolder.mapBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - InventoryMap_T::iterator InventoryMap_T::end () const { - return _inventoryHolder.mapEnd (); - } - - // ////////////////////////////////////////////////////////////////////// - InventoryMap_T::reverse_iterator InventoryMap_T::rbegin () const { - return _inventoryHolder.mapRBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - InventoryMap_T::reverse_iterator InventoryMap_T::rend () const { - return _inventoryHolder.mapREnd (); - } - - // ////////////////////////////////////////////////////////////////////// - InventoryMap_T:: - iterator InventoryMap_T::find (const MapKey_T& iKey) const { - return _inventoryHolder.find (iKey); - } - -} - Deleted: trunk/stdair/stdair/bom/InventoryMap.hpp =================================================================== --- trunk/stdair/stdair/bom/InventoryMap.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/InventoryMap.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,74 +0,0 @@ -#ifndef __STDAIR_BOM_INVENTORYMAP_HPP -#define __STDAIR_BOM_INVENTORYMAP_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/bom/InventoryTypes.hpp> - -namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - template <typename BOM_STRUCTURE> class BomChildrenHolderImp; - class Inventory; - - /** Structure which handles the iterators for a inventory map. */ - struct InventoryMap_T { - - public: - // ///////////////////////////////////////////////////////////////////////// - // See the explanations, within the stdair::BomContentRoot class, for all - // the iterator types specified below - // ///////////////////////////////////////////////////////////////////////// - /** Define the inventory map iterators. */ - typedef BomIterator_T<Inventory, - InventoryStructureMap_T::const_iterator> iterator; - typedef BomIterator_T<Inventory, - InventoryStructureMap_T::const_reverse_iterator> reverse_iterator; - // ///////////////////////////////////////////////////////////////////////// - - /** Define the inventory holder. */ - typedef BomChildrenHolderImp<Inventory> InventoryHolder_T; - - public: - // /////////// Iteration methods ////////// - /** Initialise the internal iterator on flight date: - return the iterator at the begining of the map. */ - iterator begin () const; - - /** Initialise the internal iterator on flight date: - return the iterator at the end of the map. */ - iterator end () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the rbegining of the map. */ - reverse_iterator rbegin () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the end of the map. */ - reverse_iterator rend () const; - - /** Retrieve, if existing, the Inventory corresponding to the - given key. */ - iterator find (const MapKey_T&) const; - - public: - /** Default constructors. */ - InventoryMap_T (); - InventoryMap_T (const InventoryMap_T&); - InventoryMap_T (const InventoryHolder_T&); - - /** Destructor. */ - virtual ~InventoryMap_T(); - - private: - // Attributes - /** Reference structure. */ - const InventoryHolder_T& _inventoryHolder; - }; - -} -#endif // __STDAIR_BOM_INVENTORYMAP_HPP - Modified: trunk/stdair/stdair/bom/InventoryStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/s... [truncated message content] |