From: <qua...@us...> - 2009-10-06 09:01:19
|
Revision: 27 http://stdair.svn.sourceforge.net/stdair/?rev=27&view=rev Author: quannaus Date: 2009-10-06 09:01:12 +0000 (Tue, 06 Oct 2009) Log Message: ----------- [Dev] Added the itertion methods on the children lists of flight-date. Modified Paths: -------------- trunk/stdair/stdair/bom/FlightDate.hpp trunk/stdair/stdair/bom/Inventory.hpp Modified: trunk/stdair/stdair/bom/FlightDate.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-05 08:42:37 UTC (rev 26) +++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-06 09:01:12 UTC (rev 27) @@ -60,6 +60,31 @@ /** 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::ListConstIterator_T SegmentDateListConstIterator_T; + typedef typename ChildrenBomHolder_T::ListConstReverseIterator_T SegmentDateListConstReverseIterator_T; + 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::MapConstIterator_T SegmentDateMapConstIterator_T; + typedef typename ChildrenBomHolder_T::MapConstReverseIterator_T SegmentDateMapConstReverseIterator_T; + 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::ListConstIterator_T LegDateListConstIterator_T; + typedef typename SecondChildrenBomHolder_T::ListConstReverseIterator_T LegDateListConstReverseIterator_T; + 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::MapConstIterator_T LegDateMapConstIterator_T; + typedef typename SecondChildrenBomHolder_T::MapConstReverseIterator_T LegDateMapConstReverseIterator_T; + typedef typename SecondChildrenBomHolder_T::MapIterator_T LegDateMapIterator_T; + typedef typename SecondChildrenBomHolder_T::MapReverseIterator_T LegDateMapReverseIterator_T; + public: // /////////// Getters ///////////// @@ -165,7 +190,235 @@ assert (_secondChildrenList != NULL); _secondChildrenList->describeFull (ioOut); } + + public: + // /////////// Iteration methods ////////// + /** Initialise the internal const iterator on segment date: + return the const iterator at the begining of the list. */ + SegmentDateListConstIterator_T segmentDateListConstIteratorBegin () const { + assert (_childrenList != NULL); + return _childrenList->listConstIteratorBegin (); + } + /** Initialise the internal const iterator on segment date: + return the const iterator at the end of the list. */ + SegmentDateListConstIterator_T segmentDateListConstIteratorEnd () const { + assert (_childrenList != NULL); + return _childrenList->listConstIteratorEnd (); + } + + /** Initialise the internal const reverse iterator on segment date: + return the const reverse iterator at the rbegining of the list. */ + SegmentDateListConstReverseIterator_T segmentDateListConstIteratorRBegin () const { + assert (_childrenList != NULL); + return _childrenList->listConstIteratorRBegin (); + } + + /** Initialise the internal const reverse iterator on segment date: + return the const reverse iterator at the rend of the list. */ + SegmentDateListConstReverseIterator_T segmentDateListConstIteratorREnd () const { + assert (_childrenList != NULL); + return _childrenList->listConstIteratorREnd (); + } + + /** Initialise the internal iterator on segment date: + return the iterator at the begining of the list. */ + SegmentDateListIterator_T segmentDateListIteratorBegin () const { + assert (_childrenList != NULL); + return _childrenList->listIteratorBegin (); + } + + /** Initialise the internal iterator on segment date: + return the iterator at the end of the list. */ + SegmentDateListIterator_T segmentDateListIteratorEnd () const { + assert (_childrenList != NULL); + return _childrenList->listIteratorEnd (); + } + + /** Initialise the internal reverse iterator on segment date: + return the reverse iterator at the rbegining of the list. */ + SegmentDateListReverseIterator_T segmentDateListIteratorRBegin () const { + assert (_childrenList != NULL); + return _childrenList->listIteratorRBegin (); + } + + /** Initialise the internal reverse iterator on segment date: + return the reverse iterator at the rend of the list. */ + SegmentDateListReverseIterator_T segmentDateListIteratorREnd () const { + assert (_childrenList != NULL); + return _childrenList->listIteratorREnd (); + } + + /** Initialise the internal const iteratorson segment date: + return the const iterator at the begining of the map. */ + SegmentDateMapConstIterator_T segmentDateMapConstIteratorBegin () const { + assert (_childrenList != NULL); + return _childrenList->mapConstIteratorBegin (); + } + + /** Initialise the internal const iterator on segment date: + return the const iterator at the end of the map. */ + SegmentDateMapConstIterator_T segmentDateMapConstIteratorEnd () const { + assert (_childrenList != NULL); + return _childrenList->mapConstIteratorEnd (); + } + + /** Initialise the internal const reverse iterator on segment date: + return the const reverse iterator at the rbegining of the map. */ + SegmentDateMapConstReverseIterator_T segmentDateMapConstIteratorRBegin () const { + assert (_childrenList != NULL); + return _childrenList->mapConstIteratorRBegin (); + } + + /** Initialise the internal const reverse iterator on segment date: + return the const reverse iterator at the rend of the map. */ + SegmentDateMapConstReverseIterator_T segmentDateMapConstIteratorREnd () const { + assert (_childrenList != NULL); + return _childrenList->mapConstIteratorREnd (); + } + + /** Initialise the internal iterator on segment date: + return the iterator at the begining of the map. */ + SegmentDateMapIterator_T segmentDateMapIteratorBegin () const { + assert (_childrenList != NULL); + return _childrenList->mapIteratorBegin (); + } + + /** Initialise the internal iterator on segment date: + return the iterator at the end of the map. */ + SegmentDateMapIterator_T segmentDateMapIteratorEnd () const { + assert (_childrenList != NULL); + return _childrenList->mapIteratorEnd (); + } + + /** Initialise the internal reverse iterator on segment date: + return the reverse iterator at the rbegining of the map. */ + SegmentDateMapReverseIterator_T segmentDateMapIteratorRBegin () const { + assert (_childrenList != NULL); + return _childrenList->mapIteratorRBegin (); + } + + /** Initialise the internal reverse iterator on segment date: + return the reverse iterator at the rend of the map. */ + SegmentDateMapReverseIterator_T segmentDateMapIteratorREnd () const { + assert (_childrenList != NULL); + return _childrenList->mapIteratorREnd (); + } + + + /** Initialise the internal const iterator on leg date: + return the const iterator at the begining of the list. */ + LegDateListConstIterator_T legDateListConstIteratorBegin () const { + assert (_secondChildrenList != NULL); + return _secondChildrenList->listConstIteratorBegin (); + } + + /** Initialise the internal const iterator on leg date: + return the const iterator at the end of the list. */ + LegDateListConstIterator_T legDateListConstIteratorEnd () const { + assert (_secondChildrenList != NULL); + return _secondChildrenList->listConstIteratorEnd (); + } + + /** Initialise the internal const reverse iterator on leg date: + return the const reverse iterator at the rbegining of the list. */ + LegDateListConstReverseIterator_T legDateListConstIteratorRBegin () const { + assert (_secondChildrenList != NULL); + return _secondChildrenList->listConstIteratorRBegin (); + } + + /** Initialise the internal const reverse iterator on leg date: + return the const reverse iterator at the rend of the list. */ + LegDateListConstReverseIterator_T legDateListConstIteratorREnd () const { + assert (_secondChildrenList != NULL); + return _secondChildrenList->listConstIteratorREnd (); + } + + /** Initialise the internal iterator on leg date: + return the iterator at the begining of the list. */ + LegDateListIterator_T legDateListIteratorBegin () const { + assert (_secondChildrenList != NULL); + return _secondChildrenList->listIteratorBegin (); + } + + /** Initialise the internal iterator on leg date: + return the iterator at the end of the list. */ + LegDateListIterator_T legDateListIteratorEnd () const { + assert (_secondChildrenList != NULL); + return _secondChildrenList->listIteratorEnd (); + } + + /** Initialise the internal reverse iterator on leg date: + return the reverse iterator at the rbegining of the list. */ + LegDateListReverseIterator_T legDateListIteratorRBegin () const { + assert (_secondChildrenList != NULL); + return _secondChildrenList->listIteratorRBegin (); + } + + /** Initialise the internal reverse iterator on leg date: + return the reverse iterator at the rend of the list. */ + LegDateListReverseIterator_T legDateListIteratorREnd () const { + assert (_secondChildrenList != NULL); + return _secondChildrenList->listIteratorREnd (); + } + + /** Initialise the internal const iteratorson leg date: + return the const iterator at the begining of the map. */ + LegDateMapConstIterator_T legDateMapConstIteratorBegin () const { + assert (_secondChildrenList != NULL); + return _secondChildrenList->mapConstIteratorBegin (); + } + + /** Initialise the internal const iterator on leg date: + return the const iterator at the end of the map. */ + LegDateMapConstIterator_T legDateMapConstIteratorEnd () const { + assert (_secondChildrenList != NULL); + return _secondChildrenList->mapConstIteratorEnd (); + } + + /** Initialise the internal const reverse iterator on leg date: + return the const reverse iterator at the rbegining of the map. */ + LegDateMapConstReverseIterator_T legDateMapConstIteratorRBegin () const { + assert (_secondChildrenList != NULL); + return _secondChildrenList->mapConstIteratorRBegin (); + } + + /** Initialise the internal const reverse iterator on leg date: + return the const reverse iterator at the rend of the map. */ + LegDateMapConstReverseIterator_T legDateMapConstIteratorREnd () const { + assert (_secondChildrenList != NULL); + return _secondChildrenList->mapConstIteratorREnd (); + } + + /** Initialise the internal iterator on leg date: + return the iterator at the begining of the map. */ + LegDateMapIterator_T legDateMapIteratorBegin () const { + assert (_secondChildrenList != NULL); + return _secondChildrenList->mapIteratorBegin (); + } + + /** Initialise the internal iterator on leg date: + return the iterator at the end of the map. */ + LegDateMapIterator_T legDateMapIteratorEnd () const { + assert (_secondChildrenList != NULL); + return _secondChildrenList->mapIteratorEnd (); + } + + /** Initialise the internal reverse iterator on leg date: + return the reverse iterator at the rbegining of the map. */ + LegDateMapReverseIterator_T legDateMapIteratorRBegin () const { + assert (_secondChildrenList != NULL); + return _secondChildrenList->mapIteratorRBegin (); + } + + /** Initialise the internal reverse iterator on leg date: + return the reverse iterator at the rend of the map. */ + LegDateMapReverseIterator_T legDateMapIteratorREnd () const { + assert (_secondChildrenList != NULL); + return _secondChildrenList->mapIteratorREnd (); + } + + private: /** Constructors are private so as to force the usage of the Factory layer. */ Modified: trunk/stdair/stdair/bom/Inventory.hpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.hpp 2009-10-05 08:42:37 UTC (rev 26) +++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-06 09:01:12 UTC (rev 27) @@ -150,6 +150,7 @@ _childrenList->describeFull (ioOut); } + public: // /////////// Iteration methods ////////// /** Initialise the internal const iterator on flight date: return the const iterator at the begining of the list. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |