From: <qua...@us...> - 2009-10-13 07:52:57
|
Revision: 44 http://stdair.svn.sourceforge.net/stdair/?rev=44&view=rev Author: quannaus Date: 2009-10-13 07:52:49 +0000 (Tue, 13 Oct 2009) Log Message: ----------- [Dev] Some changed in the BomContentList and BomContentMap implementation. Modified Paths: -------------- trunk/stdair/stdair/bom/BomChildrenHolderImp.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/FlightDate.cpp 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/FlightDateStructure.hpp trunk/stdair/stdair/bom/Inventory.cpp 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/InventoryStructure.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/LegDate.cpp 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/LegDateStructure.hpp trunk/stdair/stdair/bom/SegmentCabin.cpp 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/SegmentCabinStructure.hpp trunk/stdair/stdair/bom/SegmentDate.cpp trunk/stdair/stdair/bom/SegmentDateList.cpp trunk/stdair/stdair/bom/SegmentDateList.hpp trunk/stdair/stdair/bom/SegmentDateMap.cpp trunk/stdair/stdair/bom/SegmentDateMap.hpp trunk/stdair/stdair/bom/SegmentDateStructure.hpp Modified: trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp =================================================================== --- trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2009-10-13 07:52:49 UTC (rev 44) @@ -79,7 +79,7 @@ // /////////// Iteration methods ////////// /** Initialise the internal iterators on bom objects: return the iterator at the begining of the list. */ - ListIterator_T listBegin () { + ListIterator_T listBegin () const { return ListIterator_T(_bomChildrenOrderedList.begin()); } Modified: trunk/stdair/stdair/bom/BookingClassList.cpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassList.cpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/BookingClassList.cpp 2009-10-13 07:52:49 UTC (rev 44) @@ -4,9 +4,7 @@ // STL #include <cassert> // STDAIR -#include <stdair/bom/SegmentCabinStructure.hpp> -#include <stdair/bom/SegmentDate.hpp> -#include <stdair/bom/SegmentCabin.hpp> +#include <stdair/bom/BomChildrenHolderImp.hpp> #include <stdair/bom/BookingClass.hpp> #include <stdair/bom/BookingClassList.hpp> @@ -14,14 +12,14 @@ // //////////////////////////////////////////////////////////////////// BookingClassList_T:: - BookingClassList_T (const SegmentCabinStructure_T& iSegmentCabinStructure) - : _segmentCabinStructure (iSegmentCabinStructure) { + BookingClassList_T (const BookingClassHolder_T& iBookingClassHolder) + : _bookingClassHolder (iBookingClassHolder) { } // //////////////////////////////////////////////////////////////////// BookingClassList_T:: - BookingClassList_T (const BookingClassList_T& iSCList) - : _segmentCabinStructure (iSCList._segmentCabinStructure) { + BookingClassList_T (const BookingClassList_T& iBCList) + : _bookingClassHolder (iBCList._bookingClassHolder) { } // //////////////////////////////////////////////////////////////////// @@ -30,22 +28,22 @@ // ////////////////////////////////////////////////////////////////////// BookingClassList_T::iterator BookingClassList_T::begin () const { - return _segmentCabinStructure.bookingClassListBegin (); + return _bookingClassHolder.listBegin (); } // ////////////////////////////////////////////////////////////////////// BookingClassList_T::iterator BookingClassList_T::end () const { - return _segmentCabinStructure.bookingClassListEnd (); + return _bookingClassHolder.listEnd (); } // ////////////////////////////////////////////////////////////////////// BookingClassList_T::reverse_iterator BookingClassList_T::rbegin () const { - return _segmentCabinStructure.bookingClassListRBegin (); + return _bookingClassHolder.listRBegin (); } // ////////////////////////////////////////////////////////////////////// BookingClassList_T::reverse_iterator BookingClassList_T::rend () const { - return _segmentCabinStructure.bookingClassListREnd (); + return _bookingClassHolder.listREnd (); } } Modified: trunk/stdair/stdair/bom/BookingClassList.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassList.hpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/BookingClassList.hpp 2009-10-13 07:52:49 UTC (rev 44) @@ -5,14 +5,16 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/SegmentCabinTypes.hpp> #include <stdair/bom/BookingClassTypes.hpp> namespace stdair { -// Forward declarations + + // Forward declarations template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - - /** Structure which handles the iterators for a segment-cabin list. */ + template <typename BOM_STRUCTURE> class BomChildrenHolderImp; + class BookingClass; + + /** Structure which handles the iterators for a booking class list. */ struct BookingClassList_T { public: @@ -20,28 +22,31 @@ // See the explanations, within the stdair::BomContentRoot class, for all // the iterator types specified below // ///////////////////////////////////////////////////////////////////////// - /** Define the segment-cabin list iterators. */ + /** 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 segment cabin: + /** Initialise the internal iterator on flight date: return the iterator at the begining of the list. */ iterator begin () const; - /** Initialise the internal iterator on segment cabin: + /** 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 segment cabin: + /** 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 segment cabin: + /** Initialise the internal reverse iterator on flight date: return the reverse iterator at the end of the list. */ reverse_iterator rend () const; @@ -49,7 +54,7 @@ /** Default constructors. */ BookingClassList_T (); BookingClassList_T (const BookingClassList_T&); - BookingClassList_T (const SegmentCabinStructure_T&); + BookingClassList_T (const BookingClassHolder_T&); /** Destructor. */ virtual ~BookingClassList_T(); @@ -57,7 +62,7 @@ private: // Attributes /** Reference structure. */ - const SegmentCabinStructure_T& _segmentCabinStructure; + const BookingClassHolder_T& _bookingClassHolder; }; } Modified: trunk/stdair/stdair/bom/BookingClassMap.cpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassMap.cpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/BookingClassMap.cpp 2009-10-13 07:52:49 UTC (rev 44) @@ -4,9 +4,7 @@ // STL #include <cassert> // STDAIR -#include <stdair/bom/SegmentCabinStructure.hpp> -#include <stdair/bom/SegmentDate.hpp> -#include <stdair/bom/SegmentCabin.hpp> +#include <stdair/bom/BomChildrenHolderImp.hpp> #include <stdair/bom/BookingClass.hpp> #include <stdair/bom/BookingClassMap.hpp> @@ -14,14 +12,14 @@ // //////////////////////////////////////////////////////////////////// BookingClassMap_T:: - BookingClassMap_T (const SegmentCabinStructure_T& iSegmentCabinStructure) - : _segmentCabinStructure (iSegmentCabinStructure) { + BookingClassMap_T (const BookingClassHolder_T& iBookingClassHolder) + : _bookingClassHolder (iBookingClassHolder) { } // //////////////////////////////////////////////////////////////////// BookingClassMap_T:: - BookingClassMap_T (const BookingClassMap_T& iSCMap) - : _segmentCabinStructure (iSCMap._segmentCabinStructure) { + BookingClassMap_T (const BookingClassMap_T& iBCMap) + : _bookingClassHolder (iBCMap._bookingClassHolder) { } // //////////////////////////////////////////////////////////////////// @@ -30,22 +28,22 @@ // ////////////////////////////////////////////////////////////////////// BookingClassMap_T::iterator BookingClassMap_T::begin () const { - return _segmentCabinStructure.bookingClassMapBegin (); + return _bookingClassHolder.mapBegin (); } // ////////////////////////////////////////////////////////////////////// BookingClassMap_T::iterator BookingClassMap_T::end () const { - return _segmentCabinStructure.bookingClassMapEnd (); + return _bookingClassHolder.mapEnd (); } // ////////////////////////////////////////////////////////////////////// BookingClassMap_T::reverse_iterator BookingClassMap_T::rbegin () const { - return _segmentCabinStructure.bookingClassMapRBegin (); + return _bookingClassHolder.mapRBegin (); } // ////////////////////////////////////////////////////////////////////// BookingClassMap_T::reverse_iterator BookingClassMap_T::rend () const { - return _segmentCabinStructure.bookingClassMapREnd (); + return _bookingClassHolder.mapREnd (); } } Modified: trunk/stdair/stdair/bom/BookingClassMap.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassMap.hpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/BookingClassMap.hpp 2009-10-13 07:52:49 UTC (rev 44) @@ -5,14 +5,16 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/SegmentCabinTypes.hpp> #include <stdair/bom/BookingClassTypes.hpp> namespace stdair { -// Forward declarations + + // Forward declarations template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - - /** Structure which handles the iterators for a segment-cabin map. */ + template <typename BOM_STRUCTURE> class BomChildrenHolderImp; + class BookingClass; + + /** Structure which handles the iterators for a booking class map. */ struct BookingClassMap_T { public: @@ -20,28 +22,31 @@ // See the explanations, within the stdair::BomContentRoot class, for all // the iterator types specified below // ///////////////////////////////////////////////////////////////////////// - /** Define the segment-cabin map iterators. */ + /** 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 segment cabin: + /** Initialise the internal iterator on flight date: return the iterator at the begining of the map. */ iterator begin () const; - /** Initialise the internal iterator on segment cabin: + /** 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 segment cabin: + /** 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 segment cabin: + /** Initialise the internal reverse iterator on flight date: return the reverse iterator at the end of the map. */ reverse_iterator rend () const; @@ -49,7 +54,7 @@ /** Default constructors. */ BookingClassMap_T (); BookingClassMap_T (const BookingClassMap_T&); - BookingClassMap_T (const SegmentCabinStructure_T&); + BookingClassMap_T (const BookingClassHolder_T&); /** Destructor. */ virtual ~BookingClassMap_T(); @@ -57,7 +62,7 @@ private: // Attributes /** Reference structure. */ - const SegmentCabinStructure_T& _segmentCabinStructure; + const BookingClassHolder_T& _bookingClassHolder; }; } Modified: trunk/stdair/stdair/bom/FlightDate.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.cpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/FlightDate.cpp 2009-10-13 07:52:49 UTC (rev 44) @@ -59,22 +59,22 @@ // ////////////////////////////////////////////////////////////////////// SegmentDateList_T FlightDate::getSegmentDateList () const { - return SegmentDateList_T (_flightDateStructure); + return _flightDateStructure.getChildrenList(); } // ////////////////////////////////////////////////////////////////////// SegmentDateMap_T FlightDate::getSegmentDateMap () const { - return SegmentDateMap_T (_flightDateStructure); + return _flightDateStructure.getChildrenList(); } // ////////////////////////////////////////////////////////////////////// LegDateList_T FlightDate::getLegDateList () const { - return LegDateList_T (_flightDateStructure); + return _flightDateStructure.getSecondChildrenList(); } // ////////////////////////////////////////////////////////////////////// LegDateMap_T FlightDate::getLegDateMap () const { - return LegDateMap_T (_flightDateStructure); + return _flightDateStructure.getSecondChildrenList(); } } Modified: trunk/stdair/stdair/bom/FlightDateList.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateList.cpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/FlightDateList.cpp 2009-10-13 07:52:49 UTC (rev 44) @@ -4,8 +4,7 @@ // STL #include <cassert> // STDAIR -#include <stdair/bom/InventoryStructure.hpp> -#include <stdair/bom/Inventory.hpp> +#include <stdair/bom/BomChildrenHolderImp.hpp> #include <stdair/bom/FlightDate.hpp> #include <stdair/bom/FlightDateList.hpp> @@ -13,14 +12,14 @@ // //////////////////////////////////////////////////////////////////// FlightDateList_T:: - FlightDateList_T (const InventoryStructure_T& iInventoryStructure) - : _inventoryStructure (iInventoryStructure) { + FlightDateList_T (const FlightDateHolder_T& iFlightDateHolder) + : _flightDateHolder (iFlightDateHolder) { } // //////////////////////////////////////////////////////////////////// FlightDateList_T:: FlightDateList_T (const FlightDateList_T& iFDList) - : _inventoryStructure (iFDList._inventoryStructure) { + : _flightDateHolder (iFDList._flightDateHolder) { } // //////////////////////////////////////////////////////////////////// @@ -29,22 +28,22 @@ // ////////////////////////////////////////////////////////////////////// FlightDateList_T::iterator FlightDateList_T::begin () const { - return _inventoryStructure.flightDateListBegin (); + return _flightDateHolder.listBegin (); } // ////////////////////////////////////////////////////////////////////// FlightDateList_T::iterator FlightDateList_T::end () const { - return _inventoryStructure.flightDateListEnd (); + return _flightDateHolder.listEnd (); } // ////////////////////////////////////////////////////////////////////// FlightDateList_T::reverse_iterator FlightDateList_T::rbegin () const { - return _inventoryStructure.flightDateListRBegin (); + return _flightDateHolder.listRBegin (); } // ////////////////////////////////////////////////////////////////////// FlightDateList_T::reverse_iterator FlightDateList_T::rend () const { - return _inventoryStructure.flightDateListREnd (); + return _flightDateHolder.listREnd (); } } Modified: trunk/stdair/stdair/bom/FlightDateList.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateList.hpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/FlightDateList.hpp 2009-10-13 07:52:49 UTC (rev 44) @@ -5,14 +5,15 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/InventoryTypes.hpp> #include <stdair/bom/FlightDateTypes.hpp> namespace stdair { -// Forward declarations + // 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 { @@ -27,7 +28,10 @@ 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: @@ -50,7 +54,7 @@ /** Default constructors. */ FlightDateList_T (); FlightDateList_T (const FlightDateList_T&); - FlightDateList_T (const InventoryStructure_T&); + FlightDateList_T (const FlightDateHolder_T&); /** Destructor. */ virtual ~FlightDateList_T(); @@ -58,7 +62,7 @@ private: // Attributes /** Reference structure. */ - const InventoryStructure_T& _inventoryStructure; + const FlightDateHolder_T& _flightDateHolder; }; } Modified: trunk/stdair/stdair/bom/FlightDateMap.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateMap.cpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/FlightDateMap.cpp 2009-10-13 07:52:49 UTC (rev 44) @@ -4,8 +4,7 @@ // STL #include <cassert> // STDAIR -#include <stdair/bom/InventoryStructure.hpp> -#include <stdair/bom/Inventory.hpp> +#include <stdair/bom/BomChildrenHolderImp.hpp> #include <stdair/bom/FlightDate.hpp> #include <stdair/bom/FlightDateMap.hpp> @@ -13,14 +12,14 @@ // //////////////////////////////////////////////////////////////////// FlightDateMap_T:: - FlightDateMap_T (const InventoryStructure_T& iInventoryStructure) - : _inventoryStructure (iInventoryStructure) { + FlightDateMap_T (const FlightDateHolder_T& iFlightDateHolder) + : _flightDateHolder (iFlightDateHolder) { } // //////////////////////////////////////////////////////////////////// FlightDateMap_T:: FlightDateMap_T (const FlightDateMap_T& iFDMap) - : _inventoryStructure (iFDMap._inventoryStructure) { + : _flightDateHolder (iFDMap._flightDateHolder) { } // //////////////////////////////////////////////////////////////////// @@ -29,22 +28,22 @@ // ////////////////////////////////////////////////////////////////////// FlightDateMap_T::iterator FlightDateMap_T::begin () const { - return _inventoryStructure.flightDateMapBegin (); + return _flightDateHolder.mapBegin (); } // ////////////////////////////////////////////////////////////////////// FlightDateMap_T::iterator FlightDateMap_T::end () const { - return _inventoryStructure.flightDateMapEnd (); + return _flightDateHolder.mapEnd (); } // ////////////////////////////////////////////////////////////////////// FlightDateMap_T::reverse_iterator FlightDateMap_T::rbegin () const { - return _inventoryStructure.flightDateMapRBegin (); + return _flightDateHolder.mapRBegin (); } // ////////////////////////////////////////////////////////////////////// FlightDateMap_T::reverse_iterator FlightDateMap_T::rend () const { - return _inventoryStructure.flightDateMapREnd (); + return _flightDateHolder.mapREnd (); } } Modified: trunk/stdair/stdair/bom/FlightDateMap.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateMap.hpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/FlightDateMap.hpp 2009-10-13 07:52:49 UTC (rev 44) @@ -5,13 +5,15 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/InventoryTypes.hpp> #include <stdair/bom/FlightDateTypes.hpp> namespace stdair { -// Forward declarations + + // 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 { @@ -26,7 +28,10 @@ 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: @@ -49,7 +54,7 @@ /** Default constructors. */ FlightDateMap_T (); FlightDateMap_T (const FlightDateMap_T&); - FlightDateMap_T (const InventoryStructure_T&); + FlightDateMap_T (const FlightDateHolder_T&); /** Destructor. */ virtual ~FlightDateMap_T(); @@ -57,7 +62,7 @@ private: // Attributes /** Reference structure. */ - const InventoryStructure_T& _inventoryStructure; + const FlightDateHolder_T& _flightDateHolder; }; } Modified: trunk/stdair/stdair/bom/FlightDateStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-10-13 07:52:49 UTC (rev 44) @@ -61,23 +61,6 @@ /** Definition allowing to retrive the second children bom holder type. */ typedef BomChildrenHolderImp<SecondContentChild_T> SecondChildrenBomHolder_T; - /** Define the iterators of the segment-date list. */ - typedef typename ChildrenBomHolder_T::ListIterator_T SegmentDateListIterator_T; - typedef typename ChildrenBomHolder_T::ListReverseIterator_T SegmentDateListReverseIterator_T; - - /** Define the iterators of the segment-date map. */ - typedef typename ChildrenBomHolder_T::MapIterator_T SegmentDateMapIterator_T; - typedef typename ChildrenBomHolder_T::MapReverseIterator_T SegmentDateMapReverseIterator_T; - - /** Define the iterators of the leg-date list. */ - typedef typename SecondChildrenBomHolder_T::ListIterator_T LegDateListIterator_T; - typedef typename SecondChildrenBomHolder_T::ListReverseIterator_T LegDateListReverseIterator_T; - - /** Define the iterators of the leg-date map. */ - typedef typename SecondChildrenBomHolder_T::MapIterator_T LegDateMapIterator_T; - typedef typename SecondChildrenBomHolder_T::MapReverseIterator_T LegDateMapReverseIterator_T; - - public: // /////////// Getters ///////////// /** Get the (parent) InventoryStructure object. */ @@ -183,122 +166,7 @@ _secondChildrenList->describeFull (ioOut); } - public: - // /////////// Iteration methods ////////// - /** Initialise the internal iterator on segment date: - return the iterator at the begining of the list. */ - SegmentDateListIterator_T segmentDateListBegin () const { - assert (_childrenList != NULL); - return _childrenList->listBegin (); - } - /** Initialise the internal iterator on segment date: - return the iterator at the end of the list. */ - SegmentDateListIterator_T segmentDateListEnd () const { - assert (_childrenList != NULL); - return _childrenList->listEnd (); - } - - /** Initialise the internal reverse iterator on segment date: - return the reverse iterator at the rbegining of the list. */ - SegmentDateListReverseIterator_T segmentDateListRBegin () const { - assert (_childrenList != NULL); - return _childrenList->listRBegin (); - } - - /** Initialise the internal reverse iterator on segment date: - return the reverse iterator at the rend of the list. */ - SegmentDateListReverseIterator_T segmentDateListREnd () const { - assert (_childrenList != NULL); - return _childrenList->listREnd (); - } - - /** Initialise the internal iterator on segment date: - return the iterator at the begining of the map. */ - SegmentDateMapIterator_T segmentDateMapBegin () const { - assert (_childrenList != NULL); - return _childrenList->mapBegin (); - } - - /** Initialise the internal iterator on segment date: - return the iterator at the end of the map. */ - SegmentDateMapIterator_T segmentDateMapEnd () const { - assert (_childrenList != NULL); - return _childrenList->mapEnd (); - } - - /** Initialise the internal reverse iterator on segment date: - return the reverse iterator at the rbegining of the map. */ - SegmentDateMapReverseIterator_T segmentDateMapRBegin () const { - assert (_childrenList != NULL); - return _childrenList->mapRBegin (); - } - - /** Initialise the internal reverse iterator on segment date: - return the reverse iterator at the rend of the map. */ - SegmentDateMapReverseIterator_T segmentDateMapREnd () const { - assert (_childrenList != NULL); - return _childrenList->mapREnd (); - } - - - /** Initialise the internal iterator on leg date: - return the iterator at the begining of the list. */ - LegDateListIterator_T legDateListBegin () const { - assert (_secondChildrenList != NULL); - return _secondChildrenList->listBegin (); - } - - /** Initialise the internal iterator on leg date: - return the iterator at the end of the list. */ - LegDateListIterator_T legDateListEnd () const { - assert (_secondChildrenList != NULL); - return _secondChildrenList->listEnd (); - } - - /** Initialise the internal reverse iterator on leg date: - return the reverse iterator at the rbegining of the list. */ - LegDateListReverseIterator_T legDateListRBegin () const { - assert (_secondChildrenList != NULL); - return _secondChildrenList->listRBegin (); - } - - /** Initialise the internal reverse iterator on leg date: - return the reverse iterator at the rend of the list. */ - LegDateListReverseIterator_T legDateListREnd () const { - assert (_secondChildrenList != NULL); - return _secondChildrenList->listREnd (); - } - - /** Initialise the internal iterator on leg date: - return the iterator at the begining of the map. */ - LegDateMapIterator_T legDateMapBegin () const { - assert (_secondChildrenList != NULL); - return _secondChildrenList->mapBegin (); - } - - /** Initialise the internal iterator on leg date: - return the iterator at the end of the map. */ - LegDateMapIterator_T legDateMapEnd () const { - assert (_secondChildrenList != NULL); - return _secondChildrenList->mapEnd (); - } - - /** Initialise the internal reverse iterator on leg date: - return the reverse iterator at the rbegining of the map. */ - LegDateMapReverseIterator_T legDateMapRBegin () const { - assert (_secondChildrenList != NULL); - return _secondChildrenList->mapRBegin (); - } - - /** Initialise the internal reverse iterator on leg date: - return the reverse iterator at the rend of the map. */ - LegDateMapReverseIterator_T legDateMapREnd () const { - assert (_secondChildrenList != NULL); - return _secondChildrenList->mapREnd (); - } - - private: /** Constructors are private so as to force the usage of the Factory layer. */ Modified: trunk/stdair/stdair/bom/Inventory.cpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.cpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/Inventory.cpp 2009-10-13 07:52:49 UTC (rev 44) @@ -56,12 +56,12 @@ // ////////////////////////////////////////////////////////////////////// FlightDateList_T Inventory::getFlightDateList () const { - return FlightDateList_T (_inventoryStructure); + return _inventoryStructure.getChildrenList(); } // ////////////////////////////////////////////////////////////////////// FlightDateMap_T Inventory::getFlightDateMap () const { - return FlightDateMap_T (_inventoryStructure); + return _inventoryStructure.getChildrenList(); } } Modified: trunk/stdair/stdair/bom/InventoryList.cpp =================================================================== --- trunk/stdair/stdair/bom/InventoryList.cpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/InventoryList.cpp 2009-10-13 07:52:49 UTC (rev 44) @@ -4,8 +4,7 @@ // STL #include <cassert> // STDAIR -#include <stdair/bom/BomStructureRoot.hpp> -#include <stdair/bom/BomContentRoot.hpp> +#include <stdair/bom/BomChildrenHolderImp.hpp> #include <stdair/bom/Inventory.hpp> #include <stdair/bom/InventoryList.hpp> @@ -13,14 +12,14 @@ // //////////////////////////////////////////////////////////////////// InventoryList_T:: - InventoryList_T (const BomStructureRoot_T& iBomStructureRoot) - : _bomStructureRoot (iBomStructureRoot) { + InventoryList_T (const InventoryHolder_T& iInventoryHolder) + : _inventoryHolder (iInventoryHolder) { } // //////////////////////////////////////////////////////////////////// InventoryList_T:: InventoryList_T (const InventoryList_T& iINVList) - : _bomStructureRoot (iINVList._bomStructureRoot) { + : _inventoryHolder (iINVList._inventoryHolder) { } // //////////////////////////////////////////////////////////////////// @@ -29,22 +28,22 @@ // ////////////////////////////////////////////////////////////////////// InventoryList_T::iterator InventoryList_T::begin () const { - return _bomStructureRoot.inventoryListBegin (); + return _inventoryHolder.listBegin (); } // ////////////////////////////////////////////////////////////////////// InventoryList_T::iterator InventoryList_T::end () const { - return _bomStructureRoot.inventoryListEnd (); + return _inventoryHolder.listEnd (); } // ////////////////////////////////////////////////////////////////////// InventoryList_T::reverse_iterator InventoryList_T::rbegin () const { - return _bomStructureRoot.inventoryListRBegin (); + return _inventoryHolder.listRBegin (); } // ////////////////////////////////////////////////////////////////////// InventoryList_T::reverse_iterator InventoryList_T::rend () const { - return _bomStructureRoot.inventoryListREnd (); + return _inventoryHolder.listREnd (); } } Modified: trunk/stdair/stdair/bom/InventoryList.hpp =================================================================== --- trunk/stdair/stdair/bom/InventoryList.hpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/InventoryList.hpp 2009-10-13 07:52:49 UTC (rev 44) @@ -5,15 +5,16 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/BomRootTypes.hpp> #include <stdair/bom/InventoryTypes.hpp> namespace stdair { -// Forward declarations + // Forward declarations template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - - /** Structure which handles the iterators for a flight-date list. */ + template <typename BOM_STRUCTURE> class BomChildrenHolderImp; + class Inventory; + + /** Structure which handles the iterators for a inventory list. */ struct InventoryList_T { public: @@ -21,13 +22,16 @@ // See the explanations, within the stdair::BomContentRoot class, for all // the iterator types specified below // ///////////////////////////////////////////////////////////////////////// - /** Define the flight-date list iterators. */ + /** 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: @@ -50,7 +54,7 @@ /** Default constructors. */ InventoryList_T (); InventoryList_T (const InventoryList_T&); - InventoryList_T (const BomStructureRoot_T&); + InventoryList_T (const InventoryHolder_T&); /** Destructor. */ virtual ~InventoryList_T(); @@ -58,7 +62,7 @@ private: // Attributes /** Reference structure. */ - const BomStructureRoot_T& _bomStructureRoot; + const InventoryHolder_T& _inventoryHolder; }; } Modified: trunk/stdair/stdair/bom/InventoryMap.cpp =================================================================== --- trunk/stdair/stdair/bom/InventoryMap.cpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/InventoryMap.cpp 2009-10-13 07:52:49 UTC (rev 44) @@ -4,8 +4,7 @@ // STL #include <cassert> // STDAIR -#include <stdair/bom/BomStructureRoot.hpp> -#include <stdair/bom/BomContentRoot.hpp> +#include <stdair/bom/BomChildrenHolderImp.hpp> #include <stdair/bom/Inventory.hpp> #include <stdair/bom/InventoryMap.hpp> @@ -13,14 +12,14 @@ // //////////////////////////////////////////////////////////////////// InventoryMap_T:: - InventoryMap_T (const BomStructureRoot_T& iBomStructureRoot) - : _bomStructureRoot (iBomStructureRoot) { + InventoryMap_T (const InventoryHolder_T& iInventoryHolder) + : _inventoryHolder (iInventoryHolder) { } // //////////////////////////////////////////////////////////////////// InventoryMap_T:: InventoryMap_T (const InventoryMap_T& iINVMap) - : _bomStructureRoot (iINVMap._bomStructureRoot) { + : _inventoryHolder (iINVMap._inventoryHolder) { } // //////////////////////////////////////////////////////////////////// @@ -29,22 +28,22 @@ // ////////////////////////////////////////////////////////////////////// InventoryMap_T::iterator InventoryMap_T::begin () const { - return _bomStructureRoot.inventoryMapBegin (); + return _inventoryHolder.mapBegin (); } // ////////////////////////////////////////////////////////////////////// InventoryMap_T::iterator InventoryMap_T::end () const { - return _bomStructureRoot.inventoryMapEnd (); + return _inventoryHolder.mapEnd (); } // ////////////////////////////////////////////////////////////////////// InventoryMap_T::reverse_iterator InventoryMap_T::rbegin () const { - return _bomStructureRoot.inventoryMapRBegin (); + return _inventoryHolder.mapRBegin (); } // ////////////////////////////////////////////////////////////////////// InventoryMap_T::reverse_iterator InventoryMap_T::rend () const { - return _bomStructureRoot.inventoryMapREnd (); + return _inventoryHolder.mapREnd (); } } Modified: trunk/stdair/stdair/bom/InventoryMap.hpp =================================================================== --- trunk/stdair/stdair/bom/InventoryMap.hpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/InventoryMap.hpp 2009-10-13 07:52:49 UTC (rev 44) @@ -5,15 +5,16 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/BomRootTypes.hpp> #include <stdair/bom/InventoryTypes.hpp> namespace stdair { -// Forward declarations + // Forward declarations template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - - /** Structure which handles the iterators for a flight-date map. */ + template <typename BOM_STRUCTURE> class BomChildrenHolderImp; + class Inventory; + + /** Structure which handles the iterators for a inventory map. */ struct InventoryMap_T { public: @@ -21,13 +22,16 @@ // See the explanations, within the stdair::BomContentRoot class, for all // the iterator types specified below // ///////////////////////////////////////////////////////////////////////// - /** Define the flight-date map iterators. */ + /** 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: @@ -50,7 +54,7 @@ /** Default constructors. */ InventoryMap_T (); InventoryMap_T (const InventoryMap_T&); - InventoryMap_T (const BomStructureRoot_T&); + InventoryMap_T (const InventoryHolder_T&); /** Destructor. */ virtual ~InventoryMap_T(); @@ -58,7 +62,7 @@ private: // Attributes /** Reference structure. */ - const BomStructureRoot_T& _bomStructureRoot; + const InventoryHolder_T& _inventoryHolder; }; } Modified: trunk/stdair/stdair/bom/InventoryStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-10-13 07:52:49 UTC (rev 44) @@ -57,14 +57,6 @@ /** Define the children bom holder type. */ typedef BomChildrenHolderImp<ContentChild_T> ChildrenBomHolder_T; - /** Define the iterators of the flight-date list. */ - typedef typename ChildrenBomHolder_T::ListIterator_T FlightDateListIterator_T; - typedef typename ChildrenBomHolder_T::ListReverseIterator_T FlightDateListReverseIterator_T; - - /** Define the iterators of the flight-date map. */ - typedef typename ChildrenBomHolder_T::MapIterator_T FlightDateMapIterator_T; - typedef typename ChildrenBomHolder_T::MapReverseIterator_T FlightDateMapReverseIterator_T; - public: // /////////// Getters ///////////// /** Get the (parent) BomStructureRoot object. */ @@ -146,65 +138,7 @@ assert (_childrenList != NULL); _childrenList->describeFull (ioOut); } - - public: - // /////////// Iteration methods ////////// - /** Initialise the internal iterator on flight date: - return the iterator at the begining of the list. */ - FlightDateListIterator_T flightDateListBegin () const { - assert (_childrenList != NULL); - return _childrenList->listBegin (); - } - /** Initialise the internal iterator on flight date: - return the iterator at the end of the list. */ - FlightDateListIterator_T flightDateListEnd () const { - assert (_childrenList != NULL); - return _childrenList->listEnd (); - } - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the rbegining of the list. */ - FlightDateListReverseIterator_T flightDateListRBegin () const { - assert (_childrenList != NULL); - return _childrenList->listRBegin (); - } - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the rend of the list. */ - FlightDateListReverseIterator_T flightDateListREnd () const { - assert (_childrenList != NULL); - return _childrenList->listREnd (); - } - - /** Initialise the internal iterator on flight date: - return the iterator at the begining of the map. */ - FlightDateMapIterator_T flightDateMapBegin () const { - assert (_childrenList != NULL); - return _childrenList->mapBegin (); - } - - /** Initialise the internal iterator on flight date: - return the iterator at the end of the map. */ - FlightDateMapIterator_T flightDateMapEnd () const { - assert (_childrenList != NULL); - return _childrenList->mapEnd (); - } - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the rbegining of the map. */ - FlightDateMapReverseIterator_T flightDateMapRBegin () const { - assert (_childrenList != NULL); - return _childrenList->mapRBegin (); - } - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the rend of the map. */ - FlightDateMapReverseIterator_T flightDateMapREnd () const { - assert (_childrenList != NULL); - return _childrenList->mapREnd (); - } - private: /** Constructors are private so as to force the usage of the Factory layer. */ Modified: trunk/stdair/stdair/bom/LegCabinList.cpp =================================================================== --- trunk/stdair/stdair/bom/LegCabinList.cpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/LegCabinList.cpp 2009-10-13 07:52:49 UTC (rev 44) @@ -4,9 +4,7 @@ // STL #include <cassert> // STDAIR -#include <stdair/bom/LegDateStructure.hpp> -#include <stdair/bom/FlightDate.hpp> -#include <stdair/bom/LegDate.hpp> +#include <stdair/bom/BomChildrenHolderImp.hpp> #include <stdair/bom/LegCabin.hpp> #include <stdair/bom/LegCabinList.hpp> @@ -14,14 +12,14 @@ // //////////////////////////////////////////////////////////////////// LegCabinList_T:: - LegCabinList_T (const LegDateStructure_T& iLegDateStructure) - : _legDateStructure (iLegDateStructure) { + LegCabinList_T (const LegCabinHolder_T& iLegCabinHolder) + : _legCabinHolder (iLegCabinHolder) { } // //////////////////////////////////////////////////////////////////// LegCabinList_T:: - LegCabinList_T (const LegCabinList_T& iSCList) - : _legDateStructure (iSCList._legDateStructure) { + LegCabinList_T (const LegCabinList_T& iLCList) + : _legCabinHolder (iLCList._legCabinHolder) { } // //////////////////////////////////////////////////////////////////// @@ -30,22 +28,22 @@ // ////////////////////////////////////////////////////////////////////// LegCabinList_T::iterator LegCabinList_T::begin () const { - return _legDateStructure.legCabinListBegin (); + return _legCabinHolder.listBegin (); } // ////////////////////////////////////////////////////////////////////// LegCabinList_T::iterator LegCabinList_T::end () const { - return _legDateStructure.legCabinListEnd (); + return _legCabinHolder.listEnd (); } // ////////////////////////////////////////////////////////////////////// LegCabinList_T::reverse_iterator LegCabinList_T::rbegin () const { - return _legDateStructure.legCabinListRBegin (); + return _legCabinHolder.listRBegin (); } // ////////////////////////////////////////////////////////////////////// LegCabinList_T::reverse_iterator LegCabinList_T::rend () const { - return _legDateStructure.legCabinListREnd (); + return _legCabinHolder.listREnd (); } } Modified: trunk/stdair/stdair/bom/LegCabinList.hpp =================================================================== --- trunk/stdair/stdair/bom/LegCabinList.hpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/LegCabinList.hpp 2009-10-13 07:52:49 UTC (rev 44) @@ -5,13 +5,15 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/LegDateTypes.hpp> #include <stdair/bom/LegCabinTypes.hpp> namespace stdair { -// Forward declarations + + // Forward declarations template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - + template <typename BOM_STRUCTURE> class BomChildrenHolderImp; + class LegCabin; + /** Structure which handles the iterators for a leg-cabin list. */ struct LegCabinList_T { @@ -26,7 +28,10 @@ typedef BomIterator_T<LegCabin, LegCabinStructureList_T::const_reverse_iterator> reverse_iterator; // ///////////////////////////////////////////////////////////////////////// - + + /** Define the leg-cabin holder. */ + typedef BomChildrenHolderImp<LegCabin> LegCabinHolder_T; + public: // /////////// Iteration methods ////////// /** Initialise the internal iterator on leg cabin: @@ -49,7 +54,7 @@ /** Default constructors. */ LegCabinList_T (); LegCabinList_T (const LegCabinList_T&); - LegCabinList_T (const LegDateStructure_T&); + LegCabinList_T (const LegCabinHolder_T&); /** Destructor. */ virtual ~LegCabinList_T(); @@ -57,7 +62,7 @@ private: // Attributes /** Reference structure. */ - const LegDateStructure_T& _legDateStructure; + const LegCabinHolder_T& _legCabinHolder; }; } Modified: trunk/stdair/stdair/bom/LegCabinMap.cpp =================================================================== --- trunk/stdair/stdair/bom/LegCabinMap.cpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/LegCabinMap.cpp 2009-10-13 07:52:49 UTC (rev 44) @@ -4,9 +4,7 @@ // STL #include <cassert> // STDAIR -#include <stdair/bom/LegDateStructure.hpp> -#include <stdair/bom/FlightDate.hpp> -#include <stdair/bom/LegDate.hpp> +#include <stdair/bom/BomChildrenHolderImp.hpp> #include <stdair/bom/LegCabin.hpp> #include <stdair/bom/LegCabinMap.hpp> @@ -14,14 +12,14 @@ // //////////////////////////////////////////////////////////////////// LegCabinMap_T:: - LegCabinMap_T (const LegDateStructure_T& iLegDateStructure) - : _legDateStructure (iLegDateStructure) { + LegCabinMap_T (const LegCabinHolder_T& iLegCabinHolder) + : _legCabinHolder (iLegCabinHolder) { } // //////////////////////////////////////////////////////////////////// LegCabinMap_T:: - LegCabinMap_T (const LegCabinMap_T& iSCMap) - : _legDateStructure (iSCMap._legDateStructure) { + LegCabinMap_T (const LegCabinMap_T& iLCMap) + : _legCabinHolder (iLCMap._legCabinHolder) { } // //////////////////////////////////////////////////////////////////// @@ -30,22 +28,22 @@ // ////////////////////////////////////////////////////////////////////// LegCabinMap_T::iterator LegCabinMap_T::begin () const { - return _legDateStructure.legCabinMapBegin (); + return _legCabinHolder.mapBegin (); } // ////////////////////////////////////////////////////////////////////// LegCabinMap_T::iterator LegCabinMap_T::end () const { - return _legDateStructure.legCabinMapEnd (); + return _legCabinHolder.mapEnd (); } // ////////////////////////////////////////////////////////////////////// LegCabinMap_T::reverse_iterator LegCabinMap_T::rbegin () const { - return _legDateStructure.legCabinMapRBegin (); + return _legCabinHolder.mapRBegin (); } // ////////////////////////////////////////////////////////////////////// LegCabinMap_T::reverse_iterator LegCabinMap_T::rend () const { - return _legDateStructure.legCabinMapREnd (); + return _legCabinHolder.mapREnd (); } } Modified: trunk/stdair/stdair/bom/LegCabinMap.hpp =================================================================== --- trunk/stdair/stdair/bom/LegCabinMap.hpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/LegCabinMap.hpp 2009-10-13 07:52:49 UTC (rev 44) @@ -5,14 +5,16 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/LegDateTypes.hpp> #include <stdair/bom/LegCabinTypes.hpp> namespace stdair { -// Forward declarations + + // Forward declarations template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - - /** Structure which handles the iterators for a leg-date map. */ + template <typename BOM_STRUCTURE> class BomChildrenHolderImp; + class LegCabin; + + /** Structure which handles the iterators for a leg-cabin map. */ struct LegCabinMap_T { public: @@ -20,28 +22,31 @@ // See the explanations, within the stdair::BomContentRoot class, for all // the iterator types specified below // ///////////////////////////////////////////////////////////////////////// - /** Define the leg-date map iterators. */ + /** Define the leg-cabin map iterators. */ typedef BomIterator_T<LegCabin, LegCabinStructureMap_T::const_iterator> iterator; typedef BomIterator_T<LegCabin, LegCabinStructureMap_T::const_reverse_iterator> reverse_iterator; // ///////////////////////////////////////////////////////////////////////// - + + /** Define the leg-cabin holder. */ + typedef BomChildrenHolderImp<LegCabin> LegCabinHolder_T; + public: // /////////// Iteration methods ////////// - /** Initialise the internal iterator on leg date: + /** Initialise the internal iterator on leg cabin: return the iterator at the begining of the map. */ iterator begin () const; - /** Initialise the internal iterator on leg date: + /** Initialise the internal iterator on leg cabin: return the iterator at the end of the map. */ iterator end () const; - /** Initialise the internal reverse iterator on leg date: + /** Initialise the internal reverse iterator on leg cabin: return the reverse iterator at the rbegining of the map. */ reverse_iterator rbegin () const; - /** Initialise the internal reverse iterator on leg date: + /** Initialise the internal reverse iterator on leg cabin: return the reverse iterator at the end of the map. */ reverse_iterator rend () const; @@ -49,7 +54,7 @@ /** Default constructors. */ LegCabinMap_T (); LegCabinMap_T (const LegCabinMap_T&); - LegCabinMap_T (const LegDateStructure_T&); + LegCabinMap_T (const LegCabinHolder_T&); /** Destructor. */ virtual ~LegCabinMap_T(); @@ -57,7 +62,7 @@ private: // Attributes /** Reference structure. */ - const LegDateStructure_T& _legDateStructure; + const LegCabinHolder_T& _legCabinHolder; }; } Modified: trunk/stdair/stdair/bom/LegDate.cpp =================================================================== --- trunk/stdair/stdair/bom/LegDate.cpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/LegDate.cpp 2009-10-13 07:52:49 UTC (rev 44) @@ -56,12 +56,12 @@ // ////////////////////////////////////////////////////////////////////// LegCabinList_T LegDate::getLegCabinList () const { - return LegCabinList_T (_legDateStructure); + return _legDateStructure.getChildrenList(); } // ////////////////////////////////////////////////////////////////////// LegCabinMap_T LegDate::getLegCabinMap () const { - return LegCabinMap_T (_legDateStructure); + return _legDateStructure.getChildrenList(); } } Modified: trunk/stdair/stdair/bom/LegDateList.cpp =================================================================== --- trunk/stdair/stdair/bom/LegDateList.cpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/LegDateList.cpp 2009-10-13 07:52:49 UTC (rev 44) @@ -4,10 +4,7 @@ // STL #include <cassert> // STDAIR -#include <stdair/bom/FlightDateStructure.hpp> -#include <stdair/bom/Inventory.hpp> -#include <stdair/bom/FlightDate.hpp> -#include <stdair/bom/SegmentDate.hpp> +#include <stdair/bom/BomChildrenHolderImp.hpp> #include <stdair/bom/LegDate.hpp> #include <stdair/bom/LegDateList.hpp> @@ -15,14 +12,14 @@ // //////////////////////////////////////////////////////////////////// LegDateList_T:: - LegDateList_T (const FlightDateStructure_T& iFlightDateStructure) - : _flightDateStructure (iFlightDateStructure) { + LegDateList_T (const LegDateHolder_T& iLegDateHolder) + : _legDateHolder (iLegDateHolder) { } // //////////////////////////////////////////////////////////////////// LegDateList_T:: - LegDateList_T (const LegDateList_T& iSDList) - : _flightDateStructure (iSDList._flightDateStructure) { + LegDateList_T (const LegDateList_T& iLDList) + : _legDateHolder (iLDList._legDateHolder) { } // //////////////////////////////////////////////////////////////////// @@ -31,22 +28,22 @@ // ////////////////////////////////////////////////////////////////////// LegDateList_T::iterator LegDateList_T::begin () const { - return _flightDateStructure.legDateListBegin (); + return _legDateHolder.listBegin (); } // ////////////////////////////////////////////////////////////////////// LegDateList_T::iterator LegDateList_T::end () const { - return _flightDateStructure.legDateListEnd (); + return _legDateHolder.listEnd (); } // ////////////////////////////////////////////////////////////////////// LegDateList_T::reverse_iterator LegDateList_T::rbegin () const { - return _flightDateStructure.legDateListRBegin (); + return _legDateHolder.listRBegin (); } // ////////////////////////////////////////////////////////////////////// LegDateList_T::reverse_iterator LegDateList_T::rend () const { - return _flightDateStructure.legDateListREnd (); + return _legDateHolder.listREnd (); } } Modified: trunk/stdair/stdair/bom/LegDateList.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDateList.hpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/LegDateList.hpp 2009-10-13 07:52:49 UTC (rev 44) @@ -5,13 +5,15 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/FlightDateTypes.hpp> #include <stdair/bom/LegDateTypes.hpp> namespace stdair { - // Forward declarations. + + // Forward declarations template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - + template <typename BOM_STRUCTURE> class BomChildrenHolderImp; + class LegDate; + /** Structure which handles the iterators for a leg-date list. */ struct LegDateList_T { @@ -26,7 +28,10 @@ typedef BomIterator_T<LegDate, LegDateStructureList_T::const_reverse_iterator> reverse_iterator; // ///////////////////////////////////////////////////////////////////////// - + + /** Define the leg-date holder. */ + typedef BomChildrenHolderImp<LegDate> LegDateHolder_T; + public: // /////////// Iteration methods ////////// /** Initialise the internal iterator on leg date: @@ -49,7 +54,7 @@ /** Default constructors. */ LegDateList_T (); LegDateList_T (const LegDateList_T&); - LegDateList_T (const FlightDateStructure_T&); + LegDateList_T (const LegDateHolder_T&); /** Destructor. */ virtual ~LegDateList_T(); @@ -57,7 +62,7 @@ private: // Attributes /** Reference structure. */ - const FlightDateStructure_T& _flightDateStructure; + const LegDateHolder_T& _legDateHolder; }; } Modified: trunk/stdair/stdair/bom/LegDateMap.cpp =================================================================== --- trunk/stdair/stdair/bom/LegDateMap.cpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/LegDateMap.cpp 2009-10-13 07:52:49 UTC (rev 44) @@ -4,10 +4,7 @@ // STL #include <cassert> // STDAIR -#include <stdair/bom/FlightDateStructure.hpp> -#include <stdair/bom/Inventory.hpp> -#include <stdair/bom/FlightDate.hpp> -#include <stdair/bom/SegmentDate.hpp> +#include <stdair/bom/BomChildrenHolderImp.hpp> #include <stdair/bom/LegDate.hpp> #include <stdair/bom/LegDateMap.hpp> @@ -15,14 +12,14 @@ // //////////////////////////////////////////////////////////////////// LegDateMap_T:: - LegDateMap_T (const FlightDateStructure_T& iFlightDateStructure) - : _flightDateStructure (iFlightDateStructure) { + LegDateMap_T (const LegDateHolder_T& iLegDateHolder) + : _legDateHolder (iLegDateHolder) { } // //////////////////////////////////////////////////////////////////// LegDateMap_T:: - LegDateMap_T (const LegDateMap_T& iSDMap) - : _flightDateStructure (iSDMap._flightDateStructure) { + LegDateMap_T (const LegDateMap_T& iLDMap) + : _legDateHolder (iLDMap._legDateHolder) { } // //////////////////////////////////////////////////////////////////// @@ -31,22 +28,22 @@ // ////////////////////////////////////////////////////////////////////// LegDateMap_T::iterator LegDateMap_T::begin () const { - return _flightDateStructure.legDateMapBegin (); + return _legDateHolder.mapBegin (); } // ////////////////////////////////////////////////////////////////////// LegDateMap_T::iterator LegDateMap_T::end () const { - return _flightDateStructure.legDateMapEnd (); + return _legDateHolder.mapEnd (); } // ////////////////////////////////////////////////////////////////////// LegDateMap_T::reverse_iterator LegDateMap_T::rbegin () const { - return _flightDateStructure.legDateMapRBegin (); + return _legDateHolder.mapRBegin (); } // ////////////////////////////////////////////////////////////////////// LegDateMap_T::reverse_iterator LegDateMap_T::rend () const { - return _flightDateStructure.legDateMapREnd (); + return _legDateHolder.mapREnd (); } } Modified: trunk/stdair/stdair/bom/LegDateMap.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDateMap.hpp 2009-10-12 15:13:31 UTC (rev 43) +++ trunk/stdair/stdair/bom/LegDateMap.hpp 2009-10-13 07:52:49 UTC (rev 44) @@ -5,13 +5,15 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/FlightDateTypes.hpp> #include <stdair/bom/LegDateTypes.hpp> namespace stdair { -// Forward declarations + + // Forward declarations template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - + template <typename BOM_STRUCTURE> class BomChildrenHolderImp; + class LegDate; + /** Structure which handles the iterators for a leg-date map. */ struct LegDateMap_T { @@ -26,7 +28,10 @@ typedef BomIterator_T<LegDate, LegDateStructureMap_T::const_reverse_iterator> reverse_iterator; // //////////////////////////////////////////////////... [truncated message content] |