From: <qua...@us...> - 2009-10-06 15:14:33
|
Revision: 32 http://stdair.svn.sourceforge.net/stdair/?rev=32&view=rev Author: quannaus Date: 2009-10-06 15:14:27 +0000 (Tue, 06 Oct 2009) Log Message: ----------- [Dev] Removed the BomConstIterator_T. Modified Paths: -------------- trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp trunk/stdair/stdair/bom/BomIterator.hpp trunk/stdair/stdair/bom/FlightDate.hpp trunk/stdair/stdair/bom/Inventory.hpp Modified: trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp =================================================================== --- trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2009-10-06 12:47:57 UTC (rev 31) +++ trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2009-10-06 15:14:27 UTC (rev 32) @@ -31,18 +31,10 @@ typedef std::map<const std::string, BomStructure_T*> BomChildrenList_T; /** Define the different types of iterators. */ - typedef BomConstIterator_T<BOM_CONTENT_CHILD, - typename BomChildrenOrderedList_T::const_iterator> ListConstIterator_T; - typedef BomConstIterator_T<BOM_CONTENT_CHILD, - typename BomChildrenOrderedList_T::const_reverse_iterator> ListConstReverseIterator_T; typedef BomIterator_T<BOM_CONTENT_CHILD, typename BomChildrenOrderedList_T::const_iterator> ListIterator_T; typedef BomIterator_T<BOM_CONTENT_CHILD, typename BomChildrenOrderedList_T::const_reverse_iterator> ListReverseIterator_T; - typedef BomConstIterator_T<BOM_CONTENT_CHILD, - typename BomChildrenList_T::const_iterator> MapConstIterator_T; - typedef BomConstIterator_T<BOM_CONTENT_CHILD, - typename BomChildrenList_T::const_reverse_iterator> MapConstReverseIterator_T; typedef BomIterator_T<BOM_CONTENT_CHILD, typename BomChildrenList_T::const_iterator> MapIterator_T; typedef BomIterator_T<BOM_CONTENT_CHILD, @@ -85,99 +77,51 @@ } // /////////// Iteration methods ////////// - /** Initialise the internal const iterators on bom objects: + /** Initialise the internal iterators on bom objects: return the iterator at the begining of the list. */ - ListConstIterator_T listConstIteratorBegin () const { + ListIterator_T listBegin () { return _bomChildrenOrderedList.begin(); } - /** Initialise the internal const iterators on bom objects: - return the iterator past the end of the list. */ - ListConstIterator_T listConstIteratorEnd () const { - return _bomChildrenOrderedList.end(); - } - - /** Initialise the internal const reverse iterators on bom objects: - return the reverse iterator at the rbegining of the list. */ - ListConstReverseIterator_T listConstIteratorRBegin () const { - return _bomChildrenOrderedList.rbegin(); - } - - /** Initialise the internal const reverse iterators on bom objects: - return the reverse iterator past the rend of the list. */ - ListConstReverseIterator_T listConstIteratorREnd () const { - return _bomChildrenOrderedList.rend(); - } - /** Initialise the internal iterators on bom objects: - return the iterator at the begining of the list. */ - ListIterator_T listIteratorBegin () { - return ListIterator_T(_bomChildrenOrderedList.begin()); - } - - /** Initialise the internal iterators on bom objects: return the iterator past the end of the list. */ - ListIterator_T listIteratorEnd () const { + ListIterator_T listEnd () const { return _bomChildrenOrderedList.end(); } /** Initialise the internal reverse iterators on bom objects: return the reverse iterator at the rbegining of the list. */ - ListReverseIterator_T listIteratorRBegin () const { + ListReverseIterator_T listRBegin () const { return _bomChildrenOrderedList.rbegin(); } /** Initialise the internal reverse iterators on bom objects: return the reverse iterator past the rend of the list. */ - ListReverseIterator_T listIteratorREnd () const { + ListReverseIterator_T listREnd () const { return _bomChildrenOrderedList.rend(); } - /** Initialise the internal const iterators on bom objects: - return the iterator at the begining of the map. */ - MapConstIterator_T mapConstIteratorBegin () const { - return _bomChildrenList.begin(); - } - - /** Initialise the internal const iterators on bom objects: - return the iterator past the end of the map. */ - MapConstIterator_T mapConstIteratorEnd () const { - return _bomChildrenList.end(); - } - - /** Initialise the internal const reverse iterators on bom objects: - return the reverse iterator at the rbegining of the map. */ - MapConstReverseIterator_T mapConstIteratorRBegin () const { - return _bomChildrenList.rbegin(); - } - - /** Initialise the internal const reverse iterators on bom objects: - return the reverse iterator past the rend of the map. */ - MapConstReverseIterator_T mapConstIteratorREnd () const { - return _bomChildrenList.rend(); - } - /** Initialise the internal iterators on bom objects: return the iterator at the begining of the map. */ - MapIterator_T mapIteratorBegin () const { + MapIterator_T mapBegin () const { return _bomChildrenList.begin(); } /** Initialise the internal iterators on bom objects: return the iterator past the end of the map. */ - MapIterator_T mapIteratorEnd () const { + MapIterator_T mapEnd () const { return _bomChildrenList.end(); } /** Initialise the internal reverse iterators on bom objects: return the reverse iterator at the rbegining of the map. */ - MapReverseIterator_T mapIteratorRBegin () const { + MapReverseIterator_T mapRBegin () const { return _bomChildrenList.rbegin(); } /** Initialise the internal reverse iterators on bom objects: return the reverse iterator past the rend of the map. */ - MapReverseIterator_T mapIteratorREnd () const { + MapReverseIterator_T mapREnd () const { return _bomChildrenList.rend(); } Modified: trunk/stdair/stdair/bom/BomIterator.hpp =================================================================== --- trunk/stdair/stdair/bom/BomIterator.hpp 2009-10-06 12:47:57 UTC (rev 31) +++ trunk/stdair/stdair/bom/BomIterator.hpp 2009-10-06 15:14:27 UTC (rev 32) @@ -18,23 +18,33 @@ <br> This class aimed at implementing the "normal" operators except ones that needs to return a specific type (const/non-const) of iterator. */ - template <typename ITERATOR> - struct BomIteratorAbstract { + template <typename BOM_CONTENT, typename ITERATOR> + struct BomIterator_T { + public: + // Definition allowing to retrieve the corresponding bom structure. + typedef typename BOM_CONTENT::BomStructure_T BomStructure_T; + + // Define the pair of string and pointer of BOM_CONTENT. + typedef typename std::pair<std::string, BOM_CONTENT*> value_type; + + // Definition allowing the retrieve the difference type of the ITERATOR. + typedef typename ITERATOR::difference_type difference_type; + protected: /** Normal constructor. */ - BomIteratorAbstract (ITERATOR iIterator) + BomIterator_T (ITERATOR iIterator) : _itBomStructureObject (iIterator) { } /** Default constructor. */ - BomIteratorAbstract () { } + BomIterator_T () { } /** Default copy constructor. */ - BomIteratorAbstract (const BomIteratorAbstract& iBomIterator) + BomIterator_T (const BomIterator_T& iBomIterator) : _itBomStructureObject (iBomIterator._itBomStructureObject) { } /** Destructor. */ - ~BomIteratorAbstract() { } + ~BomIterator_T() { } public: // ///////////// Operators ////////////// @@ -47,210 +57,47 @@ void operator-- (int) { --_itBomStructureObject; } /** Equality operators. */ - bool operator== (const BomIteratorAbstract& iIt) { + bool operator== (const BomIterator_T& iIt) { return _itBomStructureObject == iIt._itBomStructureObject; } - bool operator!= (const BomIteratorAbstract& iIt) { + bool operator!= (const BomIterator_T& iIt) { return _itBomStructureObject != iIt._itBomStructureObject; } /** Relational operators. */ - bool operator< (const BomIteratorAbstract& iIt) { + bool operator< (const BomIterator_T& iIt) { return _itBomStructureObject < iIt._itBomStructureObject; } - bool operator> (const BomIteratorAbstract& iIt) { + bool operator> (const BomIterator_T& iIt) { return _itBomStructureObject > iIt._itBomStructureObject; } - bool operator<= (const BomIteratorAbstract& iIt) { + bool operator<= (const BomIterator_T& iIt) { return _itBomStructureObject <= iIt._itBomStructureObject; } - bool operator>= (const BomIteratorAbstract& iIt) { + bool operator>= (const BomIterator_T& iIt) { return _itBomStructureObject >= iIt._itBomStructureObject; } - - public: - ///////////// Attributes ////////////// - /** Iterator for the current BOM structure on the non-ordered list. */ - ITERATOR _itBomStructureObject; - - }; - - - /** - Operators for BomIteratorAbstract that need to be implemented outside - of BomIteratorAbstract scope. - */ - template<typename ITERATOR> - inline typename ITERATOR::difference_type - operator-(const BomIteratorAbstract<ITERATOR>& l, - const BomIteratorAbstract<ITERATOR>& r) { - return l._itBomStructureObject - r._itBomStructureObject; - } - - - /** Template class aimed at iterating a list or a map of children BOM - structure of a dedicated type using const iterators. - <br> This class aimed at implementing the specific operators for - const iterators. - */ - template <typename BOM_CONTENT, typename ITERATOR> - struct BomConstIterator_T : public BomIteratorAbstract<ITERATOR> { - - public: - // Definition allowing to retrieve the parent type. - typedef BomIteratorAbstract<ITERATOR> Parent_T; - - // Definition allowing to retrieve the corresponding bom structure. - typedef typename BOM_CONTENT::BomStructure_T BomStructure_T; - - // Define the pair of string and pointer of BOM_CONTENT. - typedef typename std::pair<std::string, const BOM_CONTENT*> value_type; - - // Definition allowing the retrieve the difference type of the ITERATOR. - typedef typename ITERATOR::difference_type difference_type; - - public: - /** Normal constructor. */ - BomConstIterator_T (ITERATOR iIterator) : Parent_T (iIterator) { } - - /** Default constructor. */ - BomConstIterator_T () { } - - /** Default copy constructor. */ - BomConstIterator_T (const BomConstIterator_T& iBomIterator) - : Parent_T (iBomIterator.Parent_T::_itBomStructureObject) { } - - /** Destructor. */ - ~BomConstIterator_T() { } - - public: - // ////////////// Additive Operators /////////////// - BomConstIterator_T operator+ (const difference_type iIndex) { - return BomConstIterator_T(Parent_T::_itBomStructureObject + iIndex); - } - BomConstIterator_T& operator+= (const difference_type iIndex) { - Parent_T::_itBomStructureObject += iIndex; - return *this; - } - BomConstIterator_T operator- (const difference_type iIndex) { - return BomConstIterator_T(Parent_T::_itBomStructureObject - iIndex); - } - BomConstIterator_T& operator-= (const difference_type iIndex) { - Parent_T::_itBomStructureObject -= iIndex; - return *this; - } - - // ////////////// Dereferencing Operators ////////////// - /** Dereferencing operator for iterators on a list. */ - const BOM_CONTENT& operator* () { - const BomStructure_T* lBomStruct_ptr = *Parent_T::_itBomStructureObject; - assert (lBomStruct_ptr != NULL); - BOM_CONTENT* lBomContent_ptr = - BomStructure::getBomContentPtr<BOM_CONTENT> (*lBomStruct_ptr); - assert (lBomContent_ptr != NULL); - return *lBomContent_ptr; - } - - /** Dereferencing operator for iterators on a map. */ - value_type* operator-> () { - const MapKey_T& lKey = Parent_T::_itBomStructureObject->first; - const BomStructure_T* lBomStruct_ptr = - Parent_T::_itBomStructureObject->second; - assert (lBomStruct_ptr != NULL); - BOM_CONTENT* lBomContent_ptr = - BomStructure::getBomContentPtr<BOM_CONTENT> (*lBomStruct_ptr); - assert (lBomContent_ptr != NULL); - - // See the comment below, at the definition of the _intermediateValue - // attribute - _intermediateValue.first = lKey; - _intermediateValue.second = lBomContent_ptr; - - return &_intermediateValue; - } - - protected: - /** Helper attribute. - <br>It is necessary to define that value at the attribute - level, because the operator->() method needs to return a - pointer on it. If that value be temporary, i.e., created at - the fly when the operator->() method returns, we would return - a pointer on a temporary value, which is not good. */ - value_type _intermediateValue; - - }; - - /** - Operators for BomConstIterator_T that need to be implemented outside - of BomConstIterator_T scope. - */ - template<typename BOM_CONTENT, typename ITERATOR> - inline BomConstIterator_T<BOM_CONTENT, ITERATOR> - operator+(const typename ITERATOR::difference_type n, - const BomConstIterator_T<BOM_CONTENT, ITERATOR>& r) { - // Definition allowing to retrieve the Parent_T of BomConstIterator_T. - typedef typename BomConstIterator_T<BOM_CONTENT,ITERATOR>::Parent_T Parent_T; - return BomConstIterator_T<BOM_CONTENT, ITERATOR> - (n+r.Parent_T::_itBomStructureObject); - } - - /** Template class aimed at iterating a list or a map of children BOM - structure of a dedicated type using non-const iterators. - <br> This class aimed at implementing the specific operators for - non-const iterators. - */ - template <typename BOM_CONTENT, typename ITERATOR> - struct BomIterator_T : public BomIteratorAbstract<ITERATOR> { - - public: - // Definition allowing to retrieve the parent type. - typedef BomIteratorAbstract<ITERATOR> Parent_T; - - // Definition allowing to retrieve the corresponding bom structure. - typedef typename BOM_CONTENT::BomStructure_T BomStructure_T; - - // Define the pair of string and pointer of BOM_CONTENT. - typedef typename std::pair<std::string, BOM_CONTENT*> value_type; - - // Definition allowing the retrieve the difference type of the ITERATOR. - typedef typename ITERATOR::difference_type difference_type; - - public: - /** Normal constructor. */ - BomIterator_T (ITERATOR iIterator) : Parent_T (iIterator) { } - - /** Default constructor. */ - BomIterator_T () { } - - /** Default copy constructor. */ - BomIterator_T (const BomIterator_T& iBomIterator) - : Parent_T (iBomIterator.Parent_T::_itBomStructureObject) { } - - /** Destructor. */ - ~BomIterator_T() { } - - public: - // ////////////// Additive Operators /////////////// + /** Additive Operators. */ BomIterator_T operator+ (const difference_type iIndex) { - return BomIterator_T(Parent_T::_itBomStructureObject + iIndex); + return BomIterator_T(_itBomStructureObject + iIndex); } BomIterator_T& operator+= (const difference_type iIndex) { - Parent_T::_itBomStructureObject += iIndex; + _itBomStructureObject += iIndex; return *this; } BomIterator_T operator- (const difference_type iIndex) { - return BomIterator_T(Parent_T::_itBomStructureObject - iIndex); + return BomIterator_T(_itBomStructureObject - iIndex); } BomIterator_T& operator-= (const difference_type iIndex) { - Parent_T::_itBomStructureObject -= iIndex; + _itBomStructureObject -= iIndex; return *this; } - + // ////////////// Dereferencing Operators ////////////// /** Dereferencing operator for iterators on a list. */ BOM_CONTENT& operator* () { - const BomStructure_T* lBomStruct_ptr = *Parent_T::_itBomStructureObject; + const BomStructure_T* lBomStruct_ptr = *_itBomStructureObject; assert (lBomStruct_ptr != NULL); BOM_CONTENT* lBomContent_ptr = BomStructure::getBomContentPtr<BOM_CONTENT> (*lBomStruct_ptr); @@ -260,9 +107,9 @@ /** Dereferencing operator for iterators on a map. */ value_type* operator-> () { - const MapKey_T& lKey = Parent_T::_itBomStructureObject->first; + const MapKey_T& lKey = _itBomStructureObject->first; const BomStructure_T* lBomStruct_ptr = - Parent_T::_itBomStructureObject->second; + _itBomStructureObject->second; assert (lBomStruct_ptr != NULL); BOM_CONTENT* lBomContent_ptr = BomStructure::getBomContentPtr<BOM_CONTENT> (*lBomStruct_ptr); @@ -276,7 +123,11 @@ return &_intermediateValue; } - protected: + private: + ///////////// Attributes ////////////// + /** Iterator for the current BOM structure on the non-ordered list. */ + ITERATOR _itBomStructureObject; + /** Helper attribute. <br>It is necessary to define that value at the attribute level, because the operator->() method needs to return a @@ -287,19 +138,27 @@ }; + /** Operators for BomIterator_T that need to be implemented outside of BomIterator_T scope. */ template<typename BOM_CONTENT, typename ITERATOR> + inline typename ITERATOR::difference_type + operator-(const BomIterator_T<BOM_CONTENT, ITERATOR>& l, + const BomIterator_T<BOM_CONTENT, ITERATOR>& r) { + return l._itBomStructureObject - r._itBomStructureObject; + } + + template<typename BOM_CONTENT, typename ITERATOR> inline BomIterator_T<BOM_CONTENT, ITERATOR> operator+(const typename ITERATOR::difference_type n, const BomIterator_T<BOM_CONTENT, ITERATOR>& r) { // Definition allowing to retrieve the Parent_T of BomIterator_T. typedef typename BomIterator_T<BOM_CONTENT,ITERATOR>::Parent_T Parent_T; return BomIterator_T<BOM_CONTENT, ITERATOR> - (n+r.Parent_T::_itBomStructureObject); + (n+r._itBomStructureObject); } - + } #endif // __STDAIR_BOM_BOMITERATOR_T_HPP Modified: trunk/stdair/stdair/bom/FlightDate.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-06 12:47:57 UTC (rev 31) +++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-06 15:14:27 UTC (rev 32) @@ -62,26 +62,18 @@ 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; @@ -193,229 +185,117 @@ 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 { + SegmentDateListIterator_T segmentDateListBegin () const { assert (_childrenList != NULL); - return _childrenList->listIteratorBegin (); + return _childrenList->listBegin (); } /** Initialise the internal iterator on segment date: return the iterator at the end of the list. */ - SegmentDateListIterator_T segmentDateListIteratorEnd () const { + SegmentDateListIterator_T segmentDateListEnd () const { assert (_childrenList != NULL); - return _childrenList->listIteratorEnd (); + return _childrenList->listEnd (); } /** Initialise the internal reverse iterator on segment date: return the reverse iterator at the rbegining of the list. */ - SegmentDateListReverseIterator_T segmentDateListIteratorRBegin () const { + SegmentDateListReverseIterator_T segmentDateListRBegin () const { assert (_childrenList != NULL); - return _childrenList->listIteratorRBegin (); + return _childrenList->listRBegin (); } /** Initialise the internal reverse iterator on segment date: return the reverse iterator at the rend of the list. */ - SegmentDateListReverseIterator_T segmentDateListIteratorREnd () const { + SegmentDateListReverseIterator_T segmentDateListREnd () const { assert (_childrenList != NULL); - return _childrenList->listIteratorREnd (); + return _childrenList->listREnd (); } - /** 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 { + SegmentDateMapIterator_T segmentDateMapBegin () const { assert (_childrenList != NULL); - return _childrenList->mapIteratorBegin (); + return _childrenList->mapBegin (); } /** Initialise the internal iterator on segment date: return the iterator at the end of the map. */ - SegmentDateMapIterator_T segmentDateMapIteratorEnd () const { + SegmentDateMapIterator_T segmentDateMapEnd () const { assert (_childrenList != NULL); - return _childrenList->mapIteratorEnd (); + return _childrenList->mapEnd (); } /** Initialise the internal reverse iterator on segment date: return the reverse iterator at the rbegining of the map. */ - SegmentDateMapReverseIterator_T segmentDateMapIteratorRBegin () const { + SegmentDateMapReverseIterator_T segmentDateMapRBegin () const { assert (_childrenList != NULL); - return _childrenList->mapIteratorRBegin (); + return _childrenList->mapRBegin (); } /** Initialise the internal reverse iterator on segment date: return the reverse iterator at the rend of the map. */ - SegmentDateMapReverseIterator_T segmentDateMapIteratorREnd () const { + SegmentDateMapReverseIterator_T segmentDateMapREnd () const { assert (_childrenList != NULL); - return _childrenList->mapIteratorREnd (); + return _childrenList->mapREnd (); } - /** 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 { + LegDateListIterator_T legDateListBegin () const { assert (_secondChildrenList != NULL); - return _secondChildrenList->listIteratorBegin (); + return _secondChildrenList->listBegin (); } /** Initialise the internal iterator on leg date: return the iterator at the end of the list. */ - LegDateListIterator_T legDateListIteratorEnd () const { + LegDateListIterator_T legDateListEnd () const { assert (_secondChildrenList != NULL); - return _secondChildrenList->listIteratorEnd (); + return _secondChildrenList->listEnd (); } /** Initialise the internal reverse iterator on leg date: return the reverse iterator at the rbegining of the list. */ - LegDateListReverseIterator_T legDateListIteratorRBegin () const { + LegDateListReverseIterator_T legDateListRBegin () const { assert (_secondChildrenList != NULL); - return _secondChildrenList->listIteratorRBegin (); + return _secondChildrenList->listRBegin (); } /** Initialise the internal reverse iterator on leg date: return the reverse iterator at the rend of the list. */ - LegDateListReverseIterator_T legDateListIteratorREnd () const { + LegDateListReverseIterator_T legDateListREnd () const { assert (_secondChildrenList != NULL); - return _secondChildrenList->listIteratorREnd (); + return _secondChildrenList->listREnd (); } - /** 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 { + LegDateMapIterator_T legDateMapBegin () const { assert (_secondChildrenList != NULL); - return _secondChildrenList->mapIteratorBegin (); + return _secondChildrenList->mapBegin (); } /** Initialise the internal iterator on leg date: return the iterator at the end of the map. */ - LegDateMapIterator_T legDateMapIteratorEnd () const { + LegDateMapIterator_T legDateMapEnd () const { assert (_secondChildrenList != NULL); - return _secondChildrenList->mapIteratorEnd (); + return _secondChildrenList->mapEnd (); } /** Initialise the internal reverse iterator on leg date: return the reverse iterator at the rbegining of the map. */ - LegDateMapReverseIterator_T legDateMapIteratorRBegin () const { + LegDateMapReverseIterator_T legDateMapRBegin () const { assert (_secondChildrenList != NULL); - return _secondChildrenList->mapIteratorRBegin (); + return _secondChildrenList->mapRBegin (); } /** Initialise the internal reverse iterator on leg date: return the reverse iterator at the rend of the map. */ - LegDateMapReverseIterator_T legDateMapIteratorREnd () const { + LegDateMapReverseIterator_T legDateMapREnd () const { assert (_secondChildrenList != NULL); - return _secondChildrenList->mapIteratorREnd (); + return _secondChildrenList->mapREnd (); } Modified: trunk/stdair/stdair/bom/Inventory.hpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.hpp 2009-10-06 12:47:57 UTC (rev 31) +++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-06 15:14:27 UTC (rev 32) @@ -58,14 +58,10 @@ typedef BomChildrenHolderImp<ContentChild_T> ChildrenBomHolder_T; /** Define the iterators of the flight-date list. */ - typedef typename ChildrenBomHolder_T::ListConstIterator_T FlightDateListConstIterator_T; - typedef typename ChildrenBomHolder_T::ListConstReverseIterator_T FlightDateListConstReverseIterator_T; 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::MapConstIterator_T FlightDateMapConstIterator_T; - typedef typename ChildrenBomHolder_T::MapConstReverseIterator_T FlightDateMapConstReverseIterator_T; typedef typename ChildrenBomHolder_T::MapIterator_T FlightDateMapIterator_T; typedef typename ChildrenBomHolder_T::MapReverseIterator_T FlightDateMapReverseIterator_T; @@ -153,116 +149,60 @@ public: // /////////// Iteration methods ////////// - /** Initialise the internal const iterator on flight date: - return the const iterator at the begining of the list. */ - FlightDateListConstIterator_T flightDateListConstIteratorBegin () const { - assert (_childrenList != NULL); - return _childrenList->listConstIteratorBegin (); - } - - /** Initialise the internal const iterator on flight date: - return the const iterator at the end of the list. */ - FlightDateListConstIterator_T flightDateListConstIteratorEnd () const { - assert (_childrenList != NULL); - return _childrenList->listConstIteratorEnd (); - } - - /** Initialise the internal const reverse iterator on flight date: - return the const reverse iterator at the rbegining of the list. */ - FlightDateListConstReverseIterator_T flightDateListConstIteratorRBegin () const { - assert (_childrenList != NULL); - return _childrenList->listConstIteratorRBegin (); - } - - /** Initialise the internal const reverse iterator on flight date: - return the const reverse iterator at the rend of the list. */ - FlightDateListConstReverseIterator_T flightDateListConstIteratorREnd () const { - assert (_childrenList != NULL); - return _childrenList->listConstIteratorREnd (); - } - /** Initialise the internal iterator on flight date: return the iterator at the begining of the list. */ - FlightDateListIterator_T flightDateListIteratorBegin () const { + FlightDateListIterator_T flightDateListBegin () const { assert (_childrenList != NULL); - return _childrenList->listIteratorBegin (); + return _childrenList->listBegin (); } /** Initialise the internal iterator on flight date: return the iterator at the end of the list. */ - FlightDateListIterator_T flightDateListIteratorEnd () const { + FlightDateListIterator_T flightDateListEnd () const { assert (_childrenList != NULL); - return _childrenList->listIteratorEnd (); + return _childrenList->listEnd (); } /** Initialise the internal reverse iterator on flight date: return the reverse iterator at the rbegining of the list. */ - FlightDateListReverseIterator_T flightDateListIteratorRBegin () const { + FlightDateListReverseIterator_T flightDateListRBegin () const { assert (_childrenList != NULL); - return _childrenList->listIteratorRBegin (); + return _childrenList->listRBegin (); } /** Initialise the internal reverse iterator on flight date: return the reverse iterator at the rend of the list. */ - FlightDateListReverseIterator_T flightDateListIteratorREnd () const { + FlightDateListReverseIterator_T flightDateListREnd () const { assert (_childrenList != NULL); - return _childrenList->listIteratorREnd (); + return _childrenList->listREnd (); } - /** Initialise the internal const iteratorson flight date: - return the const iterator at the begining of the map. */ - FlightDateMapConstIterator_T flightDateMapConstIteratorBegin () const { - assert (_childrenList != NULL); - return _childrenList->mapConstIteratorBegin (); - } - - /** Initialise the internal const iterator on flight date: - return the const iterator at the end of the map. */ - FlightDateMapConstIterator_T flightDateMapConstIteratorEnd () const { - assert (_childrenList != NULL); - return _childrenList->mapConstIteratorEnd (); - } - - /** Initialise the internal const reverse iterator on flight date: - return the const reverse iterator at the rbegining of the map. */ - FlightDateMapConstReverseIterator_T flightDateMapConstIteratorRBegin () const { - assert (_childrenList != NULL); - return _childrenList->mapConstIteratorRBegin (); - } - - /** Initialise the internal const reverse iterator on flight date: - return the const reverse iterator at the rend of the map. */ - FlightDateMapConstReverseIterator_T flightDateMapConstIteratorREnd () const { - assert (_childrenList != NULL); - return _childrenList->mapConstIteratorREnd (); - } - /** Initialise the internal iterator on flight date: return the iterator at the begining of the map. */ - FlightDateMapIterator_T flightDateMapIteratorBegin () const { + FlightDateMapIterator_T flightDateMapBegin () const { assert (_childrenList != NULL); - return _childrenList->mapIteratorBegin (); + return _childrenList->mapBegin (); } /** Initialise the internal iterator on flight date: return the iterator at the end of the map. */ - FlightDateMapIterator_T flightDateMapIteratorEnd () const { + FlightDateMapIterator_T flightDateMapEnd () const { assert (_childrenList != NULL); - return _childrenList->mapIteratorEnd (); + return _childrenList->mapEnd (); } /** Initialise the internal reverse iterator on flight date: return the reverse iterator at the rbegining of the map. */ - FlightDateMapReverseIterator_T flightDateMapIteratorRBegin () const { + FlightDateMapReverseIterator_T flightDateMapRBegin () const { assert (_childrenList != NULL); - return _childrenList->mapIteratorRBegin (); + return _childrenList->mapRBegin (); } /** Initialise the internal reverse iterator on flight date: return the reverse iterator at the rend of the map. */ - FlightDateMapReverseIterator_T flightDateMapIteratorREnd () const { + FlightDateMapReverseIterator_T flightDateMapREnd () const { assert (_childrenList != NULL); - return _childrenList->mapIteratorREnd (); + return _childrenList->mapREnd (); } private: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |