From: <qua...@us...> - 2009-10-02 09:34:36
|
Revision: 10 http://stdair.svn.sourceforge.net/stdair/?rev=10&view=rev Author: quannaus Date: 2009-10-02 09:34:26 +0000 (Fri, 02 Oct 2009) Log Message: ----------- Added the non-const iterators and the functions for these iterators in Inventory and BomChildrenHolderImp. Modified Paths: -------------- trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp trunk/stdair/stdair/bom/BomIterator.hpp trunk/stdair/stdair/bom/Inventory.hpp Modified: trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp =================================================================== --- trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2009-10-02 08:32:09 UTC (rev 9) +++ trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2009-10-02 09:34:26 UTC (rev 10) @@ -34,7 +34,19 @@ 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::iterator> ListIterator_T; + typedef BomIterator_T<BOM_CONTENT_CHILD, + typename BomChildrenOrderedList_T::_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::iterator> MapIterator_T; + typedef BomIterator_T<BOM_CONTENT_CHILD, + typename BomChildrenList_T::_reverse_iterator> MapReverseIterator_T; public: // /////////// Display support methods ///////// @@ -83,8 +95,44 @@ 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 () const { + return _bomChildrenOrderedList.begin(); + } + + /** Initialise the internal iterators on bom objects: + return the iterator past the end of the list. */ + ListIterator_T listIteratorEnd () 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 { + 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 { + return _bomChildrenOrderedList.rend(); + } + /** Initialise the internal const iterators on bom objects: return the iterator at the begining of the map. */ MapConstIterator_T mapConstIteratorBegin () const { @@ -95,8 +143,44 @@ 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 { + return _bomChildrenList.begin(); + } + + /** Initialise the internal iterators on bom objects: + return the iterator past the end of the map. */ + MapIterator_T mapIteratorEnd () 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 { + 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 { + return _bomChildrenList.rend(); + } + private: /** Constructors are private so as to force the usage of the Factory layer. */ Modified: trunk/stdair/stdair/bom/BomIterator.hpp =================================================================== --- trunk/stdair/stdair/bom/BomIterator.hpp 2009-10-02 08:32:09 UTC (rev 9) +++ trunk/stdair/stdair/bom/BomIterator.hpp 2009-10-02 09:34:26 UTC (rev 10) @@ -22,8 +22,6 @@ struct BomIteratorAbstract { protected: - /** Constructors are private so as to force the usage of the Factory - layer. */ /** Normal constructor. */ BomIteratorAbstract (ITERATOR iIterator) : _itBomStructureObject (iIterator) { } @@ -113,8 +111,6 @@ typedef typename ITERATOR::difference_type difference_type; public: - /** Constructors are private so as to force the usage of the Factory - layer. */ /** Normal constructor. */ BomConstIterator_T (ITERATOR iIterator) : Parent_T (iIterator) { } @@ -199,5 +195,111 @@ (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._itBomStructureObject) { } + + /** Destructor. */ + ~BomIterator_T() { } + + public: + // ////////////// Additive Operators /////////////// + BomIterator_T operator+ (const difference_type iIndex) { + return BomIterator_T(Parent_T::_itBomStructureObject + iIndex); + } + BomIterator_T& operator+= (const difference_type iIndex) { + Parent_T::_itBomStructureObject += iIndex; + return *this; + } + BomIterator_T operator- (const difference_type iIndex) { + return BomIterator_T(Parent_T::_itBomStructureObject - iIndex); + } + BomIterator_T& operator-= (const difference_type iIndex) { + Parent_T::_itBomStructureObject -= iIndex; + return *this; + } + + // ////////////// Dereferencing Operators ////////////// + /** Dereferencing operator for iterators on a list. */ + BOM_CONTENT& operator* () { + 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; + 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 BomIterator_T that need to be implemented outside + of BomIterator_T scope. + */ + 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); + } + } #endif // __STDAIR_BOM_BOMITERATOR_T_HPP Modified: trunk/stdair/stdair/bom/Inventory.hpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.hpp 2009-10-02 08:32:09 UTC (rev 9) +++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-02 09:34:26 UTC (rev 10) @@ -56,11 +56,17 @@ /** Define the children bom holder type. */ typedef BomChildrenHolderImp<ContentChild_T> ChildrenBomHolder_T; - /** Define the iterator of the flight-date list. */ + /** 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 iterator of the flight-date map. */ + /** 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; public: // /////////// Getters ///////////// @@ -158,7 +164,49 @@ 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 { + assert (_childrenList != NULL); + return _childrenList->listIteratorBegin (); + } + + /** Initialise the internal iterator on flight date: + return the iterator at the end of the list. */ + FlightDateListIterator_T flightDateListIteratorEnd () const { + assert (_childrenList != NULL); + return _childrenList->listIteratorEnd (); + } + + /** Initialise the internal reverse iterator on flight date: + return the reverse iterator at the rbegining of the list. */ + FlightDateListReverseIterator_T flightDateListIteratorRBegin () const { + assert (_childrenList != NULL); + return _childrenList->listIteratorRBegin (); + } + + /** Initialise the internal reverse iterator on flight date: + return the reverse iterator at the rend of the list. */ + FlightDateListReverseIterator_T flightDateListIteratorREnd () const { + assert (_childrenList != NULL); + return _childrenList->listIteratorREnd (); + } + /** Initialise the internal const iteratorson flight date: return the const iterator at the begining of the map. */ FlightDateMapConstIterator_T flightDateMapConstIteratorBegin () const { @@ -171,8 +219,50 @@ 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 { + assert (_childrenList != NULL); + return _childrenList->mapIteratorBegin (); + } + + /** Initialise the internal iterator on flight date: + return the iterator at the end of the map. */ + FlightDateMapIterator_T flightDateMapIteratorEnd () const { + assert (_childrenList != NULL); + return _childrenList->mapIteratorEnd (); + } + + /** Initialise the internal reverse iterator on flight date: + return the reverse iterator at the rbegining of the map. */ + FlightDateMapReverseIterator_T flightDateMapIteratorRBegin () const { + assert (_childrenList != NULL); + return _childrenList->mapIteratorRBegin (); + } + + /** Initialise the internal reverse iterator on flight date: + return the reverse iterator at the rend of the map. */ + FlightDateMapReverseIterator_T flightDateMapIteratorREnd () const { + assert (_childrenList != NULL); + return _childrenList->mapIteratorREnd (); + } + private: /** Constructors are private so as to force the usage of the Factory layer. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2009-10-02 13:14:05
|
Revision: 14 http://stdair.svn.sourceforge.net/stdair/?rev=14&view=rev Author: quannaus Date: 2009-10-02 13:13:59 +0000 (Fri, 02 Oct 2009) Log Message: ----------- Small change in some functions. Modified Paths: -------------- trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp trunk/stdair/stdair/bom/BomIterator.hpp Modified: trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp =================================================================== --- trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2009-10-02 13:07:47 UTC (rev 13) +++ trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2009-10-02 13:13:59 UTC (rev 14) @@ -112,7 +112,7 @@ /** Initialise the internal iterators on bom objects: return the iterator at the begining of the list. */ ListIterator_T listIteratorBegin () const { - return ListIterator_T(_bomChildrenOrderedList.begin()); + return _bomChildrenOrderedList.begin(); } /** Initialise the internal iterators on bom objects: Modified: trunk/stdair/stdair/bom/BomIterator.hpp =================================================================== --- trunk/stdair/stdair/bom/BomIterator.hpp 2009-10-02 13:07:47 UTC (rev 13) +++ trunk/stdair/stdair/bom/BomIterator.hpp 2009-10-02 13:13:59 UTC (rev 14) @@ -112,8 +112,7 @@ public: /** Normal constructor. */ - BomConstIterator_T (ITERATOR iIterator) - : Parent_T (iIterator) { } + BomConstIterator_T (ITERATOR iIterator) : Parent_T (iIterator) { } /** Default constructor. */ BomConstIterator_T () { } @@ -218,8 +217,7 @@ public: /** Normal constructor. */ - BomIterator_T (ITERATOR iIterator) - : Parent_T (iIterator) { } + BomIterator_T (ITERATOR iIterator) : Parent_T (iIterator) { } /** Default constructor. */ BomIterator_T () { } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2009-10-04 10:33:59
|
Revision: 20 http://stdair.svn.sourceforge.net/stdair/?rev=20&view=rev Author: denis_arnaud Date: 2009-10-04 10:33:47 +0000 (Sun, 04 Oct 2009) Log Message: ----------- [Dev] Suppressed the useless implementation files (.cpp) from the BOM layer. Modified Paths: -------------- trunk/stdair/stdair/bom/sources.mk Removed Paths: ------------- trunk/stdair/stdair/bom/BomContent.cpp trunk/stdair/stdair/bom/BomKey.cpp trunk/stdair/stdair/bom/BomStructure.cpp Deleted: trunk/stdair/stdair/bom/BomContent.cpp =================================================================== --- trunk/stdair/stdair/bom/BomContent.cpp 2009-10-02 14:07:12 UTC (rev 19) +++ trunk/stdair/stdair/bom/BomContent.cpp 2009-10-04 10:33:47 UTC (rev 20) @@ -1,9 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/bom/BomContent.hpp> - -namespace stdair { - -} Deleted: trunk/stdair/stdair/bom/BomKey.cpp =================================================================== --- trunk/stdair/stdair/bom/BomKey.cpp 2009-10-02 14:07:12 UTC (rev 19) +++ trunk/stdair/stdair/bom/BomKey.cpp 2009-10-04 10:33:47 UTC (rev 20) @@ -1,9 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/bom/BomKey.hpp> - -namespace stdair { - -} Deleted: trunk/stdair/stdair/bom/BomStructure.cpp =================================================================== --- trunk/stdair/stdair/bom/BomStructure.cpp 2009-10-02 14:07:12 UTC (rev 19) +++ trunk/stdair/stdair/bom/BomStructure.cpp 2009-10-04 10:33:47 UTC (rev 20) @@ -1,9 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/bom/BomStructure.hpp> - -namespace stdair { - -} Modified: trunk/stdair/stdair/bom/sources.mk =================================================================== --- trunk/stdair/stdair/bom/sources.mk 2009-10-02 14:07:12 UTC (rev 19) +++ trunk/stdair/stdair/bom/sources.mk 2009-10-04 10:33:47 UTC (rev 20) @@ -22,7 +22,5 @@ $(top_srcdir)/stdair/bom/BomContentRoot.hpp \ $(top_srcdir)/stdair/bom/BomContentDummy.hpp \ $(top_srcdir)/stdair/bom/BomIterator.hpp -bom_cc_sources = \ - $(top_srcdir)/stdair/bom/BomKey.cpp \ - $(top_srcdir)/stdair/bom/BomStructure.cpp \ - $(top_srcdir)/stdair/bom/BomContent.cpp +bom_cc_sources = + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2009-10-05 08:07:50
|
Revision: 21 http://stdair.svn.sourceforge.net/stdair/?rev=21&view=rev Author: quannaus Date: 2009-10-05 08:07:44 +0000 (Mon, 05 Oct 2009) Log Message: ----------- [Dev] Some small changes. Modified Paths: -------------- trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp trunk/stdair/stdair/bom/BomIterator.hpp Modified: trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp =================================================================== --- trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2009-10-04 10:33:47 UTC (rev 20) +++ trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2009-10-05 08:07:44 UTC (rev 21) @@ -36,17 +36,17 @@ typedef BomConstIterator_T<BOM_CONTENT_CHILD, typename BomChildrenOrderedList_T::const_reverse_iterator> ListConstReverseIterator_T; typedef BomIterator_T<BOM_CONTENT_CHILD, - typename BomChildrenOrderedList_T::iterator> ListIterator_T; + typename BomChildrenOrderedList_T::const_iterator> ListIterator_T; typedef BomIterator_T<BOM_CONTENT_CHILD, - typename BomChildrenOrderedList_T::reverse_iterator> ListReverseIterator_T; + 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::iterator> MapIterator_T; + typename BomChildrenList_T::const_iterator> MapIterator_T; typedef BomIterator_T<BOM_CONTENT_CHILD, - typename BomChildrenList_T::reverse_iterator> MapReverseIterator_T; + typename BomChildrenList_T::const_reverse_iterator> MapReverseIterator_T; public: // /////////// Display support methods ///////// @@ -112,11 +112,7 @@ /** Initialise the internal iterators on bom objects: return the iterator at the begining of the list. */ ListIterator_T listIteratorBegin () { - typename BomChildrenOrderedList_T::iterator it = - _bomChildrenOrderedList.begin(); - typename BomChildrenOrderedList_T::const_iterator it2 = - _bomChildrenOrderedList.begin(); - return ListIterator_T (it); + return _bomChildrenOrderedList.begin(); } /** Initialise the internal iterators on bom objects: Modified: trunk/stdair/stdair/bom/BomIterator.hpp =================================================================== --- trunk/stdair/stdair/bom/BomIterator.hpp 2009-10-04 10:33:47 UTC (rev 20) +++ trunk/stdair/stdair/bom/BomIterator.hpp 2009-10-05 08:07:44 UTC (rev 21) @@ -144,7 +144,7 @@ // ////////////// Dereferencing Operators ////////////// /** Dereferencing operator for iterators on a list. */ const BOM_CONTENT& operator* () { - BomStructure_T* lBomStruct_ptr = *Parent_T::_itBomStructureObject; + const BomStructure_T* lBomStruct_ptr = *Parent_T::_itBomStructureObject; assert (lBomStruct_ptr != NULL); BOM_CONTENT* lBomContent_ptr = BomStructure::getBomContentPtr<BOM_CONTENT> (*lBomStruct_ptr); @@ -155,7 +155,8 @@ /** Dereferencing operator for iterators on a map. */ value_type* operator-> () { const MapKey_T& lKey = Parent_T::_itBomStructureObject->first; - BomStructure_T* lBomStruct_ptr = Parent_T::_itBomStructureObject->second; + const BomStructure_T* lBomStruct_ptr = + Parent_T::_itBomStructureObject->second; assert (lBomStruct_ptr != NULL); BOM_CONTENT* lBomContent_ptr = BomStructure::getBomContentPtr<BOM_CONTENT> (*lBomStruct_ptr); @@ -249,7 +250,7 @@ // ////////////// Dereferencing Operators ////////////// /** Dereferencing operator for iterators on a list. */ BOM_CONTENT& operator* () { - BomStructure_T* lBomStruct_ptr = *Parent_T::_itBomStructureObject; + const BomStructure_T* lBomStruct_ptr = *Parent_T::_itBomStructureObject; assert (lBomStruct_ptr != NULL); BOM_CONTENT* lBomContent_ptr = BomStructure::getBomContentPtr<BOM_CONTENT> (*lBomStruct_ptr); @@ -260,7 +261,8 @@ /** Dereferencing operator for iterators on a map. */ value_type* operator-> () { const MapKey_T& lKey = Parent_T::_itBomStructureObject->first; - BomStructure_T* lBomStruct_ptr = Parent_T::_itBomStructureObject->second; + const BomStructure_T* lBomStruct_ptr = + Parent_T::_itBomStructureObject->second; assert (lBomStruct_ptr != NULL); BOM_CONTENT* lBomContent_ptr = BomStructure::getBomContentPtr<BOM_CONTENT> (*lBomStruct_ptr); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2009-10-05 08:33:27
|
Revision: 24 http://stdair.svn.sourceforge.net/stdair/?rev=24&view=rev Author: quannaus Date: 2009-10-05 08:33:21 +0000 (Mon, 05 Oct 2009) Log Message: ----------- [Dev] Some small changes. Modified Paths: -------------- trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp trunk/stdair/stdair/bom/BomIterator.hpp Modified: trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp =================================================================== --- trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2009-10-05 08:16:51 UTC (rev 23) +++ trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2009-10-05 08:33:21 UTC (rev 24) @@ -36,17 +36,17 @@ typedef BomConstIterator_T<BOM_CONTENT_CHILD, typename BomChildrenOrderedList_T::const_reverse_iterator> ListConstReverseIterator_T; typedef BomIterator_T<BOM_CONTENT_CHILD, - typename BomChildrenOrderedList_T::iterator> ListIterator_T; + typename BomChildrenOrderedList_T::const_iterator> ListIterator_T; typedef BomIterator_T<BOM_CONTENT_CHILD, - typename BomChildrenOrderedList_T::reverse_iterator> ListReverseIterator_T; + 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::iterator> MapIterator_T; + typename BomChildrenList_T::const_iterator> MapIterator_T; typedef BomIterator_T<BOM_CONTENT_CHILD, - typename BomChildrenList_T::reverse_iterator> MapReverseIterator_T; + typename BomChildrenList_T::const_reverse_iterator> MapReverseIterator_T; public: // /////////// Display support methods ///////// Modified: trunk/stdair/stdair/bom/BomIterator.hpp =================================================================== --- trunk/stdair/stdair/bom/BomIterator.hpp 2009-10-05 08:16:51 UTC (rev 23) +++ trunk/stdair/stdair/bom/BomIterator.hpp 2009-10-05 08:33:21 UTC (rev 24) @@ -211,7 +211,7 @@ 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; + 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; @@ -249,7 +249,7 @@ // ////////////// Dereferencing Operators ////////////// /** Dereferencing operator for iterators on a list. */ - BOM_CONTENT& operator* () { + const BOM_CONTENT& operator* () { const BomStructure_T* lBomStruct_ptr = *Parent_T::_itBomStructureObject; assert (lBomStruct_ptr != NULL); BOM_CONTENT* lBomContent_ptr = This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |
From: <qua...@us...> - 2009-10-06 09:12:30
|
Revision: 28 http://stdair.svn.sourceforge.net/stdair/?rev=28&view=rev Author: quannaus Date: 2009-10-06 09:12:24 +0000 (Tue, 06 Oct 2009) Log Message: ----------- [Dev] Added some friend classes. Modified Paths: -------------- trunk/stdair/stdair/bom/Inventory.hpp trunk/stdair/stdair/bom/LegDate.hpp trunk/stdair/stdair/bom/SegmentDate.hpp Modified: trunk/stdair/stdair/bom/Inventory.hpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.hpp 2009-10-06 09:01:12 UTC (rev 27) +++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-06 09:12:24 UTC (rev 28) @@ -29,6 +29,7 @@ class Inventory : public BomStructure { friend class FacBomStructure; friend class FacBomContent; + friend class BomStructure; public: // Type definitions Modified: trunk/stdair/stdair/bom/LegDate.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDate.hpp 2009-10-06 09:01:12 UTC (rev 27) +++ trunk/stdair/stdair/bom/LegDate.hpp 2009-10-06 09:12:24 UTC (rev 28) @@ -25,6 +25,7 @@ class LegDate : public BomStructure { friend class FacBomStructure; friend class FacBomContent; + friend class BomStructure; public: // Type definitions Modified: trunk/stdair/stdair/bom/SegmentDate.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-06 09:01:12 UTC (rev 27) +++ trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-06 09:12:24 UTC (rev 28) @@ -25,6 +25,7 @@ class SegmentDate : public BomStructure { friend class FacBomStructure; friend class FacBomContent; + friend class BomStructure; public: // Type definitions This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2009-10-06 12:19:37
|
Revision: 29 http://stdair.svn.sourceforge.net/stdair/?rev=29&view=rev Author: quannaus Date: 2009-10-06 12:19:31 +0000 (Tue, 06 Oct 2009) Log Message: ----------- [Dev] Some small changes. Modified Paths: -------------- trunk/stdair/stdair/bom/BomChildrenHolderImp.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 09:12:24 UTC (rev 28) +++ trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2009-10-06 12:19:31 UTC (rev 29) @@ -87,7 +87,7 @@ // /////////// Iteration methods ////////// /** Initialise the internal const iterators on bom objects: return the iterator at the begining of the list. */ - ListConstIterator_T listConstIteratorBegin () const { + ListConstIterator_T listBegin () const { return _bomChildrenOrderedList.begin(); } @@ -111,7 +111,7 @@ /** Initialise the internal iterators on bom objects: return the iterator at the begining of the list. */ - ListIterator_T listIteratorBegin () { + ListIterator_T listBegin () { return ListIterator_T(_bomChildrenOrderedList.begin()); } Modified: trunk/stdair/stdair/bom/FlightDate.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-06 09:12:24 UTC (rev 28) +++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-06 12:19:31 UTC (rev 29) @@ -195,9 +195,9 @@ // /////////// Iteration methods ////////// /** Initialise the internal const iterator on segment date: return the const iterator at the begining of the list. */ - SegmentDateListConstIterator_T segmentDateListConstIteratorBegin () const { + SegmentDateListConstIterator_T segmentDateListBegin () const { assert (_childrenList != NULL); - return _childrenList->listConstIteratorBegin (); + return _childrenList->listBegin (); } /** Initialise the internal const iterator on segment date: @@ -223,9 +223,9 @@ /** 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: @@ -308,9 +308,9 @@ /** Initialise the internal const iterator on leg date: return the const iterator at the begining of the list. */ - LegDateListConstIterator_T legDateListConstIteratorBegin () const { + LegDateListConstIterator_T legDateListBegin () const { assert (_secondChildrenList != NULL); - return _secondChildrenList->listConstIteratorBegin (); + return _secondChildrenList->listBegin (); } /** Initialise the internal const iterator on leg date: @@ -336,9 +336,9 @@ /** 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: Modified: trunk/stdair/stdair/bom/Inventory.hpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.hpp 2009-10-06 09:12:24 UTC (rev 28) +++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-06 12:19:31 UTC (rev 29) @@ -155,9 +155,9 @@ // /////////// Iteration methods ////////// /** Initialise the internal const iterator on flight date: return the const iterator at the begining of the list. */ - FlightDateListConstIterator_T flightDateListConstIteratorBegin () const { + FlightDateListConstIterator_T flightDateListBegin () const { assert (_childrenList != NULL); - return _childrenList->listConstIteratorBegin (); + return _childrenList->listBegin (); } /** Initialise the internal const iterator on flight date: @@ -183,9 +183,9 @@ /** 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: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2009-10-06 12:24:02
|
Revision: 30 http://stdair.svn.sourceforge.net/stdair/?rev=30&view=rev Author: quannaus Date: 2009-10-06 12:23:47 +0000 (Tue, 06 Oct 2009) Log Message: ----------- [Dev] Some small changes. 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-06 12:19:31 UTC (rev 29) +++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-06 12:23:47 UTC (rev 30) @@ -223,9 +223,9 @@ /** Initialise the internal iterator on segment date: return the iterator at the begining of the list. */ - SegmentDateListIterator_T segmentDateListBegin () const { + SegmentDateListIterator_T segmentDateListBegin () { assert (_childrenList != NULL); - return _childrenList->listBegin (); + return _childrenList->listaBegin (); } /** Initialise the internal iterator on segment date: @@ -336,7 +336,7 @@ /** Initialise the internal iterator on leg date: return the iterator at the begining of the list. */ - LegDateListIterator_T legDateListBegin () const { + LegDateListIterator_T legDateListBegin () { assert (_secondChildrenList != NULL); return _secondChildrenList->listBegin (); } Modified: trunk/stdair/stdair/bom/Inventory.hpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.hpp 2009-10-06 12:19:31 UTC (rev 29) +++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-06 12:23:47 UTC (rev 30) @@ -183,7 +183,7 @@ /** Initialise the internal iterator on flight date: return the iterator at the begining of the list. */ - FlightDateListIterator_T flightDateListBegin () const { + FlightDateListIterator_T flightDateListBegin () { assert (_childrenList != NULL); return _childrenList->listBegin (); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2009-10-06 12:48:06
|
Revision: 31 http://stdair.svn.sourceforge.net/stdair/?rev=31&view=rev Author: quannaus Date: 2009-10-06 12:47:57 +0000 (Tue, 06 Oct 2009) Log Message: ----------- [Dev] Reverted to the revision 28. Revision Links: -------------- http://stdair.svn.sourceforge.net/stdair/?rev=28&view=rev Modified Paths: -------------- trunk/stdair/stdair/bom/BomChildrenHolderImp.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:23:47 UTC (rev 30) +++ trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2009-10-06 12:47:57 UTC (rev 31) @@ -87,7 +87,7 @@ // /////////// Iteration methods ////////// /** Initialise the internal const iterators on bom objects: return the iterator at the begining of the list. */ - ListConstIterator_T listBegin () const { + ListConstIterator_T listConstIteratorBegin () const { return _bomChildrenOrderedList.begin(); } @@ -111,7 +111,7 @@ /** Initialise the internal iterators on bom objects: return the iterator at the begining of the list. */ - ListIterator_T listBegin () { + ListIterator_T listIteratorBegin () { return ListIterator_T(_bomChildrenOrderedList.begin()); } Modified: trunk/stdair/stdair/bom/FlightDate.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-06 12:23:47 UTC (rev 30) +++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-06 12:47:57 UTC (rev 31) @@ -195,9 +195,9 @@ // /////////// Iteration methods ////////// /** Initialise the internal const iterator on segment date: return the const iterator at the begining of the list. */ - SegmentDateListConstIterator_T segmentDateListBegin () const { + SegmentDateListConstIterator_T segmentDateListConstIteratorBegin () const { assert (_childrenList != NULL); - return _childrenList->listBegin (); + return _childrenList->listConstIteratorBegin (); } /** Initialise the internal const iterator on segment date: @@ -223,9 +223,9 @@ /** Initialise the internal iterator on segment date: return the iterator at the begining of the list. */ - SegmentDateListIterator_T segmentDateListBegin () { + SegmentDateListIterator_T segmentDateListIteratorBegin () const { assert (_childrenList != NULL); - return _childrenList->listaBegin (); + return _childrenList->listIteratorBegin (); } /** Initialise the internal iterator on segment date: @@ -308,9 +308,9 @@ /** Initialise the internal const iterator on leg date: return the const iterator at the begining of the list. */ - LegDateListConstIterator_T legDateListBegin () const { + LegDateListConstIterator_T legDateListConstIteratorBegin () const { assert (_secondChildrenList != NULL); - return _secondChildrenList->listBegin (); + return _secondChildrenList->listConstIteratorBegin (); } /** Initialise the internal const iterator on leg date: @@ -336,9 +336,9 @@ /** Initialise the internal iterator on leg date: return the iterator at the begining of the list. */ - LegDateListIterator_T legDateListBegin () { + LegDateListIterator_T legDateListIteratorBegin () const { assert (_secondChildrenList != NULL); - return _secondChildrenList->listBegin (); + return _secondChildrenList->listIteratorBegin (); } /** Initialise the internal iterator on leg date: Modified: trunk/stdair/stdair/bom/Inventory.hpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.hpp 2009-10-06 12:23:47 UTC (rev 30) +++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-06 12:47:57 UTC (rev 31) @@ -155,9 +155,9 @@ // /////////// Iteration methods ////////// /** Initialise the internal const iterator on flight date: return the const iterator at the begining of the list. */ - FlightDateListConstIterator_T flightDateListBegin () const { + FlightDateListConstIterator_T flightDateListConstIteratorBegin () const { assert (_childrenList != NULL); - return _childrenList->listBegin (); + return _childrenList->listConstIteratorBegin (); } /** Initialise the internal const iterator on flight date: @@ -183,9 +183,9 @@ /** Initialise the internal iterator on flight date: return the iterator at the begining of the list. */ - FlightDateListIterator_T flightDateListBegin () { + FlightDateListIterator_T flightDateListIteratorBegin () const { assert (_childrenList != NULL); - return _childrenList->listBegin (); + return _childrenList->listIteratorBegin (); } /** Initialise the internal iterator on flight date: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |
From: <qua...@us...> - 2009-10-09 13:07:23
|
Revision: 38 http://stdair.svn.sourceforge.net/stdair/?rev=38&view=rev Author: quannaus Date: 2009-10-09 13:07:14 +0000 (Fri, 09 Oct 2009) Log Message: ----------- [Dev] Changed the name of bom structure objects. Modified Paths: -------------- trunk/stdair/stdair/bom/sources.mk Added Paths: ----------- trunk/stdair/stdair/bom/FlightDateStructure.hpp trunk/stdair/stdair/bom/InventoryStructure.hpp trunk/stdair/stdair/bom/LegDateStructure.hpp trunk/stdair/stdair/bom/SegmentDateStructure.hpp Removed Paths: ------------- trunk/stdair/stdair/bom/FlightDate.hpp trunk/stdair/stdair/bom/Inventory.hpp trunk/stdair/stdair/bom/LegDate.hpp trunk/stdair/stdair/bom/SegmentDate.hpp Deleted: trunk/stdair/stdair/bom/FlightDate.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-08 15:22:51 UTC (rev 37) +++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-09 13:07:14 UTC (rev 38) @@ -1,336 +0,0 @@ -#ifndef __STDAIR_BOM_FLIGHTDATE_HPP -#define __STDAIR_BOM_FLIGHTDATE_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// MPL -#include <boost/mpl/vector.hpp> -// STDAIR -#include <stdair/bom/BomStructure.hpp> -#include <stdair/bom/FlightDateKey.hpp> -#include <stdair/bom/SegmentDate.hpp> -#include <stdair/bom/LegDate.hpp> -#include <stdair/bom/BomChildrenHolderImp.hpp> - -namespace stdair { - - // Forward declaration - template <typename BOM_CONTENT> class Inventory; - class BomContentDummy; - - /** Wrapper class aimed at holding the actual content, modeled - by an external specific FlightDate class (for instance, - in the AIRSCHED library). */ - template <class BOM_CONTENT> - class FlightDate : public BomStructure { - friend class FacBomStructure; - friend class FacBomContent; - friend class BomStructure; - - public: - // Type definitions - /** Definition allowing to retrieve the associated BOM content type. */ - typedef BOM_CONTENT Content_T; - - /** Definition allowing to retrieve the associated BOM key type. */ - typedef FlightDateKey<BOM_CONTENT> BomKey_T; - - /** Definition allowing to retrieve the associated parent - BOM structure type. */ - typedef typename BOM_CONTENT::ParentBomContent_T::BomStructure_T ParentBomStructure_T; - - /** Definition allowing to retrieve the children type of the - BOM_CONTENT. */ - typedef typename BOM_CONTENT::ContentChild_T ContentChild_T; - - /** Definition allowing to retrieve the second children type of the - BOM_CONTENT. */ - typedef typename BOM_CONTENT::SecondContentChild_T SecondContentChild_T; - - /** Definition allowing to retrieve the associated children type. */ - typedef boost::mpl::vector<SegmentDate<ContentChild_T>, - LegDate<SecondContentChild_T> > ChildrenBomTypeList_T; - - /** Definition allowing to retrive the default children bom holder type. */ - typedef BomChildrenHolderImp<BomContentDummy> DefaultChildrenBomHolder_T; - - /** Definition allowing to retrive the children bom holder type. */ - typedef BomChildrenHolderImp<ContentChild_T> ChildrenBomHolder_T; - - /** 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) Inventory object. */ - ParentBomStructure_T* getInventoryPtr() const { - return _parent; - } - - /** Get the (parent) Inventory object. */ - ParentBomStructure_T& getInventory() const { - assert (_parent != NULL); - return *_parent; - } - - /** Get the flight-date key. */ - const BomKey_T& getKey() const { - return _key; - } - - /** Get the list of segment-dates. */ - const ChildrenBomHolder_T& getChildrenList() const { - return *_childrenList; - } - - /** Get the list of leg-dates. */ - const SecondChildrenBomHolder_T& getSecondChildrenList() const { - return *_secondChildrenList; - } - - /** Get the list of segment-dates. */ - void getChildrenList (ChildrenBomHolder_T*& ioChildrenList) { - ioChildrenList = _childrenList; - } - - /** Get the list of leg-dates. */ - void getChildrenList (SecondChildrenBomHolder_T*& ioChildrenList) { - ioChildrenList = _secondChildrenList; - } - - private: - // /////////// Setters ///////////// - /** Set the (parent) FlightDate object. */ - void setBomStructureRoot (ParentBomStructure_T& ioParent) { - _parent = &ioParent; - } - - /** Default children list setter. */ - void setChildrenList (DefaultChildrenBomHolder_T&) { } - - /** Set the segment-date children list. */ - void setChildrenList (ChildrenBomHolder_T& ioChildrenList) { - _childrenList = &ioChildrenList; - } - - /** Set the leg-date children list. */ - void setChildrenList (SecondChildrenBomHolder_T& ioChildrenList) { - _secondChildrenList = &ioChildrenList; - } - - public: - // /////////// Display support methods ///////// - /** Dump a Business Object into an output stream. - @param ostream& the output stream. */ - void toStream (std::ostream& ioOut) const { - ioOut << toString() << std::endl; - } - - /** Dump a Business Object with all its children into an output stream. - @param ostream& the output stream. */ - void describeFull (std::ostringstream& ioOut) const { - ioOut << describeShortKey () << std::endl; - displaySegmentDateList (ioOut); - displayLegDateList (ioOut); - } - - /** Read a Business Object from an input stream. - @param istream& the input stream. */ - void fromStream (std::istream& ioIn) { } - - /** Get the serialised version of the Business Object. */ - std::string toString() const { return describeKey(); } - - /** Get a string describing the whole key (differentiating two objects - at any level). */ - const std::string describeKey() const { return _key.toString(); } - - /** Get a string describing the short key (differentiating two objects - at the same level). */ - const std::string describeShortKey() const { return _key.toString(); } - - /** Dump the segment-date children list in to an output stream. - @param ostream& the output stream. */ - void displaySegmentDateList (std::ostringstream& ioOut) const { - ioOut << "SegmentDates: " << std::endl; - assert (_childrenList != NULL); - _childrenList->describeFull (ioOut); - } - - /** Dump the leg-date children list in to an output stream. - @param ostream& the output stream. */ - void displayLegDateList (std::ostringstream& ioOut) const { - ioOut << "LegDates: " << std::endl; - assert (_secondChildrenList != NULL); - _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. */ - /** Default constructors. */ - FlightDate (); - FlightDate (const FlightDate&); - FlightDate (const BomKey_T& iKey) - : _parent (NULL), _key (iKey), _childrenList (NULL), - _secondChildrenList (NULL) { } - - /** Destructor. */ - virtual ~FlightDate() { } - - private: - // Attributes - /** Parent root. */ - ParentBomStructure_T* _parent; - - /** The actual functional (Business Object) content. */ - BOM_CONTENT* _content; - - /** The key of both the structure and content objects. */ - BomKey_T _key; - - /** List of segment-dates. */ - ChildrenBomHolder_T* _childrenList; - - /** List of leg-dates. */ - SecondChildrenBomHolder_T* _secondChildrenList; - - }; - -} -#endif // __STDAIR_BOM_FLIGHTDATE_HPP - Copied: trunk/stdair/stdair/bom/FlightDateStructure.hpp (from rev 37, trunk/stdair/stdair/bom/FlightDate.hpp) =================================================================== --- trunk/stdair/stdair/bom/FlightDateStructure.hpp (rev 0) +++ trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-10-09 13:07:14 UTC (rev 38) @@ -0,0 +1,336 @@ +#ifndef __STDAIR_BOM_FLIGHTDATESTRUCTURE_HPP +#define __STDAIR_BOM_FLIGHTDATESTRUCTURE_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// MPL +#include <boost/mpl/vector.hpp> +// STDAIR +#include <stdair/bom/BomStructure.hpp> +#include <stdair/bom/FlightDateKey.hpp> +#include <stdair/bom/SegmentDateStructure.hpp> +#include <stdair/bom/LegDateStructure.hpp> +#include <stdair/bom/BomChildrenHolderImp.hpp> + +namespace stdair { + + // Forward declaration + template <typename BOM_CONTENT> class Inventory; + class BomContentDummy; + + /** Wrapper class aimed at holding the actual content, modeled + by an external specific FlightDate class (for instance, + in the AIRSCHED library). */ + template <class BOM_CONTENT> + class FlightDateStructure : public BomStructure { + friend class FacBomStructure; + friend class FacBomContent; + friend class BomStructure; + + public: + // Type definitions + /** Definition allowing to retrieve the associated BOM content type. */ + typedef BOM_CONTENT Content_T; + + /** Definition allowing to retrieve the associated BOM key type. */ + typedef FlightDateKey<BOM_CONTENT> BomKey_T; + + /** Definition allowing to retrieve the associated parent + BOM structure type. */ + typedef typename BOM_CONTENT::ParentBomContent_T::BomStructure_T ParentBomStructure_T; + + /** Definition allowing to retrieve the children type of the + BOM_CONTENT. */ + typedef typename BOM_CONTENT::ContentChild_T ContentChild_T; + + /** Definition allowing to retrieve the second children type of the + BOM_CONTENT. */ + typedef typename BOM_CONTENT::SecondContentChild_T SecondContentChild_T; + + /** Definition allowing to retrieve the associated children type. */ + typedef boost::mpl::vector<SegmentDateStructure<ContentChild_T>, + LegDateStructure<SecondContentChild_T> > ChildrenBomTypeList_T; + + /** Definition allowing to retrive the default children bom holder type. */ + typedef BomChildrenHolderImp<BomContentDummy> DefaultChildrenBomHolder_T; + + /** Definition allowing to retrive the children bom holder type. */ + typedef BomChildrenHolderImp<ContentChild_T> ChildrenBomHolder_T; + + /** 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. */ + ParentBomStructure_T* getInventoryStructurePtr() const { + return _parent; + } + + /** Get the (parent) InventoryStructure object. */ + ParentBomStructure_T& getInventoryStructure() const { + assert (_parent != NULL); + return *_parent; + } + + /** Get the flight-date key. */ + const BomKey_T& getKey() const { + return _key; + } + + /** Get the list of segment-dates. */ + const ChildrenBomHolder_T& getChildrenList() const { + return *_childrenList; + } + + /** Get the list of leg-dates. */ + const SecondChildrenBomHolder_T& getSecondChildrenList() const { + return *_secondChildrenList; + } + + /** Get the list of segment-dates. */ + void getChildrenList (ChildrenBomHolder_T*& ioChildrenList) { + ioChildrenList = _childrenList; + } + + /** Get the list of leg-dates. */ + void getChildrenList (SecondChildrenBomHolder_T*& ioChildrenList) { + ioChildrenList = _secondChildrenList; + } + + private: + // /////////// Setters ///////////// + /** Set the (parent) FlightDate object. */ + void setInventoryStructure (ParentBomStructure_T& ioParent) { + _parent = &ioParent; + } + + /** Default children list setter. */ + void setChildrenList (DefaultChildrenBomHolder_T&) { } + + /** Set the segment-date children list. */ + void setChildrenList (ChildrenBomHolder_T& ioChildrenList) { + _childrenList = &ioChildrenList; + } + + /** Set the leg-date children list. */ + void setChildrenList (SecondChildrenBomHolder_T& ioChildrenList) { + _secondChildrenList = &ioChildrenList; + } + + public: + // /////////// Display support methods ///////// + /** Dump a Business Object into an output stream. + @param ostream& the output stream. */ + void toStream (std::ostream& ioOut) const { + ioOut << toString() << std::endl; + } + + /** Dump a Business Object with all its children into an output stream. + @param ostream& the output stream. */ + void describeFull (std::ostringstream& ioOut) const { + ioOut << describeShortKey () << std::endl; + displaySegmentDateList (ioOut); + displayLegDateList (ioOut); + } + + /** Read a Business Object from an input stream. + @param istream& the input stream. */ + void fromStream (std::istream& ioIn) { } + + /** Get the serialised version of the Business Object. */ + std::string toString() const { return describeKey(); } + + /** Get a string describing the whole key (differentiating two objects + at any level). */ + const std::string describeKey() const { return _key.toString(); } + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + const std::string describeShortKey() const { return _key.toString(); } + + /** Dump the segment-date children list in to an output stream. + @param ostream& the output stream. */ + void displaySegmentDateList (std::ostringstream& ioOut) const { + ioOut << "SegmentDates: " << std::endl; + assert (_childrenList != NULL); + _childrenList->describeFull (ioOut); + } + + /** Dump the leg-date children list in to an output stream. + @param ostream& the output stream. */ + void displayLegDateList (std::ostringstream& ioOut) const { + ioOut << "LegDates: " << std::endl; + assert (_secondChildrenList != NULL); + _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. */ + /** Default constructors. */ + FlightDateStructure (); + FlightDateStructure (const FlightDateStructure&); + FlightDateStructure (const BomKey_T& iKey) + : _parent (NULL), _key (iKey), _childrenList (NULL), + _secondChildrenList (NULL) { } + + /** Destructor. */ + virtual ~FlightDateStructure() { } + + private: + // Attributes + /** Parent root. */ + ParentBomStructure_T* _parent; + + /** The actual functional (Business Object) content. */ + BOM_CONTENT* _content; + + /** The key of both the structure and content objects. */ + BomKey_T _key; + + /** List of segment-dates. */ + ChildrenBomHolder_T* _childrenList; + + /** List of leg-dates. */ + SecondChildrenBomHolder_T* _secondChildrenList; + + }; + +} +#endif // __STDAIR_BOM_FLIGHTDATESTRUCTURE_HPP + Deleted: trunk/stdair/stdair/bom/Inventory.hpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.hpp 2009-10-08 15:22:51 UTC (rev 37) +++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-09 13:07:14 UTC (rev 38) @@ -1,237 +0,0 @@ -#ifndef __STDAIR_BOM_INVENTORY_HPP -#define __STDAIR_BOM_INVENTORY_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <cassert> -// (Boost) MPL -#include <boost/mpl/vector.hpp> -// STDAIR -#include <stdair/bom/BomStructure.hpp> -#include <stdair/bom/InventoryKey.hpp> -#include <stdair/bom/BomChildrenHolderImp.hpp> -#include <stdair/bom/BomIterator.hpp> -#include <stdair/bom/FlightDate.hpp> - -namespace stdair { - - // Forward declaration - template <typename BOM_CONTENT> class BomStructureRoot; - class BomStructureDummy; - class BomContentDummy; - - /** Wrapper class aimed at holding the actual content, modeled - by an external specific Inventory class (for instance, - in the AIRSCHED library). */ - template <class BOM_CONTENT> - class Inventory : public BomStructure { - friend class FacBomStructure; - friend class FacBomContent; - friend class BomStructure; - - public: - // Type definitions - /** Definition allowing to retrieve the associated BOM content type. */ - typedef BOM_CONTENT Content_T; - - /** Definition allowing to retrieve the associated BOM key type. */ - typedef InventoryKey<BOM_CONTENT> BomKey_T; - - /** Definition allowing to retrieve the children type of the - BOM_CONTENT. */ - typedef typename BOM_CONTENT::ContentChild_T ContentChild_T; - - /** Definition allowing to retrieve the associated parent - BOM structure type. */ - typedef typename BOM_CONTENT::ParentBomContent_T::BomStructure_T ParentBomStructure_T; - - /** Definition allowing to retrieve the associated children type. */ - typedef boost::mpl::vector<FlightDate<ContentChild_T>, - BomStructureDummy> ChildrenBomTypeList_T; - - /** Define the default children bom holder type. */ - typedef BomChildrenHolderImp<BomContentDummy> DefaultChildrenBomHolder_T; - - /** 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. */ - ParentBomStructure_T* getBomStructureRootPtr() const { - return _parent; - } - - /** Get the (parent) BomStructureRoot object. */ - ParentBomStructure_T& getBomStructureRoot() const { - assert (_parent != NULL); - return *_parent; - } - - /** Get the flight-date key. */ - const BomKey_T& getKey() const { - return _key; - } - - /** Get the list of flight-dates. */ - const ChildrenBomHolder_T& getChildrenList() const { - assert (_childrenList != NULL); - return *_childrenList; - } - - /** Get the list of flight-dates. */ - void getChildrenList (ChildrenBomHolder_T*& ioChildrenList) { - ioChildrenList = _childrenList; - } - - private: - // /////////// Setters ///////////// - /** Set the (parent) Inventory object. */ - void setBomStructureRoot (ParentBomStructure_T& ioParent) { - _parent = &ioParent; - } - - /** Default children list setter. */ - void setChildrenList (DefaultChildrenBomHolder_T&) { } - - /** Set the children list. */ - void setChildrenList (ChildrenBomHolder_T& ioChildrenList) { - _childrenList = &ioChildrenList; - } - - public: - // /////////// Display support methods ///////// - /** Dump a Business Object into an output stream. - @param ostream& the output stream. */ - void toStream (std::ostream& ioOut) const { - ioOut << toString() << std::endl; - } - - /** Dump a Business Object with all its children into an output stream. - @param ostream& the output stream. */ - void describeFull (std::ostringstream& ioOut) const { - ioOut << describeShortKey () << std::endl; - displayFlightDateList (ioOut); - } - - /** Read a Business Object from an input stream. - @param istream& the input stream. */ - void fromStream (std::istream& ioIn) { } - - /** Get the serialised version of the Business Object. */ - std::string toString() const { return describeKey(); } - - /** Get a string describing the whole key (differentiating two objects - at any level). */ - const std::string describeKey() const { return _key.toString(); } - - /** Get a string describing the short key (differentiating two objects - at the same level). */ - const std::string describeShortKey() const { return _key.toString(); } - - /** Dump the flight-date children list in to an output stream. - @param ostream& the output stream. */ - void displayFlightDateList (std::ostringstream& ioOut) const { - ioOut << "FlightDates: " << std::endl; - 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. */ - /** Default constructors. */ - Inventory (); - Inventory (const Inventory&); - Inventory (const BomKey_T& iKey) - : _parent (NULL), _key (iKey), _childrenList (NULL) { } - - /** Destructor. */ - virtual ~Inventory() { } - - private: - // Attributes - /** Parent root. */ - ParentBomStructure_T* _parent; - - /** The actual functional (Business Object) content. */ - BOM_CONTENT* _content; - - /** The key of both the structure and content objects. */ - BomKey_T _key; - - /** List of flight-dates. */ - ChildrenBomHolder_T* _childrenList; - }; - -} -#endif // __STDAIR_BOM_INVENTORY_HPP - Copied: trunk/stdair/stdair/bom/InventoryStructure.hpp (from rev 37, trunk/stdair/stdair/bom/Inventory.hpp) =================================================================== --- trunk/stdair/stdair/bom/InventoryStructure.hpp (rev 0) +++ trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-10-09 13:07:14 UTC (rev 38) @@ -0,0 +1,237 @@ +#ifndef __STDAIR_BOM_INVENTORYSTRUCTURE_HPP +#define __STDAIR_BOM_INVENTORYSTRUCTURE_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// (Boost) MPL +#include <boost/mpl/vector.hpp> +// STDAIR +#include <stdair/bom/BomStructure.hpp> +#include <stdair/bom/InventoryKey.hpp> +#include <stdair/bom/BomChildrenHolderImp.hpp> +#include <stdair/bom/BomIterator.hpp> +#include <stdair/bom/FlightDateStructure.hpp> + +namespace stdair { + + // Forward declaration + template <typename BOM_CONTENT> class BomStructureRoot; + class BomStructureDummy; + class BomContentDummy; + + /** Wrapper class aimed at holding the actual content, modeled + by an external specific Inventory class (for instance, + in the AIRSCHED library). */ + template <class BOM_CONTENT> + class InventoryStructure : public BomStructure { + friend class FacBomStructure; + friend class FacBomContent; + friend class BomStructure; + + public: + // Type definitions + /** Definition allowing to retrieve the associated BOM content type. */ + typedef BOM_CONTENT Content_T; + + /** Definition allowing to retrieve the associated BOM key type. */ + typedef InventoryKey<BOM_CONTENT> BomKey_T; + + /** Definition allowing to retrieve the children type of the + BOM_CONTENT. */ + typedef typename BOM_CONTENT::ContentChild_T ContentChild_T; + + /** Definition allowing to retrieve the associated parent + BOM structure type. */ + typedef typename BOM_CONTENT::ParentBomContent_T::BomStructure_T ParentBomStructure_T; + + /** Definition allowing to retrieve the associated children type. */ + typedef boost::mpl::vector<FlightDate<ContentChild_T>, + BomStructureDummy> ChildrenBomTypeList_T; + + /** Define the default children bom holder type. */ + typedef BomChildrenHolderImp<BomContentDummy> DefaultChildrenBomHolder_T; + + /** 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. */ + ParentBomStructure_T* getBomStructureRootPtr() const { + return _parent; + } + + /** Get the (parent) BomStructureRoot object. */ + ParentBomStructure_T& getBomStructureRoot() const { + assert (_parent != NULL); + return *_parent; + } + + /** Get the flight-date key. */ + const BomKey_T& getKey() const { + return _key; + } + + /** Get the list of flight-dates. */ + const ChildrenBomHolder_T& getChildrenList() const { + assert (_childrenList != NULL); + return *_childrenList; + } + + /** Get the list of flight-dates. */ + void getChildrenList (ChildrenBomHolder_T*& ioChildrenList) { + ioChildrenList = _childrenList; + } + + private: + // /////////// Setters ///////////// + /** Set the (parent) Inventory object. */ + void setBomStructureRoot (ParentBomStructure_T& ioParent) { + _parent = &ioParent; + } + + /** Default children list setter. */ + void setChildrenList (DefaultChildrenBomHolder_T&) { } + + /** Set the children list. */ + void setChildrenList (ChildrenBomHolder_T& ioChildrenList) { + _childrenList = &ioChildrenList; + } + + public: + // /////////// Display support methods ///////// + /** Dump a Business Object into an output stream. + @param ostream& the output stream. */ + void toStream (std::ostream& ioOut) const { + ioOut << toString() << std::endl; + } + + /** Dump a Business Object with all its children into an output stream. + @param ostream& the output stream. */ + void describeFull (std::ostringstream& ioOut) const { + ioOut << describeShortKey () << std::endl; + displayFlightDateList (ioOut); + } + + /** Read a Business Object from an input stream. + @param istream& the input stream. */ + void fromStream (std::istream& ioIn) { } + + /** Get the serialised version of the Business Object. */ + std::string toString() const { return describeKey(); } + + /** Get a string describing the whole key (differentiating two objects + at any level). */ + const std::string describeKey() const { return _key.toString(); } + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + const std::string describeShortKey() const { return _key.toString(); } + + /** Dump the flight-date children list in to an output stream. + @param ostream& the output stream. */ + void displayFlightDateList (std::ostringstream& ioOut) const { + ioOut << "FlightDates: " << std::endl; + 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. */ + /** Default constructors. */ + InventoryStructure (); + InventoryStructure (const InventoryStructure&); + InventoryStructure (const BomKey_T& iKey) + : _parent (NULL), _key (iKey), _childrenList (NULL) { } + + /** Destructor. */ + virtual ~InventoryStructure() { } + + private: + // Attributes + /** Parent root. */ + ParentBomStructure_T* _parent; + + /** The actual functional (Business Object) content. */ + BOM_CONTENT* _content; + + /** The key of both the structure and content objects. */ + BomKey_T _key; + + /** List of flight-dates. */ + ChildrenBomHolder_T* _childrenList; + }; + +} +#endif // __STDAIR_BOM_INVENTORYSTRUCTURE_HPP + Deleted: trunk/stdair/stdair/bom/LegDate.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDate.hpp 2009-10-08 15:22:51 UTC (rev 37) +++ trunk/stdair/stdair/bom/LegDate.hpp 2009-10-09 13:07:14 UTC (rev 38) @@ -1,127 +0,0 @@ -#ifndef __STDAIR_BOM_LEGDATE_HPP -#define __STDAIR_BOM_LEGDATE_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// MPL -#include <boost/mpl/vector.hpp> -// STDAIR -#include <stdair/bom/BomStructure.hpp> -#include <stdair/bom/LegDateKey.hpp> -#include <stdair/bom/BomChildrenHolderImp.hpp> - -namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT> class FlightDate; - class BomStructureDummy; - class BomContentDummy; - - /** Wrapper class aimed at holding the actual content, modeled - by an external specific LegDate class (for instance, - in the AIRSCHED library). */ - template <class BOM_CONTENT> - class LegDate : public BomStructure { - friend class FacBomStructure; - friend class FacBomContent; - friend class BomStructure; - - public: - // Type definitions - /** Definition allowing to retrieve the associated BOM content type. */ - typedef BOM_CONTENT Content_T; - - /** Definition allowing to retrieve the associated BOM key type. */ - typedef LegDateKey<BOM_CONTENT> BomKey_T; - - /** Definition allowing to retrieve the associated parent - BOM structure type. */ - typedef typename BOM_CONTENT::ParentBomContent_T::BomStructure_T ParentBomStructure_T; - - /** Definition allowing to retrieve the associated children type. */ - typedef boost::mpl::vector <BomStructureDummy, BomStructureDummy> ChildrenBomTypeList_T; - - /** Definition allowing to retrieve the default children bom holder type. */ - typedef BomChildrenHolderImp<BomContentDummy> DefaultChildrenBomHolder_T; - - public: - // /////////// Getters ///////////// - /** Get the (parent) FlightDate object. */ - ParentBomStructure_T* getFlightDatePtr() const { - return _parent; - } - - /** Get the (parent) FlightDate object. */ - ParentBomStructure_T& getFlightDate() const; - - /** Get the leg-date key. */ - const BomKey_T& getKey() const { - return _key; - } - - private: - // /////////// Setters ///////////// - /** Set the (parent) FlightDate object. */ - void setFlightDate (ParentBomStructure_T& ioFlightDate) { - _parent = &ioFlightDate; - } - - /** Default children list setter. */ - void setChildrenList (DefaultChildrenBomHolder_T&) { } - - - public: - // /////////// Display support methods ///////// - /** Dump a Business Object into an output stream. - @param ostream& the output stream. */ - void toStream (std::ostream& ioOut) const { - ioOut << toString() << std::endl; - } - - /** Dump a Business Object with all its children into an output stream. - @param ostream& the output stream. */ - void describeFull (std::ostringstream& ioOut) const { - ioOut << describeShortKey () << std::endl; - } - - /** Read a Business Object from an input stream. - @param istream& the input stream. */ - void fromStream (std::istream& ioIn) { } - - /** Get the serialised version of the Business Object. */ - std::string toString() const { return describeKey(); } - - /** Get a string describing the whole key (differentiating two objects - at any level). */ - const std::string describeKey() const { return _key.toString(); } - - /** Get a string describing the short key (differentiating two objects - at the same level). */ - const std::string describeShortKey() const { return _key.toString(); } - - private: - /** Constructors are private so as to force the usage of the Factory - layer. */ - /** Default constructors. */ - LegDate (); - LegDate (const LegDate&); - LegDate (const BomKey_T& iKey) : _parent (NULL), _key (iKey) { } - - /** Destructor. */ - virtual ~LegDate() { } - - private: - // Attributes - /** Parent flight-date. */ - ParentBomStructure_T* _parent; - - /** The actual functional (Business Object) content. */ - BOM_CONTENT* _content; - - /** The key of both the structure and content objects. */ - BomKey_T _key; - }; - -} -#endif // __STDAIR_BOM_LEGDATE_HPP Copied: trunk/stdair/stdair/bom/LegDateStructure.hpp (from rev 37, trunk/stdair/stdair/bom/LegDate.hpp) =================================================================== --- trunk/stdair/stdair/bom/LegDateStructure.hpp (rev 0) +++ trunk/stdair/stdair/bom/LegDateStructure.hpp 2009-10-09 13:07:14 UTC (rev 38) @@ -0,0 +1,127 @@ +#ifndef __STDAIR_BOM_LEGDATESTRUCTURE_HPP +#define __STDAIR_BOM_LEGDATESTRUCTURE_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// MPL +#include <boost/mpl/vector.hpp> +// STDAIR +#include <stdair/bom/BomStructure.hpp> +#include <stdair/bom/LegDateKey.hpp> +#include <stdair/bom/BomChildrenHolderImp.hpp> + +namespace stdair { + + // Forward declarations + template <typename BOM_CONTENT> class FlightDateStructure; + class BomStructureDummy; + class BomContentDummy; + + /** Wrapper class aimed at holding the actual content, modeled + by an external specific LegDate class (for instance, + in the AIRSCHED library). */ + template <class BOM_CONTENT> + class LegDateStructure : public BomStructure { + friend class FacBomStructure; + friend class FacBomContent; + friend class BomStructure; + + public: + // Type definitions + /** Definition allowing to retrieve the associated BOM content type. */ + typedef BOM_CONTENT Content_T; + + /** Definition allowing to retrieve the associated BOM key type. */ + typedef LegDateKey<BOM_CONTENT> BomKey_T; + + /** Definition allowing to retrieve the associated parent + BOM structure type. */ + typedef typename BOM_CONTENT::ParentBomContent_T::BomStructure_T ParentBomStructure_T; + + /** Definition allowing to retrieve the associated children type. */ + typedef boost::mpl::vector <BomStructureDummy, BomStructureDummy> ChildrenBomTypeList_T; + + /** Definition allowing to retrieve the default children bom holder type. */ + typedef BomChildrenHolderImp<BomContentDummy> DefaultChildrenBomHolder_T; + + public: + // /////////// Getters ///////////// + /** Get the (parent) FlightDateStructure object. */ + ParentBomStructure_T* getFlightDateStructurePtr() const { + return _parent; + } + + /** Get the (parent) FlightDateStructure object. */ + ParentBomStructure_T& getFlightDateStructure() const; + + /** Get the leg-date key. */ + const BomKey_T& getKey() const { + return _key; + } + + private: + // /////////// Setters ///////////// + /** Set the (parent) FlightDateStructure object. */ + void setFlightDateStructure (ParentBomStructure_T& ioFlightDateStructure) { + _parent = &ioFlightDateStructure; + } + + /** Default children list setter. */ + void setChildrenList (DefaultChildrenBomHolder_T&) { } + + + public: + // /////////// Display support methods ///////// + /** Dump a Business Object into an output stream. + @param ostream& the output stream. */ + void toStream (std::ostream& ioOut) const { + ioOut << toString() << std::endl; + } + + /** Dump a Business Object with all its children into an output stream. + @param ostream& the output stream. */ + void describeFull (std::ostringstream& ioOut) const { + ioOut << describeShortKey () << std::endl; + } + + /** Read a Business Object from an input stream. + @param istream& the input stream. */ + void fromStream (std::istream& ioIn) { } + + /** Get the serialised version of the Business Object. */ + std::string toString() const { return describeKey(); } + + /** Get a string describing the whole key (differentiating two objects + at any level). */ + const std::string describeKey() const { return _key.toString(); } + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + const std::string describeShortKey() const { return _key.toString(); } + + private: + /** Constructors are private so as to force the usage of the Factory + layer. */ + /** Default constructors. */ + LegDateStructure (); + LegDateStructure (const LegDateStructure&); + LegDateStructure (const BomKey_T& iKey) : _parent (NULL), _key (iKey) { } + + /** Destructor. */ + virtual ~LegDateStructure() { } + + private: + // Attributes + /** Parent flight-date. */ + ParentBomStructure_T* _parent; + + /** The actual functional (Business Object) content. */ + BOM_CONTENT* _content; + + /** The key of both the structure and content objects. */ + BomKey_T _key; + }; + +} +#endif // __STDAIR_BOM_LEGDATESTRUCTURE_HPP Deleted: trunk/stdair/stdair/bom/SegmentDate.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-08 15:22:51 UTC (rev 37) +++ trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-09 13:07:14 UTC (rev 38) @@ -1,127 +0,0 @@ -#ifndef __STDAIR_BOM_SEGMENTDATE_HPP -#define __STDAIR_BOM_SEGMENTDATE_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// MPL -#include <boost/mpl/vector.hpp> -// STDAIR -#include <stdair/bom/BomStructure.hpp> -#include <stdair/bom/SegmentDateKey.hpp> -#include <stdair/bom/BomChildrenHolderImp.hpp> - -namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT> class FlightDate; - class BomStructureDummy; - class BomContentDummy; - - /** Wrapper class aimed at holding the actual content, modeled - by an external specific SegmentDate class (for instance, - in the AIRSCHED library). */ - template <class BOM_CONTENT> - class SegmentDate : public BomStructure { - friend class FacBomStructure; - friend class FacBomContent; - friend class BomStructure; - - public: - // Type definitions - /** Definition allowing to retrieve the associated BOM content type. */ - typedef BOM_CONTENT Content_T; - - /** Definition allowing to retrieve the associated BOM key type. */ - typedef SegmentDateKey<BOM_CONTENT> BomKey_T; - - /** Definition allowing to retrieve the associated parent - BOM structure type. */ - typedef typename BOM_CONTENT::ParentBomContent_T::BomStructure_T ParentBomStructure_T; - - /** Definition allowing to retrieve the associated children type. */ - typedef boost::mpl::vector <BomStructureDummy, BomStructureDummy> ChildrenBomTypeList_T; - - /** Definition allowing to retrieve the default children bom holder type. */ - typedef BomChildrenHolderImp<BomContentDummy> DefaultChildrenBomHolder_T; - - public: - // /////////// Getters ///////////// - /** Get the (parent) FlightDate object. */ - ParentBomStructure_T* getFlightDatePtr() const { - return _parent; - } - - /** Get the (parent) FlightDate object. */ - ParentBomStructure_T& getFlightDate() const; - - /** Get the segment-date key. */ - const BomKey_T& getKey() const { - return _key; - } - - private: - // /////////// Setters ///////////// - /** Set the (parent) FlightDate object. */ - void setFlightDate (ParentBomStructure_T& ioFlightDate) { - _parent = &ioFlightDate; - } - - /** Default children list setter. */ - void setChildrenList (DefaultChildrenBomHolder_T&) { } - - - public: - // /////////// Display support methods ///////// - /** Dump a Business Object into an output stream. - @param ostream& the output stream. */ - void toStream (std::ostream& ioOut) const { - ioOut << toString() << std::endl; - } - - /** Dump a Business Object with all its children into an output stream. - @param ostream& the output stream. */ - void describeFull (std::ostringstream& ioOut) const { - ioOut << describeShortKey () << std::endl; - } - - /** Read a Business Object from an input stream. - @param istream& the input stream. */ - void fromStream (std::istream& ioIn) { } - - /** Get the serialised version of the Business Object. */ - std::string toString() const { return describeKey(); } - - /** Get a string describing the whole key (differentiating two objects - at any level). */ - const std::string describeKey() const { return _key.toString(); } - - /** Get a string describing the short key (differentiating two objects - at the same level). */ - const std::string describeShortKey() const { return _key.toString(); } - - private: - /** Constructors are private so as to force the usage of the Factory - layer. */ - /** Default constructors. */ - SegmentDate (); - SegmentDate (const SegmentDate&); - SegmentDate (const BomKey_T& iKey) : _parent (NULL), _key (iKey) { } - - /** Destructor. */ - virtual ~SegmentDate() { } - - private: - // Attributes - /** Parent flight-date. */ - ParentBomStructure_T* _parent; - - /** The actual functional (Business Object) content. */ - BOM_CONTENT* _content; - - /** The key of both the structure and content objects. */ - BomKey_T _key; - }; - -} -#endif // __STDAIR_BOM_SEGMENTDATE_HPP Copied: trunk/stdair/stdair/bom/SegmentDateStructure.hpp (from rev 37, trunk/stdair/stdair/bom/SegmentDate.hpp) =================================================================== --- trunk/stdair/stdair/bom/SegmentDateStructure.hpp (rev 0) +++ trunk/stdair/stdair/bom/SegmentDateStructure.hpp 2009-10-09 13:07:14 UTC (rev 38) @@ -0,0 +1,127 @@ +#ifndef __STDAIR_BOM_SEGMENTDATESTRUCTURE_HPP +#define __STDAIR_BOM_SEGMENTDATESTRUCTURE_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// MPL +#include <boost/mpl/vector.hpp> +// STDAIR +#include <stdair/bom/BomStructure.hpp> +#include <stdair/bom/SegmentDateKey.hpp> +#include <stdair/bom/BomChildrenHolderImp.hpp> + +namespace stdair { + + // Forward declarations + template <typename BOM_CONTENT> class FlightDateStructure; + class BomStructureDummy; + class BomContentDummy; + + /** Wrapper class aimed at holding the actual content, modeled + by an external specific SegmentDate class (for instance, + in the AIRSCHED library). */ + template <class BOM_CONTENT> + class SegmentDateStructure : public BomStructure { + friend class FacBomStructure; + friend class FacBomContent; + friend class BomStructure; + + public: + // Type definitions + /** Definition allowing to retrieve the associated BOM content type. */ + typedef BOM_CONTENT Content_T; + + /** Definition allowing to retrieve the associated BOM key type. */ + typedef SegmentDateKey<BOM_CONTENT> BomKey_T; + + /** Definition allowing to retrieve the associated parent + BOM structure type. */ + typedef typename BOM_CONTENT::ParentBomContent_T::BomStructure_T ParentBomStructure_T; + + /** Definition allowing to retrieve the associated children type. */ + typedef boost::mpl::vector <BomStructureDummy, BomStructureDummy> ChildrenBomTypeList_T; + + /** Definition allowing to retrieve the default children bom holder type. */ + typedef BomChildrenHolderImp<BomContentDummy> DefaultChildrenBomHolder_T; + + public: + // /////////// Getters ///////////// + /** Get the (parent) FlightDateStructure object. */ + ParentBomStructure_T* getFlightDateStructurePtr() const { + return _parent; + } + + /** Get the (parent) FlightDateStructure object. */ + ParentBomStructure_T& getFlightDateStructure() const; + + /** Get the segment-date key. */ + const BomKey_T& getKey() const { + return _key; +... [truncated message content] |
From: <qua...@us...> - 2009-10-09 14:15:48
|
Revision: 40 http://stdair.svn.sourceforge.net/stdair/?rev=40&view=rev Author: quannaus Date: 2009-10-09 14:15:42 +0000 (Fri, 09 Oct 2009) Log Message: ----------- [Dev] Changed some private to protected. Modified Paths: -------------- trunk/stdair/stdair/bom/FlightDate.hpp trunk/stdair/stdair/bom/Inventory.hpp trunk/stdair/stdair/bom/LegDate.hpp trunk/stdair/stdair/bom/SegmentDate.hpp Modified: trunk/stdair/stdair/bom/FlightDate.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-09 13:58:02 UTC (rev 39) +++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-09 14:15:42 UTC (rev 40) @@ -102,7 +102,7 @@ /** Destructor. */ virtual ~FlightDate(); - private: + protected: // Attributes /** Reference structure. */ BomStructure_T& _flightDateStructure; Modified: trunk/stdair/stdair/bom/Inventory.hpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.hpp 2009-10-09 13:58:02 UTC (rev 39) +++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-09 14:15:42 UTC (rev 40) @@ -90,7 +90,7 @@ /** Destructor. */ virtual ~Inventory(); - private: + protected: // Attributes /** Reference structure. */ BomStructure_T& _inventoryStructure; Modified: trunk/stdair/stdair/bom/LegDate.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDate.hpp 2009-10-09 13:58:02 UTC (rev 39) +++ trunk/stdair/stdair/bom/LegDate.hpp 2009-10-09 14:15:42 UTC (rev 40) @@ -69,7 +69,7 @@ /** Destructor. */ virtual ~LegDate(); - private: + protected: // Attributes /** Reference structure. */ BomStructure_T& _legDateStructure; Modified: trunk/stdair/stdair/bom/SegmentDate.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-09 13:58:02 UTC (rev 39) +++ trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-09 14:15:42 UTC (rev 40) @@ -69,7 +69,7 @@ /** Destructor. */ virtual ~SegmentDate(); - private: + protected: // Attributes /** Reference structure. */ BomStructure_T& _segmentDateStructure; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2009-10-09 13:58:08
|
Revision: 39 http://stdair.svn.sourceforge.net/stdair/?rev=39&view=rev Author: quannaus Date: 2009-10-09 13:58:02 +0000 (Fri, 09 Oct 2009) Log Message: ----------- [Dev] Added the content objects. Modified Paths: -------------- trunk/stdair/stdair/bom/BomStructureRoot.hpp trunk/stdair/stdair/bom/FlightDateKey.hpp trunk/stdair/stdair/bom/FlightDateList.hpp trunk/stdair/stdair/bom/FlightDateStructure.hpp trunk/stdair/stdair/bom/InventoryKey.hpp trunk/stdair/stdair/bom/InventoryList.hpp trunk/stdair/stdair/bom/InventoryStructure.hpp trunk/stdair/stdair/bom/LegDateKey.hpp trunk/stdair/stdair/bom/LegDateList.hpp trunk/stdair/stdair/bom/SegmentDateKey.hpp trunk/stdair/stdair/bom/SegmentDateList.hpp trunk/stdair/stdair/bom/sources.mk Added Paths: ----------- trunk/stdair/stdair/bom/BomRootTypes.hpp trunk/stdair/stdair/bom/FlightDate.cpp trunk/stdair/stdair/bom/FlightDate.hpp trunk/stdair/stdair/bom/FlightDateList.cpp trunk/stdair/stdair/bom/FlightDateMap.cpp trunk/stdair/stdair/bom/FlightDateMap.hpp trunk/stdair/stdair/bom/FlightDateTypes.hpp trunk/stdair/stdair/bom/Inventory.cpp trunk/stdair/stdair/bom/Inventory.hpp trunk/stdair/stdair/bom/InventoryTypes.hpp trunk/stdair/stdair/bom/LegDate.cpp trunk/stdair/stdair/bom/LegDate.hpp trunk/stdair/stdair/bom/LegDateList.cpp trunk/stdair/stdair/bom/LegDateMap.cpp trunk/stdair/stdair/bom/LegDateMap.hpp trunk/stdair/stdair/bom/LegDateTypes.hpp trunk/stdair/stdair/bom/SegmentDate.cpp trunk/stdair/stdair/bom/SegmentDate.hpp trunk/stdair/stdair/bom/SegmentDateList.cpp trunk/stdair/stdair/bom/SegmentDateMap.cpp trunk/stdair/stdair/bom/SegmentDateMap.hpp trunk/stdair/stdair/bom/SegmentDateTypes.hpp Added: trunk/stdair/stdair/bom/BomRootTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/BomRootTypes.hpp (rev 0) +++ trunk/stdair/stdair/bom/BomRootTypes.hpp 2009-10-09 13:58:02 UTC (rev 39) @@ -0,0 +1,27 @@ +// ////////////////////////////////////////////////////////////////////// +#ifndef __STDAIR_BOM_BOMROOTTYPES_HPP +#define __STDAIR_BOM_BOMROOTTYPES_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// + +namespace stdair { + // Forward declarations. + template <typename BOM_CONTENT> class BomStructureRoot; + template <typename BOM_CONTENT> class BomStructureRootKey; + template <typename BOM_CHILD> class BomContentRoot; + class Inventory; + + /** Define the BomContentRoot. */ + typedef BomContentRoot<Inventory> BomContentRoot_T; + + /** Define the BomStructureRoot. */ + typedef BomStructureRoot<BomContentRoot_T> BomStructureRoot_T; + + /** Define the BomStructureRootKey. */ + typedef BomStructureRootKey<BomContentRoot_T> BomStructureRootKey_T; + +} +#endif // __STDAIR_BOM_BOMROOTTYPES_HPP + Modified: trunk/stdair/stdair/bom/BomStructureRoot.hpp =================================================================== --- trunk/stdair/stdair/bom/BomStructureRoot.hpp 2009-10-09 13:07:14 UTC (rev 38) +++ trunk/stdair/stdair/bom/BomStructureRoot.hpp 2009-10-09 13:58:02 UTC (rev 39) @@ -13,7 +13,7 @@ namespace stdair { // Forward declarations. - template <typename BOM_CONTENT> class Inventory; + template <typename BOM_CONTENT> class InventoryStructure; class BomStructureDummy; class BomContentDummy; @@ -38,7 +38,7 @@ typedef BomStructureRootKey<BOM_CONTENT> BomKey_T; /** Definition allowing to retrieve the associated children type. */ - typedef boost::mpl::vector<Inventory<ContentChild_T>, BomStructureDummy> ChildrenBomTypeList_T; + typedef boost::mpl::vector<InventoryStructure<ContentChild_T>, BomStructureDummy> ChildrenBomTypeList_T; /** Definition allowing to retrive the default children bom holder type. */ typedef BomChildrenHolderImp<BomContentDummy> DefaultChildrenBomHolder_T; Added: trunk/stdair/stdair/bom/FlightDate.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.cpp (rev 0) +++ trunk/stdair/stdair/bom/FlightDate.cpp 2009-10-09 13:58:02 UTC (rev 39) @@ -0,0 +1,81 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// C +#include <assert.h> +// STL +#include <iostream> +#include <algorithm> +// STDAIR +#include <stdair/bom/Inventory.hpp> +#include <stdair/bom/FlightDateStructure.hpp> +#include <stdair/bom/FlightDate.hpp> +#include <stdair/bom/SegmentDate.hpp> +#include <stdair/bom/SegmentDateList.hpp> +#include <stdair/bom/SegmentDateMap.hpp> +#include <stdair/bom/LegDate.hpp> +#include <stdair/bom/LegDateList.hpp> +#include <stdair/bom/LegDateMap.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + FlightDate::FlightDate (BomStructure_T& ioFlightStructure) + : _flightDateStructure (ioFlightStructure) { + } + + // //////////////////////////////////////////////////////////////////// + FlightDate::~FlightDate () { + } + + // ////////////////////////////////////////////////////////////////////// + void FlightDate::toStream (std::ostream& ioOut) const { + ioOut << toString() << std::endl; + } + + // ////////////////////////////////////////////////////////////////////// + void FlightDate::fromStream (std::istream& ioIn) { + } + + // ////////////////////////////////////////////////////////////////////// + std::string FlightDate::toString() const { + std::ostringstream oStr; + + // First, put the key of that level + oStr << describeShortKey() << std::endl; + + return oStr.str(); + } + + // ////////////////////////////////////////////////////////////////////// + const std::string FlightDate::describeKey() const { + return _flightDateStructure.describeKey(); + } + + // ////////////////////////////////////////////////////////////////////// + const std::string FlightDate::describeShortKey() const { + return _flightDateStructure.describeShortKey(); + } + + // ////////////////////////////////////////////////////////////////////// + SegmentDateList_T FlightDate::getSegmentDateList () const { + return SegmentDateList_T (_flightDateStructure); + } + + // ////////////////////////////////////////////////////////////////////// + SegmentDateMap_T FlightDate::getSegmentDateMap () const { + return SegmentDateMap_T (_flightDateStructure); + } + + // ////////////////////////////////////////////////////////////////////// + LegDateList_T FlightDate::getLegDateList () const { + return LegDateList_T (_flightDateStructure); + } + + // ////////////////////////////////////////////////////////////////////// + LegDateMap_T FlightDate::getLegDateMap () const { + return LegDateMap_T (_flightDateStructure); + } + +} + Added: trunk/stdair/stdair/bom/FlightDate.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.hpp (rev 0) +++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-09 13:58:02 UTC (rev 39) @@ -0,0 +1,113 @@ +#ifndef __STDAIR_BOM_FLIGHTDATE_HPP +#define __STDAIR_BOM_FLIGHTDATE_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/BomStructureList.hpp> +#include <stdair/bom/BomContent.hpp> +#include <stdair/bom/FlightDateTypes.hpp> +#include <stdair/bom/SegmentDateTypes.hpp> +#include <stdair/bom/LegDateTypes.hpp> + +namespace stdair { + // Forward declarations + class FacBomContent; + class BomStructure; + class Inventory; + struct SegmentDateList_T; + struct SegmentDateMap_T; + struct LegDateList_T; + struct LegDateMap_T; + + /** Class representing the actual functional/business content for a + flight-date. */ + class FlightDate : public BomContent { + friend class FacBomContent; + + public: + // Type definitions + // ///////////////////////////////////////////////////////////////////////// + // See the explanations, within the BomContentRoot class, for all + // the types which require to be specified below + // ///////////////////////////////////////////////////////////////////////// + /** Definition allowing to retrieve the associated parent + BOM content type. */ + typedef Inventory ParentBomContent_T; + + /** Definition allowing to retrieve the associated BOM structure type. */ + typedef FlightDateStructure_T BomStructure_T; + + /** Definition allowing to retrieve the associated BOM key type. */ + typedef FlightDateKey_T BomKey_T; + + /** Definition allowing to retrieve the associated + BOM content child type. */ + typedef SegmentDate ContentChild_T; + + /** Definition allowing to retrieve the associated second + BOM content child type. */ + typedef LegDate SecondContentChild_T; + + public: + // /////////// Display support methods ///////// + /** Dump a Business Object into an output stream. + @param ostream& the output stream. */ + void toStream (std::ostream& ioOut) const; + + /** Read a Business Object from an input stream. + @param istream& the input stream. */ + void fromStream (std::istream& ioIn); + + /** Get the serialised version of the Business Object. */ + std::string toString() const; + + /** Get a string describing the whole key (differentiating two objects + at any level). */ + const std::string describeKey() const; + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + const std::string describeShortKey() const; + + public: + // /////////// Getters ///////////// + /** Get a SegmentDateList_T for iteration methods. */ + SegmentDateList_T getSegmentDateList () const; + + /** Get a SegmentDateMap_T for iteration methods. */ + SegmentDateMap_T getSegmentDateMap () const; + + /** Get a LegDateList_T for iteration methods. */ + LegDateList_T getLegDateList () const; + + /** Get a LegDateMap_T for iteration methods. */ + LegDateMap_T getLegDateMap () const; + + private: + /** Retrieve the BOM structure object. */ + BomStructure_T& getBomStructure () { + return _flightDateStructure; + } + + private: + /** Constructors are private so as to force the usage of the Factory + layer. */ + /** Default constructors. */ + FlightDate (); + FlightDate (const FlightDate&); + FlightDate (BomStructure_T&); + + /** Destructor. */ + virtual ~FlightDate(); + + private: + // Attributes + /** Reference structure. */ + BomStructure_T& _flightDateStructure; + }; + +} +#endif // __STDAIR_BOM_FLIGHTDATE_HPP + Modified: trunk/stdair/stdair/bom/FlightDateKey.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateKey.hpp 2009-10-09 13:07:14 UTC (rev 38) +++ trunk/stdair/stdair/bom/FlightDateKey.hpp 2009-10-09 13:58:02 UTC (rev 39) @@ -12,7 +12,7 @@ // Forward declarations template <typename BOM_CONTENT> - class FlightDate; + class FlightDateStructure; /** Key of flight-date. */ template <typename BOM_CONTENT> @@ -23,7 +23,7 @@ private: // Type definitions /** Definition allowing to retrieve the associated BOM structure type. */ - typedef FlightDate<BOM_CONTENT> BomStructure_T; + typedef FlightDateStructure<BOM_CONTENT> BomStructure_T; public: // /////////// Construction /////////// Added: trunk/stdair/stdair/bom/FlightDateList.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateList.cpp (rev 0) +++ trunk/stdair/stdair/bom/FlightDateList.cpp 2009-10-09 13:58:02 UTC (rev 39) @@ -0,0 +1,51 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// STDAIR +#include <stdair/bom/InventoryStructure.hpp> +#include <stdair/bom/Inventory.hpp> +#include <stdair/bom/FlightDate.hpp> +#include <stdair/bom/FlightDateList.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + FlightDateList_T:: + FlightDateList_T (const InventoryStructure_T& iInventoryStructure) + : _inventoryStructure (iInventoryStructure) { + } + + // //////////////////////////////////////////////////////////////////// + FlightDateList_T:: + FlightDateList_T (const FlightDateList_T& iFDList) + : _inventoryStructure (iFDList._inventoryStructure) { + } + + // //////////////////////////////////////////////////////////////////// + FlightDateList_T::~FlightDateList_T () { + } + + // ////////////////////////////////////////////////////////////////////// + FlightDateList_T::iterator FlightDateList_T::begin () const { + return _inventoryStructure.flightDateListBegin (); + } + + // ////////////////////////////////////////////////////////////////////// + FlightDateList_T::iterator FlightDateList_T::end () const { + return _inventoryStructure.flightDateListEnd (); + } + + // ////////////////////////////////////////////////////////////////////// + FlightDateList_T::reverse_iterator FlightDateList_T::rbegin () const { + return _inventoryStructure.flightDateListRBegin (); + } + + // ////////////////////////////////////////////////////////////////////// + FlightDateList_T::reverse_iterator FlightDateList_T::rend () const { + return _inventoryStructure.flightDateListREnd (); + } + +} + Modified: trunk/stdair/stdair/bom/FlightDateList.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateList.hpp 2009-10-09 13:07:14 UTC (rev 38) +++ trunk/stdair/stdair/bom/FlightDateList.hpp 2009-10-09 13:58:02 UTC (rev 39) @@ -4,21 +4,63 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STL -#include <string> -#include <map> -#include <vector> -#include <list> +// STDAIR +#include <stdair/bom/InventoryTypes.hpp> +#include <stdair/bom/FlightDateTypes.hpp> namespace stdair { + +// Forward declarations + template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - /** Forward declarations. */ - class FlightDate; + /** Structure which handles the iterators for a flight-date list. */ + struct FlightDateList_T { - /** Define lists of Flight-Date objects. */ - typedef std::map<std::string, FlightDate*> FlightDateList_T; - typedef std::vector<FlightDate*> FlightDateOrderedList_T; - typedef std::list<const FlightDate*> FlightDateLightList_T; + public: + // ///////////////////////////////////////////////////////////////////////// + // See the explanations, within the stdair::BomContentRoot class, for all + // the iterator types specified below + // ///////////////////////////////////////////////////////////////////////// + /** Define the flight-date list iterators. */ + typedef BomIterator_T<FlightDate, + FlightDateStructureList_T::const_iterator> iterator; + typedef BomIterator_T<FlightDate, + FlightDateStructureList_T::const_reverse_iterator> reverse_iterator; + // ///////////////////////////////////////////////////////////////////////// + public: + // /////////// Iteration methods ////////// + /** Initialise the internal iterator on flight date: + return the iterator at the begining of the list. */ + iterator begin () const; + + /** Initialise the internal iterator on flight date: + return the iterator at the end of the list. */ + iterator end () const; + + /** Initialise the internal reverse iterator on flight date: + return the reverse iterator at the rbegining of the list. */ + reverse_iterator rbegin () const; + + /** Initialise the internal reverse iterator on flight date: + return the reverse iterator at the end of the list. */ + reverse_iterator rend () const; + + public: + /** Default constructors. */ + FlightDateList_T (); + FlightDateList_T (const FlightDateList_T&); + FlightDateList_T (const InventoryStructure_T&); + + /** Destructor. */ + virtual ~FlightDateList_T(); + + private: + // Attributes + /** Reference structure. */ + const InventoryStructure_T& _inventoryStructure; + }; + } #endif // __STDAIR_BOM_FLIGHTDATELIST_HPP + Added: trunk/stdair/stdair/bom/FlightDateMap.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateMap.cpp (rev 0) +++ trunk/stdair/stdair/bom/FlightDateMap.cpp 2009-10-09 13:58:02 UTC (rev 39) @@ -0,0 +1,51 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// STDAIR +#include <stdair/bom/InventoryStructure.hpp> +#include <stdair/bom/Inventory.hpp> +#include <stdair/bom/FlightDate.hpp> +#include <stdair/bom/FlightDateMap.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + FlightDateMap_T:: + FlightDateMap_T (const InventoryStructure_T& iInventoryStructure) + : _inventoryStructure (iInventoryStructure) { + } + + // //////////////////////////////////////////////////////////////////// + FlightDateMap_T:: + FlightDateMap_T (const FlightDateMap_T& iFDMap) + : _inventoryStructure (iFDMap._inventoryStructure) { + } + + // //////////////////////////////////////////////////////////////////// + FlightDateMap_T::~FlightDateMap_T () { + } + + // ////////////////////////////////////////////////////////////////////// + FlightDateMap_T::iterator FlightDateMap_T::begin () const { + return _inventoryStructure.flightDateMapBegin (); + } + + // ////////////////////////////////////////////////////////////////////// + FlightDateMap_T::iterator FlightDateMap_T::end () const { + return _inventoryStructure.flightDateMapEnd (); + } + + // ////////////////////////////////////////////////////////////////////// + FlightDateMap_T::reverse_iterator FlightDateMap_T::rbegin () const { + return _inventoryStructure.flightDateMapRBegin (); + } + + // ////////////////////////////////////////////////////////////////////// + FlightDateMap_T::reverse_iterator FlightDateMap_T::rend () const { + return _inventoryStructure.flightDateMapREnd (); + } + +} + Added: trunk/stdair/stdair/bom/FlightDateMap.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateMap.hpp (rev 0) +++ trunk/stdair/stdair/bom/FlightDateMap.hpp 2009-10-09 13:58:02 UTC (rev 39) @@ -0,0 +1,65 @@ +#ifndef __STDAIR_BOM_FLIGHTDATEMAP_HPP +#define __STDAIR_BOM_FLIGHTDATEMAP_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/InventoryTypes.hpp> +#include <stdair/bom/FlightDateTypes.hpp> + +namespace stdair { +// Forward declarations + template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; + + /** Structure which handles the iterators for a flight-date map. */ + struct FlightDateMap_T { + + public: + // ///////////////////////////////////////////////////////////////////////// + // See the explanations, within the stdair::BomContentRoot class, for all + // the iterator types specified below + // ///////////////////////////////////////////////////////////////////////// + /** Define the flight-date map iterators. */ + typedef BomIterator_T<FlightDate, + FlightDateStructureMap_T::const_iterator> iterator; + typedef BomIterator_T<FlightDate, + FlightDateStructureMap_T::const_reverse_iterator> reverse_iterator; + // ///////////////////////////////////////////////////////////////////////// + + public: + // /////////// Iteration methods ////////// + /** Initialise the internal iterator on flight date: + return the iterator at the begining of the map. */ + iterator begin () const; + + /** Initialise the internal iterator on flight date: + return the iterator at the end of the map. */ + iterator end () const; + + /** Initialise the internal reverse iterator on flight date: + return the reverse iterator at the rbegining of the map. */ + reverse_iterator rbegin () const; + + /** Initialise the internal reverse iterator on flight date: + return the reverse iterator at the end of the map. */ + reverse_iterator rend () const; + + public: + /** Default constructors. */ + FlightDateMap_T (); + FlightDateMap_T (const FlightDateMap_T&); + FlightDateMap_T (const InventoryStructure_T&); + + /** Destructor. */ + virtual ~FlightDateMap_T(); + + private: + // Attributes + /** Reference structure. */ + const InventoryStructure_T& _inventoryStructure; + }; + +} +#endif // __STDAIR_BOM_FLIGHTDATEMAP_HPP + Modified: trunk/stdair/stdair/bom/FlightDateStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-10-09 13:07:14 UTC (rev 38) +++ trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-10-09 13:58:02 UTC (rev 39) @@ -16,7 +16,7 @@ namespace stdair { // Forward declaration - template <typename BOM_CONTENT> class Inventory; + template <typename BOM_CONTENT> class InventoryStructure; class BomContentDummy; /** Wrapper class aimed at holding the actual content, modeled Added: trunk/stdair/stdair/bom/FlightDateTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateTypes.hpp (rev 0) +++ trunk/stdair/stdair/bom/FlightDateTypes.hpp 2009-10-09 13:58:02 UTC (rev 39) @@ -0,0 +1,33 @@ +// ////////////////////////////////////////////////////////////////////// +#ifndef __STDAIR_BOM_FLIGHTDATETYPES_HPP +#define __STDAIR_BOM_FLIGHTDATETYPES_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <map> +#include <vector> + +namespace stdair { + + // Forward declarations. + template <typename BOM_CONTENT> class FlightDateStructure; + template <typename BOM_CONTENT> class FlightDateKey; + class FlightDate; + + /** Define the FlightDate structure. */ + typedef FlightDateStructure<FlightDate> FlightDateStructure_T; + + /** Define the FlightDate key. */ + typedef FlightDateKey<FlightDate> FlightDateKey_T; + + /** Define the flight-date structure list. */ + typedef std::vector<FlightDateStructure_T*> FlightDateStructureList_T; + + /** Define the flight-date structure map. */ + typedef std::map<const std::string, FlightDateStructure_T*> FlightDateStructureMap_T; + +} +#endif // __STDAIR_BOM_FLIGHTDATETYPES_HPP + Added: trunk/stdair/stdair/bom/Inventory.cpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.cpp (rev 0) +++ trunk/stdair/stdair/bom/Inventory.cpp 2009-10-09 13:58:02 UTC (rev 39) @@ -0,0 +1,65 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// STDAIR +#include <stdair/bom/InventoryStructure.hpp> +#include <stdair/bom/Inventory.hpp> +#include <stdair/bom/FlightDate.hpp> +#include <stdair/bom/FlightDateList.hpp> +#include <stdair/bom/FlightDateMap.hpp> +#include <stdair/bom/SegmentDate.hpp> +#include <stdair/bom/LegDate.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + Inventory::Inventory (BomStructure_T& ioInventoryStructure) + : _inventoryStructure (ioInventoryStructure) { + } + + // //////////////////////////////////////////////////////////////////// + Inventory::~Inventory () { + } + + // ////////////////////////////////////////////////////////////////////// + void Inventory::toStream (std::ostream& ioOut) const { + ioOut << toString() << std::endl; + } + + // ////////////////////////////////////////////////////////////////////// + void Inventory::fromStream (std::istream& ioIn) { + } + + // ////////////////////////////////////////////////////////////////////// + std::string Inventory::toString() const { + std::ostringstream oStr; + + _inventoryStructure.describeFull (oStr); + + return oStr.str(); + } + + // ////////////////////////////////////////////////////////////////////// + const std::string Inventory::describeKey() const { + return _inventoryStructure.describeKey(); + } + + // ////////////////////////////////////////////////////////////////////// + const std::string Inventory::describeShortKey() const { + return _inventoryStructure.describeShortKey(); + } + + // ////////////////////////////////////////////////////////////////////// + FlightDateList_T Inventory::getFlightDateList () const { + return FlightDateList_T (_inventoryStructure); + } + + // ////////////////////////////////////////////////////////////////////// + FlightDateMap_T Inventory::getFlightDateMap () const { + return FlightDateMap_T (_inventoryStructure); + } + +} + Added: trunk/stdair/stdair/bom/Inventory.hpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.hpp (rev 0) +++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-09 13:58:02 UTC (rev 39) @@ -0,0 +1,101 @@ +#ifndef __STDAIR_BOM_INVENTORY_HPP +#define __STDAIR_BOM_INVENTORY_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/BomContent.hpp> +#include <stdair/bom/BomContentRoot.hpp> +#include <stdair/bom/BomRootTypes.hpp> +#include <stdair/bom/InventoryTypes.hpp> +#include <stdair/bom/FlightDateTypes.hpp> + +namespace stdair { + + // Forward declarations + class FacBomContent; + class FlightDate; + struct FlightDateList_T; + struct FlightDateMap_T; + + /** Class representing the actual functional/business content for + an airline inventory. */ + class Inventory : public BomContent { + friend class FacBomContent; + + public: + // ///////////////////////////////////////////////////////////////////////// + // See the explanations, within the BomContentRoot class, for all + // the types which require to be specified below + // ///////////////////////////////////////////////////////////////////////// + /** Definition allowing to retrieve the associated parent + BOM content type. */ + typedef BomContentRoot_T ParentBomContent_T; + + /** Definition allowing to retrieve the associated BOM structure type. */ + typedef InventoryStructure_T BomStructure_T; + + /** Definition allowing to retrieve the associated BOM key type. */ + typedef InventoryKey_T BomKey_T; + + /** Definition allowing to retrieve the associated BOM content child + type. */ + typedef FlightDate ContentChild_T; + // ///////////////////////////////////////////////////////////////////////// + + public: + // /////////// Display support methods ///////// + /** Dump a Business Object into an output stream. + @param ostream& the output stream. */ + void toStream (std::ostream& ioOut) const; + + /** Read a Business Object from an input stream. + @param istream& the input stream. */ + void fromStream (std::istream& ioIn); + + /** Get the serialised version of the Business Object. */ + std::string toString() const; + + /** Get a string describing the whole key (differentiating two objects + at any level). */ + const std::string describeKey() const; + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + const std::string describeShortKey() const; + + public: + // /////////// Getters ///////////// + /** Get a FlightDateList_T for iteration methods. */ + FlightDateList_T getFlightDateList () const; + + /** Get a FlightDateMap_T for iteration methods. */ + FlightDateMap_T getFlightDateMap () const; + + private: + /** Retrieve the BOM structure object. */ + BomStructure_T& getBomStructure () { + return _inventoryStructure; + } + + private: + /** Constructors are private so as to force the usage of the Factory + layer. */ + /** Default constructors. */ + Inventory (); + Inventory (const Inventory&); + Inventory (BomStructure_T&); + + /** Destructor. */ + virtual ~Inventory(); + + private: + // Attributes + /** Reference structure. */ + BomStructure_T& _inventoryStructure; + }; + +} +#endif // __STDAIR_BOM_INVENTORY_HPP + Modified: trunk/stdair/stdair/bom/InventoryKey.hpp =================================================================== --- trunk/stdair/stdair/bom/InventoryKey.hpp 2009-10-09 13:07:14 UTC (rev 38) +++ trunk/stdair/stdair/bom/InventoryKey.hpp 2009-10-09 13:58:02 UTC (rev 39) @@ -11,7 +11,7 @@ namespace stdair { // Forward declarations - template<typename BOM_CONTENT> class Inventory; + template<typename BOM_CONTENT> class InventoryStructure; /** Key of flight-date. */ template <typename BOM_CONTENT> @@ -22,7 +22,7 @@ private: // Type definitions /** Definition allowing to retrieve the associated BOM structure type. */ - typedef Inventory<BOM_CONTENT> BomStructure_T; + typedef InventoryStructure<BOM_CONTENT> BomStructure_T; public: // /////////// Construction /////////// Modified: trunk/stdair/stdair/bom/InventoryList.hpp =================================================================== --- trunk/stdair/stdair/bom/InventoryList.hpp 2009-10-09 13:07:14 UTC (rev 38) +++ trunk/stdair/stdair/bom/InventoryList.hpp 2009-10-09 13:58:02 UTC (rev 39) @@ -15,10 +15,5 @@ /** Forward declarations. */ class Inventory; - /** Define lists of Inventory objects. */ - typedef std::map<std::string, Inventory*> InventoryList_T; - typedef std::vector<Inventory*> InventoryOrderedList_T; - typedef std::list<const Inventory*> InventoryLightList_T; - } #endif // __STDAIR_BOM_INVENTORYLIST_HPP Modified: trunk/stdair/stdair/bom/InventoryStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-10-09 13:07:14 UTC (rev 38) +++ trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-10-09 13:58:02 UTC (rev 39) @@ -48,7 +48,7 @@ typedef typename BOM_CONTENT::ParentBomContent_T::BomStructure_T ParentBomStructure_T; /** Definition allowing to retrieve the associated children type. */ - typedef boost::mpl::vector<FlightDate<ContentChild_T>, + typedef boost::mpl::vector<FlightDateStructure<ContentChild_T>, BomStructureDummy> ChildrenBomTypeList_T; /** Define the default children bom holder type. */ Added: trunk/stdair/stdair/bom/InventoryTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/InventoryTypes.hpp (rev 0) +++ trunk/stdair/stdair/bom/InventoryTypes.hpp 2009-10-09 13:58:02 UTC (rev 39) @@ -0,0 +1,33 @@ +// ////////////////////////////////////////////////////////////////////// +#ifndef __STDAIR_BOM_INVENTORYTYPES_HPP +#define __STDAIR_BOM_INVENTORYTYPES_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <vector> +#include <map> + +namespace stdair { + + // Forward declarations. + template <typename BOM_CONTENT> class InventoryStructure; + template <typename BOM_CONTENT> class InventoryKey; + class Inventory; + + /** Define the Inventory structure. */ + typedef InventoryStructure<Inventory> InventoryStructure_T; + + /** Define the Inventory key. */ + typedef InventoryKey<Inventory> InventoryKey_T; + + /** Define the flight-date structure list. */ + typedef std::vector<InventoryStructure_T*> InventoryStructureList_T; + + /** Define the flight-date structure map. */ + typedef std::map<const std::string, InventoryStructure_T*> InventoryStructureMap_T; + +} +#endif // __STDAIR_BOM_INVENTORYTYPES_HPP + Added: trunk/stdair/stdair/bom/LegDate.cpp =================================================================== --- trunk/stdair/stdair/bom/LegDate.cpp (rev 0) +++ trunk/stdair/stdair/bom/LegDate.cpp 2009-10-09 13:58:02 UTC (rev 39) @@ -0,0 +1,55 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// C +#include <assert.h> +// STDAIR +#include <stdair/bom/LegDateStructure.hpp> +#include <stdair/bom/FlightDate.hpp> +#include <stdair/bom/LegDate.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + LegDate::LegDate (BomStructure_T& ioLegStructure) + : _legDateStructure (ioLegStructure) { + } + + // //////////////////////////////////////////////////////////////////// + LegDate::~LegDate () { + } + + // ////////////////////////////////////////////////////////////////////// + void LegDate::toStream (std::ostream& ioOut) const { + ioOut << toString() << std::endl; + } + + // ////////////////////////////////////////////////////////////////////// + void LegDate::fromStream (std::istream& ioIn) { + } + + // ////////////////////////////////////////////////////////////////////// + std::string LegDate::toString() const { + std::ostringstream oStr; + + // First, put the key of that level + oStr << describeShortKey() << std::endl; + + // Then, browse the children + // [...] (no child for now) + + return oStr.str(); + } + + // ////////////////////////////////////////////////////////////////////// + const std::string LegDate::describeKey() const { + return _legDateStructure.describeKey(); + } + + // ////////////////////////////////////////////////////////////////////// + const std::string LegDate::describeShortKey() const { + return _legDateStructure.describeShortKey(); + } + +} + Added: trunk/stdair/stdair/bom/LegDate.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDate.hpp (rev 0) +++ trunk/stdair/stdair/bom/LegDate.hpp 2009-10-09 13:58:02 UTC (rev 39) @@ -0,0 +1,80 @@ +#ifndef __STDAIR_BOM_LEGDATE_HPP +#define __STDAIR_BOM_LEGDATE_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/BomContent.hpp> +#include <stdair/bom/LegDateTypes.hpp> + +namespace stdair { + // Forward declarations + class FacBomContent; + class FlightDate; + + /** Class representing the actual functional/business content for a + leg-date. */ + class LegDate : public BomContent { + friend class FacBomContent; + + public: + // Type definitions + /** Definition allowing to retrieve the associated parent + BOM content type. */ + typedef FlightDate ParentBomContent_T; + + /** Definition allowing to retrieve the associated BOM structure type. */ + typedef LegDateStructure_T BomStructure_T; + + /** Definition allowing to retrieve the associated BOM key type. */ + typedef LegDateKey_T BomKey_T; + + public: + + // /////////// Display support methods ///////// + /** Dump a Business Object into an output stream. + @param ostream& the output stream. */ + void toStream (std::ostream& ioOut) const; + + /** Read a Business Object from an input stream. + @param istream& the input stream. */ + void fromStream (std::istream& ioIn); + + /** Get the serialised version of the Business Object. */ + std::string toString() const; + + /** Get a string describing the whole key (differentiating two objects + at any level). */ + const std::string describeKey() const; + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + const std::string describeShortKey() const; + + private: + /** Retrieve the BOM structure object. */ + BomStructure_T& getBomStructure () { + return _legDateStructure; + } + + private: + /** Constructors are private so as to force the usage of the Factory + layer. */ + /** Default constructors. */ + LegDate (); + LegDate (const LegDate&); + LegDate (BomStructure_T&); + + /** Destructor. */ + virtual ~LegDate(); + + private: + // Attributes + /** Reference structure. */ + BomStructure_T& _legDateStructure; + }; + +} +#endif // __STDAIR_BOM_LEGDATE_HPP + Modified: trunk/stdair/stdair/bom/LegDateKey.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDateKey.hpp 2009-10-09 13:07:14 UTC (rev 38) +++ trunk/stdair/stdair/bom/LegDateKey.hpp 2009-10-09 13:58:02 UTC (rev 39) @@ -12,7 +12,7 @@ // Forward declarations template <typename BOM_CONTENT> - class LegDate; + class LegDateStructure; /** Key of leg-date. */ template <typename BOM_CONTENT> @@ -23,7 +23,7 @@ private: // Type definitions /** Definition allowing to retrieve the associated BOM structure type. */ - typedef LegDate<BOM_CONTENT> BomStructure_T; + typedef LegDateStructure<BOM_CONTENT> BomStructure_T; public: // /////////// Construction /////////// Added: trunk/stdair/stdair/bom/LegDateList.cpp =================================================================== --- trunk/stdair/stdair/bom/LegDateList.cpp (rev 0) +++ trunk/stdair/stdair/bom/LegDateList.cpp 2009-10-09 13:58:02 UTC (rev 39) @@ -0,0 +1,53 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// 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/LegDate.hpp> +#include <stdair/bom/LegDateList.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + LegDateList_T:: + LegDateList_T (const FlightDateStructure_T& iFlightDateStructure) + : _flightDateStructure (iFlightDateStructure) { + } + + // //////////////////////////////////////////////////////////////////// + LegDateList_T:: + LegDateList_T (const LegDateList_T& iSDList) + : _flightDateStructure (iSDList._flightDateStructure) { + } + + // //////////////////////////////////////////////////////////////////// + LegDateList_T::~LegDateList_T () { + } + + // ////////////////////////////////////////////////////////////////////// + LegDateList_T::iterator LegDateList_T::begin () const { + return _flightDateStructure.legDateListBegin (); + } + + // ////////////////////////////////////////////////////////////////////// + LegDateList_T::iterator LegDateList_T::end () const { + return _flightDateStructure.legDateListEnd (); + } + + // ////////////////////////////////////////////////////////////////////// + LegDateList_T::reverse_iterator LegDateList_T::rbegin () const { + return _flightDateStructure.legDateListRBegin (); + } + + // ////////////////////////////////////////////////////////////////////// + LegDateList_T::reverse_iterator LegDateList_T::rend () const { + return _flightDateStructure.legDateListREnd (); + } + +} + Modified: trunk/stdair/stdair/bom/LegDateList.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDateList.hpp 2009-10-09 13:07:14 UTC (rev 38) +++ trunk/stdair/stdair/bom/LegDateList.hpp 2009-10-09 13:58:02 UTC (rev 39) @@ -4,21 +4,62 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STL -#include <string> -#include <map> -#include <vector> -#include <list> +// STDAIR +#include <stdair/bom/FlightDateTypes.hpp> +#include <stdair/bom/LegDateTypes.hpp> namespace stdair { + // Forward declarations. + template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - /** Forward declarations. */ - class LegDate; + /** Structure which handles the iterators for a leg-date list. */ + struct LegDateList_T { - /** Define lists of Leg-Date objects. */ - typedef std::map<std::string, LegDate*> LegDateList_T; - typedef std::vector<LegDate*> LegDateOrderedList_T; - typedef std::list<const LegDate*> LegDateLightList_T; + public: + // ///////////////////////////////////////////////////////////////////////// + // See the explanations, within the stdair::BomContentRoot class, for all + // the iterator types specified below + // ///////////////////////////////////////////////////////////////////////// + /** Define the leg-date list iterators. */ + typedef BomIterator_T<LegDate, + LegDateStructureList_T::const_iterator> iterator; + typedef BomIterator_T<LegDate, + LegDateStructureList_T::const_reverse_iterator> reverse_iterator; + // ///////////////////////////////////////////////////////////////////////// + public: + // /////////// Iteration methods ////////// + /** Initialise the internal iterator on leg date: + return the iterator at the begining of the list. */ + iterator begin () const; + + /** Initialise the internal iterator on leg date: + return the iterator at the end of the list. */ + iterator end () const; + + /** Initialise the internal reverse iterator on leg date: + return the reverse iterator at the rbegining of the list. */ + reverse_iterator rbegin () const; + + /** Initialise the internal reverse iterator on leg date: + return the reverse iterator at the end of the list. */ + reverse_iterator rend () const; + + public: + /** Default constructors. */ + LegDateList_T (); + LegDateList_T (const LegDateList_T&); + LegDateList_T (const FlightDateStructure_T&); + + /** Destructor. */ + virtual ~LegDateList_T(); + + private: + // Attributes + /** Reference structure. */ + const FlightDateStructure_T& _flightDateStructure; + }; + } #endif // __STDAIR_BOM_LEGDATELIST_HPP + Added: trunk/stdair/stdair/bom/LegDateMap.cpp =================================================================== --- trunk/stdair/stdair/bom/LegDateMap.cpp (rev 0) +++ trunk/stdair/stdair/bom/LegDateMap.cpp 2009-10-09 13:58:02 UTC (rev 39) @@ -0,0 +1,53 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// 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/LegDate.hpp> +#include <stdair/bom/LegDateMap.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + LegDateMap_T:: + LegDateMap_T (const FlightDateStructure_T& iFlightDateStructure) + : _flightDateStructure (iFlightDateStructure) { + } + + // //////////////////////////////////////////////////////////////////// + LegDateMap_T:: + LegDateMap_T (const LegDateMap_T& iSDMap) + : _flightDateStructure (iSDMap._flightDateStructure) { + } + + // //////////////////////////////////////////////////////////////////// + LegDateMap_T::~LegDateMap_T () { + } + + // ////////////////////////////////////////////////////////////////////// + LegDateMap_T::iterator LegDateMap_T::begin () const { + return _flightDateStructure.legDateMapBegin (); + } + + // ////////////////////////////////////////////////////////////////////// + LegDateMap_T::iterator LegDateMap_T::end () const { + return _flightDateStructure.legDateMapEnd (); + } + + // ////////////////////////////////////////////////////////////////////// + LegDateMap_T::reverse_iterator LegDateMap_T::rbegin () const { + return _flightDateStructure.legDateMapRBegin (); + } + + // ////////////////////////////////////////////////////////////////////// + LegDateMap_T::reverse_iterator LegDateMap_T::rend () const { + return _flightDateStructure.legDateMapREnd (); + } + +} + Added: trunk/stdair/stdair/bom/LegDateMap.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDateMap.hpp (rev 0) +++ trunk/stdair/stdair/bom/LegDateMap.hpp 2009-10-09 13:58:02 UTC (rev 39) @@ -0,0 +1,65 @@ +#ifndef __STDAIR_BOM_LEGDATEMAP_HPP +#define __STDAIR_BOM_LEGDATEMAP_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/FlightDateTypes.hpp> +#include <stdair/bom/LegDateTypes.hpp> + +namespace stdair { +// Forward declarations + template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; + + /** Structure which handles the iterators for a leg-date map. */ + struct LegDateMap_T { + + public: + // ///////////////////////////////////////////////////////////////////////// + // See the explanations, within the stdair::BomContentRoot class, for all + // the iterator types specified below + // ///////////////////////////////////////////////////////////////////////// + /** Define the leg-date map iterators. */ + typedef BomIterator_T<LegDate, + LegDateStructureMap_T::const_iterator> iterator; + typedef BomIterator_T<LegDate, + LegDateStructureMap_T::const_reverse_iterator> reverse_iterator; + // ///////////////////////////////////////////////////////////////////////// + + public: + // /////////// Iteration methods ////////// + /** Initialise the internal iterator on leg date: + return the iterator at the begining of the map. */ + iterator begin () const; + + /** Initialise the internal iterator on leg date: + return the iterator at the end of the map. */ + iterator end () const; + + /** Initialise the internal reverse iterator on leg date: + return the reverse iterator at the rbegining of the map. */ + reverse_iterator rbegin () const; + + /** Initialise the internal reverse iterator on leg date: + return the reverse iterator at the end of the map. */ + reverse_iterator rend () const; + + public: + /** Default constructors. */ + LegDateMap_T (); + LegDateMap_T (const LegDateMap_T&); + LegDateMap_T (const FlightDateStructure_T&); + + /** Destructor. */ + virtual ~LegDateMap_T(); + + private: + // Attributes + /** Reference structure. */ + const FlightDateStructure_T& _flightDateStructure; + }; + +} +#endif // __STDAIR_BOM_LEGDATEMAP_HPP + Added: trunk/stdair/stdair/bom/LegDateTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDateTypes.hpp (rev 0) +++ trunk/stdair/stdair/bom/LegDateTypes.hpp 2009-10-09 13:58:02 UTC (rev 39) @@ -0,0 +1,33 @@ +// ////////////////////////////////////////////////////////////////////// +#ifndef __STDAIR_BOM_LEGDATETYPES_HPP +#define __STDAIR_BOM_LEGDATETYPES_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <map> +#include <vector> + +namespace stdair { + + // Forward declarations. + template <typename BOM_CONTENT> class LegDateStructure; + template <typename BOM_CONTENT> class LegDateKey; + class LegDate; + + /** Define the LegDate structure. */ + typedef LegDateStructure<LegDate> LegDateStructure_T; + + /** Define the LegDate key. */ + typedef LegDateKey<LegDate> LegDateKey_T; + + /** Define the leg-date structure list. */ + typedef std::vector<LegDateStructure_T*> LegDateStructureList_T; + + /** Define the leg-date structure map. */ + typedef std::map<const std::string, LegDateStructure_T*> LegDateStructureMap_T; + +} +#endif // __STDAIR_BOM_LEGDATETYPES_HPP + Added: trunk/stdair/stdair/bom/SegmentDate.cpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDate.cpp (rev 0) +++ trunk/stdair/stdair/bom/SegmentDate.cpp 2009-10-09 13:58:02 UTC (rev 39) @@ -0,0 +1,55 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// C +#include <assert.h> +// STDAIR +#include <stdair/bom/SegmentDateStructure.hpp> +#include <stdair/bom/FlightDate.hpp> +#include <stdair/bom/SegmentDate.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + SegmentDate::SegmentDate (BomStructure_T& ioSegmentStructure) + : _segmentDateStructure (ioSegmentStructure) { + } + + // //////////////////////////////////////////////////////////////////// + SegmentDate::~SegmentDate () { + } + + // ////////////////////////////////////////////////////////////////////// + void SegmentDate::toStream (std::ostream& ioOut) const { + ioOut << toString() << std::endl; + } + + // ////////////////////////////////////////////////////////////////////// + void SegmentDate::fromStream (std::istream& ioIn) { + } + + // ////////////////////////////////////////////////////////////////////// + std::string SegmentDate::toString() const { + std::ostringstream oStr; + + // First, put the key of that level + oStr << describeShortKey() << std::endl; + + // Then, browse the children + // [...] (no child for now) + + return oStr.str(); + } + + // ////////////////////////////////////////////////////////////////////// + const std::string SegmentDate::describeKey() const { + return _segmentDateStructure.describeKey(); + } + + // ////////////////////////////////////////////////////////////////////// + const std::string SegmentDate::describeShortKey() const { + return _segmentDateStructure.describeShortKey(); + } + +} + Added: trunk/stdair/stdair/bom/SegmentDate.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDate.hpp (rev 0) +++ trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-09 13:58:02 UTC (rev 39) @@ -0,0 +1,80 @@ +#ifndef __STDAIR_BOM_SEGMENTDATE_HPP +#define __STDAIR_BOM_SEGMENTDATE_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/BomContent.hpp> +#include <stdair/bom/SegmentDateTypes.hpp> + +namespace stdair { + // Forward declarations + class FacBomContent; + class FlightDate; + + /** Class representing the actual functional/business content for a + segment-date. */ + class SegmentDate : public BomContent { + friend class FacBomContent; + + public: + // Type definitions + /** Definition allowing to retrieve the associated parent + BOM content type. */ + typedef FlightDate ParentBomContent_T; + + /** Definition allowing to retrieve the associated BOM structure type. */ + typedef SegmentDateStructure_T BomStructure_T; + + /** Definition allowing to retrieve the associated BOM key type. */ + typedef SegmentDateKey_T BomKey_T; + + public: + + // /////////// Display support methods ///////// + /** Dump a Business Object into an output stream. + @param ostream& the output stream. */ + void toStream (std::ostream& ioOut) const; + + /** Read a Business Object from an input stream. + @param istream& the input stream. */ + void fromStream (std::istream& ioIn); + + /** Get the serialised version of the Business Object. */ + std::string toString() const; + + /** Get a string describing the whole key (differentiating two objects + at any level). */ + const std::string describeKey() const; + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + const std::string describeShortKey() const; + + private: + /** Retrieve the BOM structure object. */ + BomStructure_T& getBomStructure () { + return _segmentDateStructure; + } + + private: + /** Constructors are private so as to force the usage of the Factory + layer. */ + /** Default constructors. */ + SegmentDate (); + SegmentDate (const SegmentDate&); + SegmentDate (BomStructure_T&); + + /** Destructor. */ + virtual ~SegmentDate(); + + private: + // Attributes + /** Reference structure. */ + BomStructure_T& _segmentDateStructure; + }; + +} +#endif // __STDAIR_BOM_SEGMENTDATE_HPP + Modified: trunk/stdair/stdair/bom/SegmentDateKey.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDateKey.hpp 2009-10-09 13:07:14 UTC (rev 38) +++ trunk/stdair/stdair/bom/SegmentDateKey.hpp 2009-10-09 13:58:02 UTC (rev 39) @@ -12,7 +12,7 @@ // Forward declarations template <typename BOM_CONTENT> - class SegmentDate; + class SegmentDateStructure; /** Key of segment-date. */ template <typename BOM_CONTENT> @@ -23,7 +23,7 @@ private: // Type definitions /** Definition allowing to retrieve the associated BOM structure type. */ - typedef SegmentDate<BOM_CONTENT> BomStructure_T; + typedef SegmentDateStructure<BOM_CONTENT> BomStructure_T; public: // /////////// Construction /////////// Added: trunk/stdair/stdair/bom/SegmentDateList.cpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDateList.cpp (rev 0) +++ trunk/stdair/stdair/bom/SegmentDateList.cpp 2009-10-09 13:58:02 UTC (rev 39) @@ -0,0 +1,53 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// 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/SegmentDateList.hpp> +#include <stdair/bom/LegDate.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + SegmentDateList_T:: + SegmentDateList_T (const FlightDateStructure_T& iFlightDateStructure) + : _flightDateStructure (iFlightDateStructure) { + } + + // //////////////////////////////////////////////////////////////////// + SegmentDateList_T:: + SegmentDateList_T (const SegmentDateList_T& iSDList) + : _flightDateStructure (iSDList._flightDateStructure) { + } + + // //////////////////////////////////////////////////////////////////// + SegmentDateList_T::~SegmentDateList_T () { + } + + // ////////////////////////////////////////////////////////////////////// + SegmentDateList_T::iterator SegmentDateList_T::begin () const { + return _flightDateStructure.segmentDateListBegin (); + } + + // ////////////////////////////////////////////////////////////////////// + SegmentDateList_T::iterator SegmentDateList_T::end () const { + return _flightDateStructure.segmentDateListEnd (); + } + + // ////////////////////////////////////////////////////////////////////// + SegmentDateList_T::reverse_iterator SegmentDateList_T::rbegin () const { + return _flightDateStructure.segmentDateListRBegin (); + } + + // ////////////////////////////////////////////////////////////////////// + SegmentDateList_T::reverse_iterator SegmentDateList_T::rend () const { + return _flightDateStructure.segmentDateListREnd (); + } + +} + Modified: trunk/stdair/stdair/bom/SegmentDateList.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDateList.hpp 2009-10-09 13:07:14 UTC (rev 38) +++ trunk/stdair/stdair/bom/SegmentDateList.hpp 2009-10-09 13:58:02 UTC (rev 39) @@ -4,21 +4,62 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STL -#include <string> -#include <map> -#include <vector> -#include <list> +// STDAIR +#include <stdair/bom/FlightDateTypes.hpp> +#include <stdair/bom/SegmentDateTypes.hpp> namespace stdair { +// Forward declarations + template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - /** Forward declarations. */ - class SegmentDate; + /** Structure which handles the iterators for a segment-date list. */ + struct SegmentDateList_T { - /** Define lists of Segment-Date objects. */ - typedef std::map<std::string, SegmentDate*> SegmentDateList_T; - typedef std::vector<SegmentDate*> SegmentDateOrderedList_T; - typedef std::list<const SegmentDate*> SegmentDateLightList_T; + public: + // ///////////////////////////////////////////////////////////////////////// + // See the explanations, within the stdair::BomContentRoot class, for all + // the iterator types specified below + // ///////////////////////////////////////////////////////////////////////// + /** Define the segment-date list iterators. */ + typedef BomIterator_T<SegmentDate, + SegmentDateStructureList_T::const_iterator> iterator; + typedef BomIterator_T<SegmentDate, + SegmentDateStructureList_T::const_reverse_iterator> reverse_iterator; + // ///////////////////////////////////////////////////////////////////////// + public: + // /////////// Iteration methods ////////// + /** Initialise the internal iterator on segment date: + return the iterator at the begining of the list. */ + iterator begin () const; + + /** Initialise the internal iterator on segment date: + return the iterator at the end of the list. */ + iterator end () const; + + /** Initialise the internal reverse iterator on segment date: + return the reverse iterator at the rbegining of the list. */ + reverse_iterator rbegin () const; + + /** Initialise the internal reverse iterator on segment date: + return the reverse iterator at the end of the list. */ + reverse_iterator rend () const; + + public: + /** Default constructors. */ + SegmentDateList_T (); + SegmentDateList_T (const SegmentDateList_T&); + SegmentDateList_T (const FlightDateStructure_T&); + + /** Destructor. */ + virtual ~SegmentDateList_T(); + + private: + // Attributes + /** Reference structure. */ + const FlightDateStructure_T& _flightDateStructure; + }; + } #endif // __STDAIR_BOM_SEGMENTDATELIST_HPP + Added: trunk/stdair/stdair/bom/SegmentDateMap.cpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDateMap.cpp (rev 0) +++ trunk/stdair/stdair/bom/SegmentDateMap.cpp 2009-10-09 13:58:02 UTC (rev 39) @@ -0,0 +1,53 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// /////////////////////////////////////////////////////////////////... [truncated message content] |
From: <qua...@us...> - 2009-10-12 08:57:49
|
Revision: 41 http://stdair.svn.sourceforge.net/stdair/?rev=41&view=rev Author: quannaus Date: 2009-10-12 08:57:42 +0000 (Mon, 12 Oct 2009) Log Message: ----------- [Dev] Added iterators for Inventory. Bom root now replaces the former WorldSchedule. Modified Paths: -------------- trunk/stdair/stdair/bom/BomStructureRoot.hpp trunk/stdair/stdair/bom/InventoryList.hpp trunk/stdair/stdair/bom/sources.mk Added Paths: ----------- trunk/stdair/stdair/bom/InventoryList.cpp trunk/stdair/stdair/bom/InventoryMap.cpp trunk/stdair/stdair/bom/InventoryMap.hpp Modified: trunk/stdair/stdair/bom/BomStructureRoot.hpp =================================================================== --- trunk/stdair/stdair/bom/BomStructureRoot.hpp 2009-10-09 14:15:42 UTC (rev 40) +++ trunk/stdair/stdair/bom/BomStructureRoot.hpp 2009-10-12 08:57:42 UTC (rev 41) @@ -47,7 +47,16 @@ typedef BomChildrenHolderImp<ContentChild_T> ChildrenBomHolder_T; public: + /** Define the iterators of the inventory list. */ + typedef typename ChildrenBomHolder_T::ListIterator_T InventoryListIterator_T; + typedef typename ChildrenBomHolder_T::ListReverseIterator_T InventoryListReverseIterator_T; + /** Define the iterators of the inventory map. */ + typedef typename ChildrenBomHolder_T::MapIterator_T InventoryMapIterator_T; + typedef typename ChildrenBomHolder_T::MapReverseIterator_T InventoryMapReverseIterator_T; + + public: + // /////////// Getters ///////////// /** Get the BomStructureRoot key. */ const BomKey_T& getKey() const { @@ -97,7 +106,64 @@ at the same level). */ const std::string describeShortKey() const { return _key.toString(); } + public: + // /////////// Iteration methods ////////// + /** Initialise the internal iterator on inventory: + return the iterator at the begining of the list. */ + InventoryListIterator_T inventoryListBegin () const { + assert (_childrenList != NULL); + return _childrenList->listBegin (); + } + + /** Initialise the internal iterator on inventory: + return the iterator at the end of the list. */ + InventoryListIterator_T inventoryListEnd () const { + assert (_childrenList != NULL); + return _childrenList->listEnd (); + } + + /** Initialise the internal reverse iterator on inventory: + return the reverse iterator at the rbegining of the list. */ + InventoryListReverseIterator_T inventoryListRBegin () const { + assert (_childrenList != NULL); + return _childrenList->listRBegin (); + } + + /** Initialise the internal reverse iterator on inventory: + return the reverse iterator at the rend of the list. */ + InventoryListReverseIterator_T inventoryListREnd () const { + assert (_childrenList != NULL); + return _childrenList->listREnd (); + } + /** Initialise the internal iterator on inventory: + return the iterator at the begining of the map. */ + InventoryMapIterator_T inventoryMapBegin () const { + assert (_childrenList != NULL); + return _childrenList->mapBegin (); + } + + /** Initialise the internal iterator on inventory: + return the iterator at the end of the map. */ + InventoryMapIterator_T inventoryMapEnd () const { + assert (_childrenList != NULL); + return _childrenList->mapEnd (); + } + + /** Initialise the internal reverse iterator on inventory: + return the reverse iterator at the rbegining of the map. */ + InventoryMapReverseIterator_T inventoryMapRBegin () const { + assert (_childrenList != NULL); + return _childrenList->mapRBegin (); + } + + /** Initialise the internal reverse iterator on inventory: + return the reverse iterator at the rend of the map. */ + InventoryMapReverseIterator_T inventoryMapREnd () const { + assert (_childrenList != NULL); + return _childrenList->mapREnd (); + } + private: /** Constructors are private so as to force the usage of the Factory layer. */ Copied: trunk/stdair/stdair/bom/InventoryList.cpp (from rev 40, trunk/stdair/stdair/bom/FlightDateList.cpp) =================================================================== --- trunk/stdair/stdair/bom/InventoryList.cpp (rev 0) +++ trunk/stdair/stdair/bom/InventoryList.cpp 2009-10-12 08:57:42 UTC (rev 41) @@ -0,0 +1,51 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// STDAIR +#include <stdair/bom/BomStructureRoot.hpp> +#include <stdair/bom/BomContentRoot.hpp> +#include <stdair/bom/Inventory.hpp> +#include <stdair/bom/InventoryList.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + InventoryList_T:: + InventoryList_T (const BomStructureRoot_T& iBomStructureRoot) + : _bomStructureRoot (iBomStructureRoot) { + } + + // //////////////////////////////////////////////////////////////////// + InventoryList_T:: + InventoryList_T (const InventoryList_T& iINVList) + : _bomStructureRoot (iINVList._bomStructureRoot) { + } + + // //////////////////////////////////////////////////////////////////// + InventoryList_T::~InventoryList_T () { + } + + // ////////////////////////////////////////////////////////////////////// + InventoryList_T::iterator InventoryList_T::begin () const { + return _bomStructureRoot.inventoryListBegin (); + } + + // ////////////////////////////////////////////////////////////////////// + InventoryList_T::iterator InventoryList_T::end () const { + return _bomStructureRoot.inventoryListEnd (); + } + + // ////////////////////////////////////////////////////////////////////// + InventoryList_T::reverse_iterator InventoryList_T::rbegin () const { + return _bomStructureRoot.inventoryListRBegin (); + } + + // ////////////////////////////////////////////////////////////////////// + InventoryList_T::reverse_iterator InventoryList_T::rend () const { + return _bomStructureRoot.inventoryListREnd (); + } + +} + Modified: trunk/stdair/stdair/bom/InventoryList.hpp =================================================================== --- trunk/stdair/stdair/bom/InventoryList.hpp 2009-10-09 14:15:42 UTC (rev 40) +++ trunk/stdair/stdair/bom/InventoryList.hpp 2009-10-12 08:57:42 UTC (rev 41) @@ -4,16 +4,63 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STL -#include <string> -#include <map> -#include <vector> -#include <list> +// STDAIR +#include <stdair/bom/BomRootTypes.hpp> +#include <stdair/bom/InventoryTypes.hpp> namespace stdair { + +// Forward declarations + template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - /** Forward declarations. */ - class Inventory; + /** Structure which handles the iterators for a flight-date list. */ + struct InventoryList_T { + public: + // ///////////////////////////////////////////////////////////////////////// + // See the explanations, within the stdair::BomContentRoot class, for all + // the iterator types specified below + // ///////////////////////////////////////////////////////////////////////// + /** Define the flight-date list iterators. */ + typedef BomIterator_T<Inventory, + InventoryStructureList_T::const_iterator> iterator; + typedef BomIterator_T<Inventory, + InventoryStructureList_T::const_reverse_iterator> reverse_iterator; + // ///////////////////////////////////////////////////////////////////////// + + public: + // /////////// Iteration methods ////////// + /** Initialise the internal iterator on flight date: + return the iterator at the begining of the list. */ + iterator begin () const; + + /** Initialise the internal iterator on flight date: + return the iterator at the end of the list. */ + iterator end () const; + + /** Initialise the internal reverse iterator on flight date: + return the reverse iterator at the rbegining of the list. */ + reverse_iterator rbegin () const; + + /** Initialise the internal reverse iterator on flight date: + return the reverse iterator at the end of the list. */ + reverse_iterator rend () const; + + public: + /** Default constructors. */ + InventoryList_T (); + InventoryList_T (const InventoryList_T&); + InventoryList_T (const BomStructureRoot_T&); + + /** Destructor. */ + virtual ~InventoryList_T(); + + private: + // Attributes + /** Reference structure. */ + const BomStructureRoot_T& _bomStructureRoot; + }; + } #endif // __STDAIR_BOM_INVENTORYLIST_HPP + Copied: trunk/stdair/stdair/bom/InventoryMap.cpp (from rev 40, trunk/stdair/stdair/bom/FlightDateMap.cpp) =================================================================== --- trunk/stdair/stdair/bom/InventoryMap.cpp (rev 0) +++ trunk/stdair/stdair/bom/InventoryMap.cpp 2009-10-12 08:57:42 UTC (rev 41) @@ -0,0 +1,51 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// STDAIR +#include <stdair/bom/BomStructureRoot.hpp> +#include <stdair/bom/BomContentRoot.hpp> +#include <stdair/bom/Inventory.hpp> +#include <stdair/bom/InventoryMap.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + InventoryMap_T:: + InventoryMap_T (const BomStructureRoot_T& iBomStructureRoot) + : _bomStructureRoot (iBomStructureRoot) { + } + + // //////////////////////////////////////////////////////////////////// + InventoryMap_T:: + InventoryMap_T (const InventoryMap_T& iINVMap) + : _bomStructureRoot (iINVMap._bomStructureRoot) { + } + + // //////////////////////////////////////////////////////////////////// + InventoryMap_T::~InventoryMap_T () { + } + + // ////////////////////////////////////////////////////////////////////// + InventoryMap_T::iterator InventoryMap_T::begin () const { + return _bomStructureRoot.inventoryMapBegin (); + } + + // ////////////////////////////////////////////////////////////////////// + InventoryMap_T::iterator InventoryMap_T::end () const { + return _bomStructureRoot.inventoryMapEnd (); + } + + // ////////////////////////////////////////////////////////////////////// + InventoryMap_T::reverse_iterator InventoryMap_T::rbegin () const { + return _bomStructureRoot.inventoryMapRBegin (); + } + + // ////////////////////////////////////////////////////////////////////// + InventoryMap_T::reverse_iterator InventoryMap_T::rend () const { + return _bomStructureRoot.inventoryMapREnd (); + } + +} + Copied: trunk/stdair/stdair/bom/InventoryMap.hpp (from rev 40, trunk/stdair/stdair/bom/FlightDateMap.hpp) =================================================================== --- trunk/stdair/stdair/bom/InventoryMap.hpp (rev 0) +++ trunk/stdair/stdair/bom/InventoryMap.hpp 2009-10-12 08:57:42 UTC (rev 41) @@ -0,0 +1,66 @@ +#ifndef __STDAIR_BOM_INVENTORYMAP_HPP +#define __STDAIR_BOM_INVENTORYMAP_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/BomRootTypes.hpp> +#include <stdair/bom/InventoryTypes.hpp> + +namespace stdair { + +// Forward declarations + template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; + + /** Structure which handles the iterators for a flight-date map. */ + struct InventoryMap_T { + + public: + // ///////////////////////////////////////////////////////////////////////// + // See the explanations, within the stdair::BomContentRoot class, for all + // the iterator types specified below + // ///////////////////////////////////////////////////////////////////////// + /** Define the flight-date map iterators. */ + typedef BomIterator_T<Inventory, + InventoryStructureMap_T::const_iterator> iterator; + typedef BomIterator_T<Inventory, + InventoryStructureMap_T::const_reverse_iterator> reverse_iterator; + // ///////////////////////////////////////////////////////////////////////// + + public: + // /////////// Iteration methods ////////// + /** Initialise the internal iterator on flight date: + return the iterator at the begining of the map. */ + iterator begin () const; + + /** Initialise the internal iterator on flight date: + return the iterator at the end of the map. */ + iterator end () const; + + /** Initialise the internal reverse iterator on flight date: + return the reverse iterator at the rbegining of the map. */ + reverse_iterator rbegin () const; + + /** Initialise the internal reverse iterator on flight date: + return the reverse iterator at the end of the map. */ + reverse_iterator rend () const; + + public: + /** Default constructors. */ + InventoryMap_T (); + InventoryMap_T (const InventoryMap_T&); + InventoryMap_T (const BomStructureRoot_T&); + + /** Destructor. */ + virtual ~InventoryMap_T(); + + private: + // Attributes + /** Reference structure. */ + const BomStructureRoot_T& _bomStructureRoot; + }; + +} +#endif // __STDAIR_BOM_INVENTORYMAP_HPP + Modified: trunk/stdair/stdair/bom/sources.mk =================================================================== --- trunk/stdair/stdair/bom/sources.mk 2009-10-09 14:15:42 UTC (rev 40) +++ trunk/stdair/stdair/bom/sources.mk 2009-10-12 08:57:42 UTC (rev 41) @@ -11,6 +11,8 @@ $(top_srcdir)/stdair/bom/BomStructureDummy.hpp \ $(top_srcdir)/stdair/bom/Inventory.hpp \ $(top_srcdir)/stdair/bom/InventoryTypes.hpp \ + $(top_srcdir)/stdair/bom/InventoryList.hpp \ + $(top_srcdir)/stdair/bom/InventoryMap.hpp \ $(top_srcdir)/stdair/bom/InventoryStructure.hpp \ $(top_srcdir)/stdair/bom/FlightDate.hpp \ $(top_srcdir)/stdair/bom/FlightDateTypes.hpp \ @@ -35,6 +37,8 @@ $(top_srcdir)/stdair/bom/BomIterator.hpp bom_cc_sources = \ $(top_srcdir)/stdair/bom/Inventory.cpp \ + $(top_srcdir)/stdair/bom/InventoryList.cpp \ + $(top_srcdir)/stdair/bom/InventoryMap.cpp \ $(top_srcdir)/stdair/bom/FlightDate.cpp \ $(top_srcdir)/stdair/bom/FlightDateList.cpp \ $(top_srcdir)/stdair/bom/FlightDateMap.cpp \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2009-10-12 15:13:38
|
Revision: 43 http://stdair.svn.sourceforge.net/stdair/?rev=43&view=rev Author: quannaus Date: 2009-10-12 15:13:31 +0000 (Mon, 12 Oct 2009) Log Message: ----------- [Dev] Fix some small bugs. Modified Paths: -------------- trunk/stdair/stdair/bom/LegDateStructure.hpp trunk/stdair/stdair/bom/SegmentDateStructure.hpp Modified: trunk/stdair/stdair/bom/LegDateStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDateStructure.hpp 2009-10-12 13:35:33 UTC (rev 42) +++ trunk/stdair/stdair/bom/LegDateStructure.hpp 2009-10-12 15:13:31 UTC (rev 43) @@ -45,7 +45,7 @@ typedef typename BOM_CONTENT::ContentChild_T ContentChild_T; /** Definition allowing to retrieve the associated children type. */ - typedef boost::mpl::vector <LegDateStructure<ContentChild_T>, + typedef boost::mpl::vector <LegCabinStructure<ContentChild_T>, BomStructureDummy> ChildrenBomTypeList_T; /** Definition allowing to retrieve the default children bom holder type. */ Modified: trunk/stdair/stdair/bom/SegmentDateStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDateStructure.hpp 2009-10-12 13:35:33 UTC (rev 42) +++ trunk/stdair/stdair/bom/SegmentDateStructure.hpp 2009-10-12 15:13:31 UTC (rev 43) @@ -45,7 +45,7 @@ typedef typename BOM_CONTENT::ContentChild_T ContentChild_T; /** Definition allowing to retrieve the associated children type. */ - typedef boost::mpl::vector <SegmentDateStructure<ContentChild_T>, + typedef boost::mpl::vector <SegmentCabinStructure<ContentChild_T>, BomStructureDummy> ChildrenBomTypeList_T; /** Definition allowing to retrieve the default children bom holder type. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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] |
From: <qua...@us...> - 2009-10-15 09:21:23
|
Revision: 46 http://stdair.svn.sourceforge.net/stdair/?rev=46&view=rev Author: quannaus Date: 2009-10-15 09:21:08 +0000 (Thu, 15 Oct 2009) Log Message: ----------- [Dev] Added the xxxContent objects. Modified Paths: -------------- trunk/stdair/stdair/bom/BomStructureRoot.hpp trunk/stdair/stdair/bom/BookingClass.hpp trunk/stdair/stdair/bom/FlightDate.hpp trunk/stdair/stdair/bom/Inventory.hpp trunk/stdair/stdair/bom/LegCabin.hpp trunk/stdair/stdair/bom/LegDate.hpp trunk/stdair/stdair/bom/SegmentCabin.hpp trunk/stdair/stdair/bom/SegmentDate.hpp trunk/stdair/stdair/bom/sources.mk Added Paths: ----------- trunk/stdair/stdair/bom/BookingClassContent.cpp trunk/stdair/stdair/bom/BookingClassContent.hpp trunk/stdair/stdair/bom/FlightDateContent.cpp trunk/stdair/stdair/bom/FlightDateContent.hpp trunk/stdair/stdair/bom/InventoryContent.cpp trunk/stdair/stdair/bom/InventoryContent.hpp trunk/stdair/stdair/bom/LegCabinContent.cpp trunk/stdair/stdair/bom/LegCabinContent.hpp trunk/stdair/stdair/bom/LegDateContent.cpp trunk/stdair/stdair/bom/LegDateContent.hpp trunk/stdair/stdair/bom/SegmentCabinContent.cpp trunk/stdair/stdair/bom/SegmentCabinContent.hpp trunk/stdair/stdair/bom/SegmentDateContent.cpp trunk/stdair/stdair/bom/SegmentDateContent.hpp Modified: trunk/stdair/stdair/bom/BomStructureRoot.hpp =================================================================== --- trunk/stdair/stdair/bom/BomStructureRoot.hpp 2009-10-14 14:33:39 UTC (rev 45) +++ trunk/stdair/stdair/bom/BomStructureRoot.hpp 2009-10-15 09:21:08 UTC (rev 46) @@ -47,16 +47,7 @@ typedef BomChildrenHolderImp<ContentChild_T> ChildrenBomHolder_T; public: - /** Define the iterators of the inventory list. */ - typedef typename ChildrenBomHolder_T::ListIterator_T InventoryListIterator_T; - typedef typename ChildrenBomHolder_T::ListReverseIterator_T InventoryListReverseIterator_T; - /** Define the iterators of the inventory map. */ - typedef typename ChildrenBomHolder_T::MapIterator_T InventoryMapIterator_T; - typedef typename ChildrenBomHolder_T::MapReverseIterator_T InventoryMapReverseIterator_T; - - public: - // /////////// Getters ///////////// /** Get the BomStructureRoot key. */ const BomKey_T& getKey() const { @@ -106,64 +97,6 @@ at the same level). */ const std::string describeShortKey() const { return _key.toString(); } - public: - // /////////// Iteration methods ////////// - /** Initialise the internal iterator on inventory: - return the iterator at the begining of the list. */ - InventoryListIterator_T inventoryListBegin () const { - assert (_childrenList != NULL); - return _childrenList->listBegin (); - } - - /** Initialise the internal iterator on inventory: - return the iterator at the end of the list. */ - InventoryListIterator_T inventoryListEnd () const { - assert (_childrenList != NULL); - return _childrenList->listEnd (); - } - - /** Initialise the internal reverse iterator on inventory: - return the reverse iterator at the rbegining of the list. */ - InventoryListReverseIterator_T inventoryListRBegin () const { - assert (_childrenList != NULL); - return _childrenList->listRBegin (); - } - - /** Initialise the internal reverse iterator on inventory: - return the reverse iterator at the rend of the list. */ - InventoryListReverseIterator_T inventoryListREnd () const { - assert (_childrenList != NULL); - return _childrenList->listREnd (); - } - - /** Initialise the internal iterator on inventory: - return the iterator at the begining of the map. */ - InventoryMapIterator_T inventoryMapBegin () const { - assert (_childrenList != NULL); - return _childrenList->mapBegin (); - } - - /** Initialise the internal iterator on inventory: - return the iterator at the end of the map. */ - InventoryMapIterator_T inventoryMapEnd () const { - assert (_childrenList != NULL); - return _childrenList->mapEnd (); - } - - /** Initialise the internal reverse iterator on inventory: - return the reverse iterator at the rbegining of the map. */ - InventoryMapReverseIterator_T inventoryMapRBegin () const { - assert (_childrenList != NULL); - return _childrenList->mapRBegin (); - } - - /** Initialise the internal reverse iterator on inventory: - return the reverse iterator at the rend of the map. */ - InventoryMapReverseIterator_T inventoryMapREnd () 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/BookingClass.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-14 14:33:39 UTC (rev 45) +++ trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-15 09:21:08 UTC (rev 46) @@ -5,7 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/BomContent.hpp> +#include <stdair/bom/BookingClassContent.hpp> #include <stdair/bom/SegmentCabinTypes.hpp> #include <stdair/bom/BookingClassTypes.hpp> @@ -18,7 +18,7 @@ /** Class representing the actual functional/business content for a segment-cabin. */ - class BookingClass : public BomContent { + class BookingClass : public BookingClassContent { friend class FacBomContent; public: Copied: trunk/stdair/stdair/bom/BookingClassContent.cpp (from rev 45, trunk/stdair/stdair/bom/Inventory.cpp) =================================================================== --- trunk/stdair/stdair/bom/BookingClassContent.cpp (rev 0) +++ trunk/stdair/stdair/bom/BookingClassContent.cpp 2009-10-15 09:21:08 UTC (rev 46) @@ -0,0 +1,20 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// STDAIR +#include <stdair/bom/BookingClassContent.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + BookingClassContent::BookingClassContent () { + } + + // //////////////////////////////////////////////////////////////////// + BookingClassContent::~BookingClassContent () { + } + +} + Copied: trunk/stdair/stdair/bom/BookingClassContent.hpp (from rev 45, trunk/stdair/stdair/bom/Inventory.hpp) =================================================================== --- trunk/stdair/stdair/bom/BookingClassContent.hpp (rev 0) +++ trunk/stdair/stdair/bom/BookingClassContent.hpp 2009-10-15 09:21:08 UTC (rev 46) @@ -0,0 +1,50 @@ +#ifndef __STDAIR_BOM_BOOKINGCLASSCONTENT_HPP +#define __STDAIR_BOM_BOOKINGCLASSCONTENT_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/BomContent.hpp> + +namespace stdair { + + /** Class representing the actual attributes for an airline booking class. */ + class BookingClassContent : public BomContent { + public: + // /////////// Display support methods ///////// + /** Dump a Business Object into an output stream. + @param ostream& the output stream. */ + virtual void toStream (std::ostream& ioOut) const = 0; + + /** Read a Business Object from an input stream. + @param istream& the input stream. */ + virtual void fromStream (std::istream& ioIn) = 0; + + /** Get the serialised version of the Business Object. */ + virtual std::string toString() const = 0; + + /** Get a string describing the whole key (differentiating two objects + at any level). */ + virtual const std::string describeKey() const = 0; + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + virtual const std::string describeShortKey() const = 0; + + + protected: + /** Default constructors. */ + BookingClassContent (); + BookingClassContent (const BookingClassContent&); + + /** Destructor. */ + virtual ~BookingClassContent(); + + protected: + // Attributes + }; + +} +#endif // __STDAIR_BOM_BOOKINGCLASSCONTENT_HPP + Modified: trunk/stdair/stdair/bom/FlightDate.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-14 14:33:39 UTC (rev 45) +++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-15 09:21:08 UTC (rev 46) @@ -5,7 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/BomContent.hpp> +#include <stdair/bom/FlightDateContent.hpp> #include <stdair/bom/FlightDateTypes.hpp> #include <stdair/bom/SegmentDateTypes.hpp> #include <stdair/bom/LegDateTypes.hpp> @@ -22,7 +22,7 @@ /** Class representing the actual functional/business content for a flight-date. */ - class FlightDate : public BomContent { + class FlightDate : public FlightDateContent { friend class FacBomContent; public: Copied: trunk/stdair/stdair/bom/FlightDateContent.cpp (from rev 45, trunk/stdair/stdair/bom/Inventory.cpp) =================================================================== --- trunk/stdair/stdair/bom/FlightDateContent.cpp (rev 0) +++ trunk/stdair/stdair/bom/FlightDateContent.cpp 2009-10-15 09:21:08 UTC (rev 46) @@ -0,0 +1,20 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// STDAIR +#include <stdair/bom/FlightDateContent.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + FlightDateContent::FlightDateContent () { + } + + // //////////////////////////////////////////////////////////////////// + FlightDateContent::~FlightDateContent () { + } + +} + Copied: trunk/stdair/stdair/bom/FlightDateContent.hpp (from rev 45, trunk/stdair/stdair/bom/Inventory.hpp) =================================================================== --- trunk/stdair/stdair/bom/FlightDateContent.hpp (rev 0) +++ trunk/stdair/stdair/bom/FlightDateContent.hpp 2009-10-15 09:21:08 UTC (rev 46) @@ -0,0 +1,50 @@ +#ifndef __STDAIR_BOM_FLIGHTDATECONTENT_HPP +#define __STDAIR_BOM_FLIGHTDATECONTENT_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/BomContent.hpp> + +namespace stdair { + + /** Class representing the actual attributes for an airline flight-date. */ + class FlightDateContent : public BomContent { + public: + // /////////// Display support methods ///////// + /** Dump a Business Object into an output stream. + @param ostream& the output stream. */ + virtual void toStream (std::ostream& ioOut) const = 0; + + /** Read a Business Object from an input stream. + @param istream& the input stream. */ + virtual void fromStream (std::istream& ioIn) = 0; + + /** Get the serialised version of the Business Object. */ + virtual std::string toString() const = 0; + + /** Get a string describing the whole key (differentiating two objects + at any level). */ + virtual const std::string describeKey() const = 0; + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + virtual const std::string describeShortKey() const = 0; + + + protected: + /** Default constructors. */ + FlightDateContent (); + FlightDateContent (const FlightDateContent&); + + /** Destructor. */ + virtual ~FlightDateContent(); + + protected: + // Attributes + }; + +} +#endif // __STDAIR_BOM_FLIGHTDATECONTENT_HPP + Modified: trunk/stdair/stdair/bom/Inventory.hpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.hpp 2009-10-14 14:33:39 UTC (rev 45) +++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-15 09:21:08 UTC (rev 46) @@ -5,8 +5,8 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/BomContent.hpp> #include <stdair/bom/BomContentRoot.hpp> +#include <stdair/bom/InventoryContent.hpp> #include <stdair/bom/BomRootTypes.hpp> #include <stdair/bom/InventoryTypes.hpp> #include <stdair/bom/FlightDateTypes.hpp> @@ -21,7 +21,7 @@ /** Class representing the actual functional/business content for an airline inventory. */ - class Inventory : public BomContent { + class Inventory : public InventoryContent { friend class FacBomContent; public: Copied: trunk/stdair/stdair/bom/InventoryContent.cpp (from rev 45, trunk/stdair/stdair/bom/Inventory.cpp) =================================================================== --- trunk/stdair/stdair/bom/InventoryContent.cpp (rev 0) +++ trunk/stdair/stdair/bom/InventoryContent.cpp 2009-10-15 09:21:08 UTC (rev 46) @@ -0,0 +1,20 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// STDAIR +#include <stdair/bom/InventoryContent.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + InventoryContent::InventoryContent () { + } + + // //////////////////////////////////////////////////////////////////// + InventoryContent::~InventoryContent () { + } + +} + Copied: trunk/stdair/stdair/bom/InventoryContent.hpp (from rev 45, trunk/stdair/stdair/bom/Inventory.hpp) =================================================================== --- trunk/stdair/stdair/bom/InventoryContent.hpp (rev 0) +++ trunk/stdair/stdair/bom/InventoryContent.hpp 2009-10-15 09:21:08 UTC (rev 46) @@ -0,0 +1,50 @@ +#ifndef __STDAIR_BOM_INVENTORYCONTENT_HPP +#define __STDAIR_BOM_INVENTORYCONTENT_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/BomContent.hpp> + +namespace stdair { + + /** Class representing the actual attributes for an airline inventory. */ + class InventoryContent : public BomContent { + public: + // /////////// Display support methods ///////// + /** Dump a Business Object into an output stream. + @param ostream& the output stream. */ + virtual void toStream (std::ostream& ioOut) const = 0; + + /** Read a Business Object from an input stream. + @param istream& the input stream. */ + virtual void fromStream (std::istream& ioIn) = 0; + + /** Get the serialised version of the Business Object. */ + virtual std::string toString() const = 0; + + /** Get a string describing the whole key (differentiating two objects + at any level). */ + virtual const std::string describeKey() const = 0; + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + virtual const std::string describeShortKey() const = 0; + + + protected: + /** Default constructors. */ + InventoryContent (); + InventoryContent (const InventoryContent&); + + /** Destructor. */ + virtual ~InventoryContent(); + + protected: + // Attributes + }; + +} +#endif // __STDAIR_BOM_INVENTORYCONTENT_HPP + Modified: trunk/stdair/stdair/bom/LegCabin.hpp =================================================================== --- trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-14 14:33:39 UTC (rev 45) +++ trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-15 09:21:08 UTC (rev 46) @@ -5,7 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/BomContent.hpp> +#include <stdair/bom/LegCabinContent.hpp> #include <stdair/bom/LegCabinTypes.hpp> namespace stdair { @@ -15,7 +15,7 @@ /** Class representing the actual functional/business content for a leg-date. */ - class LegCabin : public BomContent { + class LegCabin : public LegCabinContent { friend class FacBomContent; public: Copied: trunk/stdair/stdair/bom/LegCabinContent.cpp (from rev 45, trunk/stdair/stdair/bom/Inventory.cpp) =================================================================== --- trunk/stdair/stdair/bom/LegCabinContent.cpp (rev 0) +++ trunk/stdair/stdair/bom/LegCabinContent.cpp 2009-10-15 09:21:08 UTC (rev 46) @@ -0,0 +1,20 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// STDAIR +#include <stdair/bom/LegCabinContent.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + LegCabinContent::LegCabinContent () { + } + + // //////////////////////////////////////////////////////////////////// + LegCabinContent::~LegCabinContent () { + } + +} + Copied: trunk/stdair/stdair/bom/LegCabinContent.hpp (from rev 45, trunk/stdair/stdair/bom/Inventory.hpp) =================================================================== --- trunk/stdair/stdair/bom/LegCabinContent.hpp (rev 0) +++ trunk/stdair/stdair/bom/LegCabinContent.hpp 2009-10-15 09:21:08 UTC (rev 46) @@ -0,0 +1,50 @@ +#ifndef __STDAIR_BOM_LEGCABINCONTENT_HPP +#define __STDAIR_BOM_LEGCABINCONTENT_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/BomContent.hpp> + +namespace stdair { + + /** Class representing the actual attributes for an airline leg-cabin. */ + class LegCabinContent : public BomContent { + public: + // /////////// Display support methods ///////// + /** Dump a Business Object into an output stream. + @param ostream& the output stream. */ + virtual void toStream (std::ostream& ioOut) const = 0; + + /** Read a Business Object from an input stream. + @param istream& the input stream. */ + virtual void fromStream (std::istream& ioIn) = 0; + + /** Get the serialised version of the Business Object. */ + virtual std::string toString() const = 0; + + /** Get a string describing the whole key (differentiating two objects + at any level). */ + virtual const std::string describeKey() const = 0; + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + virtual const std::string describeShortKey() const = 0; + + + protected: + /** Default constructors. */ + LegCabinContent (); + LegCabinContent (const LegCabinContent&); + + /** Destructor. */ + virtual ~LegCabinContent(); + + protected: + // Attributes + }; + +} +#endif // __STDAIR_BOM_LEGCABINCONTENT_HPP + Modified: trunk/stdair/stdair/bom/LegDate.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDate.hpp 2009-10-14 14:33:39 UTC (rev 45) +++ trunk/stdair/stdair/bom/LegDate.hpp 2009-10-15 09:21:08 UTC (rev 46) @@ -5,7 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/BomContent.hpp> +#include <stdair/bom/LegDateContent.hpp> #include <stdair/bom/LegDateTypes.hpp> #include <stdair/bom/LegCabinTypes.hpp> @@ -18,7 +18,7 @@ /** Class representing the actual functional/business content for a leg-date. */ - class LegDate : public BomContent { + class LegDate : public LegDateContent { friend class FacBomContent; public: Copied: trunk/stdair/stdair/bom/LegDateContent.cpp (from rev 45, trunk/stdair/stdair/bom/Inventory.cpp) =================================================================== --- trunk/stdair/stdair/bom/LegDateContent.cpp (rev 0) +++ trunk/stdair/stdair/bom/LegDateContent.cpp 2009-10-15 09:21:08 UTC (rev 46) @@ -0,0 +1,20 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// STDAIR +#include <stdair/bom/LegDateContent.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + LegDateContent::LegDateContent () { + } + + // //////////////////////////////////////////////////////////////////// + LegDateContent::~LegDateContent () { + } + +} + Copied: trunk/stdair/stdair/bom/LegDateContent.hpp (from rev 45, trunk/stdair/stdair/bom/Inventory.hpp) =================================================================== --- trunk/stdair/stdair/bom/LegDateContent.hpp (rev 0) +++ trunk/stdair/stdair/bom/LegDateContent.hpp 2009-10-15 09:21:08 UTC (rev 46) @@ -0,0 +1,50 @@ +#ifndef __STDAIR_BOM_LEGDATECONTENT_HPP +#define __STDAIR_BOM_LEGDATECONTENT_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/BomContent.hpp> + +namespace stdair { + + /** Class representing the actual attributes for an airline leg-date. */ + class LegDateContent : public BomContent { + public: + // /////////// Display support methods ///////// + /** Dump a Business Object into an output stream. + @param ostream& the output stream. */ + virtual void toStream (std::ostream& ioOut) const = 0; + + /** Read a Business Object from an input stream. + @param istream& the input stream. */ + virtual void fromStream (std::istream& ioIn) = 0; + + /** Get the serialised version of the Business Object. */ + virtual std::string toString() const = 0; + + /** Get a string describing the whole key (differentiating two objects + at any level). */ + virtual const std::string describeKey() const = 0; + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + virtual const std::string describeShortKey() const = 0; + + + protected: + /** Default constructors. */ + LegDateContent (); + LegDateContent (const LegDateContent&); + + /** Destructor. */ + virtual ~LegDateContent(); + + protected: + // Attributes + }; + +} +#endif // __STDAIR_BOM_LEGDATECONTENT_HPP + Modified: trunk/stdair/stdair/bom/SegmentCabin.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-14 14:33:39 UTC (rev 45) +++ trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-15 09:21:08 UTC (rev 46) @@ -5,7 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/BomContent.hpp> +#include <stdair/bom/SegmentCabinContent.hpp> #include <stdair/bom/SegmentCabinTypes.hpp> #include <stdair/bom/BookingClassTypes.hpp> @@ -18,7 +18,7 @@ /** Class representing the actual functional/business content for a segment-date. */ - class SegmentCabin : public BomContent { + class SegmentCabin : public SegmentCabinContent { friend class FacBomContent; public: Copied: trunk/stdair/stdair/bom/SegmentCabinContent.cpp (from rev 45, trunk/stdair/stdair/bom/Inventory.cpp) =================================================================== --- trunk/stdair/stdair/bom/SegmentCabinContent.cpp (rev 0) +++ trunk/stdair/stdair/bom/SegmentCabinContent.cpp 2009-10-15 09:21:08 UTC (rev 46) @@ -0,0 +1,20 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// STDAIR +#include <stdair/bom/SegmentCabinContent.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + SegmentCabinContent::SegmentCabinContent () { + } + + // //////////////////////////////////////////////////////////////////// + SegmentCabinContent::~SegmentCabinContent () { + } + +} + Copied: trunk/stdair/stdair/bom/SegmentCabinContent.hpp (from rev 45, trunk/stdair/stdair/bom/Inventory.hpp) =================================================================== --- trunk/stdair/stdair/bom/SegmentCabinContent.hpp (rev 0) +++ trunk/stdair/stdair/bom/SegmentCabinContent.hpp 2009-10-15 09:21:08 UTC (rev 46) @@ -0,0 +1,50 @@ +#ifndef __STDAIR_BOM_SEGMENTCABINCONTENT_HPP +#define __STDAIR_BOM_SEGMENTCABINCONTENT_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/BomContent.hpp> + +namespace stdair { + + /** Class representing the actual attributes for an airline segment-cabin. */ + class SegmentCabinContent : public BomContent { + public: + // /////////// Display support methods ///////// + /** Dump a Business Object into an output stream. + @param ostream& the output stream. */ + virtual void toStream (std::ostream& ioOut) const = 0; + + /** Read a Business Object from an input stream. + @param istream& the input stream. */ + virtual void fromStream (std::istream& ioIn) = 0; + + /** Get the serialised version of the Business Object. */ + virtual std::string toString() const = 0; + + /** Get a string describing the whole key (differentiating two objects + at any level). */ + virtual const std::string describeKey() const = 0; + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + virtual const std::string describeShortKey() const = 0; + + + protected: + /** Default constructors. */ + SegmentCabinContent (); + SegmentCabinContent (const SegmentCabinContent&); + + /** Destructor. */ + virtual ~SegmentCabinContent(); + + protected: + // Attributes + }; + +} +#endif // __STDAIR_BOM_SEGMENTCABINCONTENT_HPP + Modified: trunk/stdair/stdair/bom/SegmentDate.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-14 14:33:39 UTC (rev 45) +++ trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-15 09:21:08 UTC (rev 46) @@ -5,7 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/BomContent.hpp> +#include <stdair/bom/SegmentDateContent.hpp> #include <stdair/bom/SegmentDateTypes.hpp> #include <stdair/bom/SegmentCabinTypes.hpp> @@ -18,7 +18,7 @@ /** Class representing the actual functional/business content for a segment-date. */ - class SegmentDate : public BomContent { + class SegmentDate : public SegmentDateContent { friend class FacBomContent; public: Copied: trunk/stdair/stdair/bom/SegmentDateContent.cpp (from rev 45, trunk/stdair/stdair/bom/Inventory.cpp) =================================================================== --- trunk/stdair/stdair/bom/SegmentDateContent.cpp (rev 0) +++ trunk/stdair/stdair/bom/SegmentDateContent.cpp 2009-10-15 09:21:08 UTC (rev 46) @@ -0,0 +1,20 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +// STDAIR +#include <stdair/bom/SegmentDateContent.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + SegmentDateContent::SegmentDateContent () { + } + + // //////////////////////////////////////////////////////////////////// + SegmentDateContent::~SegmentDateContent () { + } + +} + Copied: trunk/stdair/stdair/bom/SegmentDateContent.hpp (from rev 45, trunk/stdair/stdair/bom/Inventory.hpp) =================================================================== --- trunk/stdair/stdair/bom/SegmentDateContent.hpp (rev 0) +++ trunk/stdair/stdair/bom/SegmentDateContent.hpp 2009-10-15 09:21:08 UTC (rev 46) @@ -0,0 +1,50 @@ +#ifndef __STDAIR_BOM_SEGMENTDATECONTENT_HPP +#define __STDAIR_BOM_SEGMENTDATECONTENT_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/BomContent.hpp> + +namespace stdair { + + /** Class representing the actual attributes for an airline segment-date. */ + class SegmentDateContent : public BomContent { + public: + // /////////// Display support methods ///////// + /** Dump a Business Object into an output stream. + @param ostream& the output stream. */ + virtual void toStream (std::ostream& ioOut) const = 0; + + /** Read a Business Object from an input stream. + @param istream& the input stream. */ + virtual void fromStream (std::istream& ioIn) = 0; + + /** Get the serialised version of the Business Object. */ + virtual std::string toString() const = 0; + + /** Get a string describing the whole key (differentiating two objects + at any level). */ + virtual const std::string describeKey() const = 0; + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + virtual const std::string describeShortKey() const = 0; + + + protected: + /** Default constructors. */ + SegmentDateContent (); + SegmentDateContent (const SegmentDateContent&); + + /** Destructor. */ + virtual ~SegmentDateContent(); + + protected: + // Attributes + }; + +} +#endif // __STDAIR_BOM_SEGMENTDATECONTENT_HPP + Modified: trunk/stdair/stdair/bom/sources.mk =================================================================== --- trunk/stdair/stdair/bom/sources.mk 2009-10-14 14:33:39 UTC (rev 45) +++ trunk/stdair/stdair/bom/sources.mk 2009-10-15 09:21:08 UTC (rev 46) @@ -12,36 +12,43 @@ $(top_srcdir)/stdair/bom/BomStructureRoot.hpp \ $(top_srcdir)/stdair/bom/BomStructureDummy.hpp \ $(top_srcdir)/stdair/bom/Inventory.hpp \ + $(top_srcdir)/stdair/bom/InventoryContent.hpp \ $(top_srcdir)/stdair/bom/InventoryTypes.hpp \ $(top_srcdir)/stdair/bom/InventoryList.hpp \ $(top_srcdir)/stdair/bom/InventoryMap.hpp \ $(top_srcdir)/stdair/bom/InventoryStructure.hpp \ $(top_srcdir)/stdair/bom/FlightDate.hpp \ + $(top_srcdir)/stdair/bom/FlightDateContent.hpp \ $(top_srcdir)/stdair/bom/FlightDateTypes.hpp \ $(top_srcdir)/stdair/bom/FlightDateList.hpp \ $(top_srcdir)/stdair/bom/FlightDateMap.hpp \ $(top_srcdir)/stdair/bom/FlightDateStructure.hpp \ $(top_srcdir)/stdair/bom/SegmentDate.hpp \ + $(top_srcdir)/stdair/bom/SegmentDateContent.hpp \ $(top_srcdir)/stdair/bom/SegmentDateTypes.hpp \ $(top_srcdir)/stdair/bom/SegmentDateList.hpp \ $(top_srcdir)/stdair/bom/SegmentDateMap.hpp \ $(top_srcdir)/stdair/bom/SegmentDateStructure.hpp \ $(top_srcdir)/stdair/bom/LegDate.hpp \ + $(top_srcdir)/stdair/bom/LegDateContent.hpp \ $(top_srcdir)/stdair/bom/LegDateTypes.hpp \ $(top_srcdir)/stdair/bom/LegDateList.hpp \ $(top_srcdir)/stdair/bom/LegDateMap.hpp \ $(top_srcdir)/stdair/bom/LegDateStructure.hpp \ $(top_srcdir)/stdair/bom/SegmentCabin.hpp \ + $(top_srcdir)/stdair/bom/SegmentCabinContent.hpp \ $(top_srcdir)/stdair/bom/SegmentCabinTypes.hpp \ $(top_srcdir)/stdair/bom/SegmentCabinList.hpp \ $(top_srcdir)/stdair/bom/SegmentCabinMap.hpp \ $(top_srcdir)/stdair/bom/SegmentCabinStructure.hpp \ $(top_srcdir)/stdair/bom/LegCabin.hpp \ + $(top_srcdir)/stdair/bom/LegCabinContent.hpp \ $(top_srcdir)/stdair/bom/LegCabinTypes.hpp \ $(top_srcdir)/stdair/bom/LegCabinList.hpp \ $(top_srcdir)/stdair/bom/LegCabinMap.hpp \ $(top_srcdir)/stdair/bom/LegCabinStructure.hpp \ $(top_srcdir)/stdair/bom/BookingClass.hpp \ + $(top_srcdir)/stdair/bom/BookingClassContent.hpp \ $(top_srcdir)/stdair/bom/BookingClassTypes.hpp \ $(top_srcdir)/stdair/bom/BookingClassList.hpp \ $(top_srcdir)/stdair/bom/BookingClassMap.hpp \ @@ -54,24 +61,31 @@ $(top_srcdir)/stdair/bom/BomIterator.hpp bom_cc_sources = \ $(top_srcdir)/stdair/bom/Inventory.cpp \ + $(top_srcdir)/stdair/bom/InventoryContent.cpp \ $(top_srcdir)/stdair/bom/InventoryList.cpp \ $(top_srcdir)/stdair/bom/InventoryMap.cpp \ $(top_srcdir)/stdair/bom/FlightDate.cpp \ + $(top_srcdir)/stdair/bom/FlightDateContent.cpp \ $(top_srcdir)/stdair/bom/FlightDateList.cpp \ $(top_srcdir)/stdair/bom/FlightDateMap.cpp \ $(top_srcdir)/stdair/bom/SegmentDate.cpp \ + $(top_srcdir)/stdair/bom/SegmentDateContent.cpp \ $(top_srcdir)/stdair/bom/SegmentDateList.cpp \ $(top_srcdir)/stdair/bom/SegmentDateMap.cpp \ $(top_srcdir)/stdair/bom/LegDate.cpp \ + $(top_srcdir)/stdair/bom/LegDateContent.cpp \ $(top_srcdir)/stdair/bom/LegDateList.cpp \ $(top_srcdir)/stdair/bom/LegDateMap.cpp \ $(top_srcdir)/stdair/bom/SegmentCabin.cpp \ + $(top_srcdir)/stdair/bom/SegmentCabinContent.cpp \ $(top_srcdir)/stdair/bom/SegmentCabinList.cpp \ $(top_srcdir)/stdair/bom/SegmentCabinMap.cpp \ $(top_srcdir)/stdair/bom/LegCabin.cpp \ + $(top_srcdir)/stdair/bom/LegCabinContent.cpp \ $(top_srcdir)/stdair/bom/LegCabinList.cpp \ $(top_srcdir)/stdair/bom/LegCabinMap.cpp \ $(top_srcdir)/stdair/bom/BookingClass.cpp \ + $(top_srcdir)/stdair/bom/BookingClassContent.cpp \ $(top_srcdir)/stdair/bom/BookingClassList.cpp \ $(top_srcdir)/stdair/bom/BookingClassMap.cpp This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2009-10-19 08:50:50
|
Revision: 48 http://stdair.svn.sourceforge.net/stdair/?rev=48&view=rev Author: quannaus Date: 2009-10-19 08:50:43 +0000 (Mon, 19 Oct 2009) Log Message: ----------- [Dev] Changed constructors from private to protected. Modified Paths: -------------- trunk/stdair/stdair/bom/BomRoot.hpp trunk/stdair/stdair/bom/BookingClass.hpp trunk/stdair/stdair/bom/FlightDate.hpp trunk/stdair/stdair/bom/Inventory.hpp trunk/stdair/stdair/bom/LegCabin.hpp trunk/stdair/stdair/bom/LegDate.hpp trunk/stdair/stdair/bom/SegmentCabin.hpp trunk/stdair/stdair/bom/SegmentDate.hpp Modified: trunk/stdair/stdair/bom/BomRoot.hpp =================================================================== --- trunk/stdair/stdair/bom/BomRoot.hpp 2009-10-15 15:11:19 UTC (rev 47) +++ trunk/stdair/stdair/bom/BomRoot.hpp 2009-10-19 08:50:43 UTC (rev 48) @@ -109,7 +109,7 @@ return _bomRootStructure; } - private: + protected: /** Constructors are private so as to force the usage of the Factory layer. */ /** Default constructors. */ Modified: trunk/stdair/stdair/bom/BookingClass.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-15 15:11:19 UTC (rev 47) +++ trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-19 08:50:43 UTC (rev 48) @@ -64,7 +64,7 @@ return _bookingClassStructure; } - private: + protected: /** Constructors are private so as to force the usage of the Factory layer. */ /** Default constructors. */ Modified: trunk/stdair/stdair/bom/FlightDate.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-15 15:11:19 UTC (rev 47) +++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-19 08:50:43 UTC (rev 48) @@ -90,7 +90,7 @@ return _flightDateStructure; } - private: + protected: /** Constructors are private so as to force the usage of the Factory layer. */ /** Default constructors. */ Modified: trunk/stdair/stdair/bom/Inventory.hpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.hpp 2009-10-15 15:11:19 UTC (rev 47) +++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-19 08:50:43 UTC (rev 48) @@ -79,7 +79,7 @@ return _inventoryStructure; } - private: + protected: /** Constructors are private so as to force the usage of the Factory layer. */ /** Default constructors. */ Modified: trunk/stdair/stdair/bom/LegCabin.hpp =================================================================== --- trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-15 15:11:19 UTC (rev 47) +++ trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-19 08:50:43 UTC (rev 48) @@ -57,7 +57,7 @@ return _legCabinStructure; } - private: + protected: /** Constructors are private so as to force the usage of the Factory layer. */ /** Default constructors. */ Modified: trunk/stdair/stdair/bom/LegDate.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDate.hpp 2009-10-15 15:11:19 UTC (rev 47) +++ trunk/stdair/stdair/bom/LegDate.hpp 2009-10-19 08:50:43 UTC (rev 48) @@ -72,7 +72,7 @@ return _legDateStructure; } - private: + protected: /** Constructors are private so as to force the usage of the Factory layer. */ /** Default constructors. */ Modified: trunk/stdair/stdair/bom/SegmentCabin.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-15 15:11:19 UTC (rev 47) +++ trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-19 08:50:43 UTC (rev 48) @@ -72,7 +72,7 @@ return _segmentCabinStructure; } - private: + protected: /** Constructors are private so as to force the usage of the Factory layer. */ /** Default constructors. */ Modified: trunk/stdair/stdair/bom/SegmentDate.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-15 15:11:19 UTC (rev 47) +++ trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-19 08:50:43 UTC (rev 48) @@ -72,7 +72,7 @@ return _segmentDateStructure; } - private: + protected: /** Constructors are private so as to force the usage of the Factory layer. */ /** Default constructors. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2009-10-19 09:43:29
|
Revision: 49 http://stdair.svn.sourceforge.net/stdair/?rev=49&view=rev Author: quannaus Date: 2009-10-19 09:43:20 +0000 (Mon, 19 Oct 2009) Log Message: ----------- [Dev] Added some includes. Modified Paths: -------------- trunk/stdair/stdair/bom/BomRoot.hpp trunk/stdair/stdair/bom/BookingClass.hpp trunk/stdair/stdair/bom/FlightDate.cpp trunk/stdair/stdair/bom/FlightDate.hpp trunk/stdair/stdair/bom/Inventory.hpp trunk/stdair/stdair/bom/InventoryTypes.hpp trunk/stdair/stdair/bom/LegCabin.hpp trunk/stdair/stdair/bom/LegDate.hpp trunk/stdair/stdair/bom/SegmentCabin.hpp trunk/stdair/stdair/bom/SegmentDate.hpp Modified: trunk/stdair/stdair/bom/BomRoot.hpp =================================================================== --- trunk/stdair/stdair/bom/BomRoot.hpp 2009-10-19 08:50:43 UTC (rev 48) +++ trunk/stdair/stdair/bom/BomRoot.hpp 2009-10-19 09:43:20 UTC (rev 49) @@ -5,6 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR +#include <stdair/bom/BomStructure.hpp> #include <stdair/bom/BomRootContent.hpp> #include <stdair/bom/BomRootTypes.hpp> #include <stdair/bom/InventoryTypes.hpp> @@ -12,7 +13,6 @@ namespace stdair { // Forward declarations. class FacBomContent; - class Inventory; struct InventoryList_T; struct InventoryMap_T; Modified: trunk/stdair/stdair/bom/BookingClass.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-19 08:50:43 UTC (rev 48) +++ trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-19 09:43:20 UTC (rev 49) @@ -5,6 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR +#include <stdair/bom/BomStructure.hpp> #include <stdair/bom/BookingClassContent.hpp> #include <stdair/bom/SegmentCabinTypes.hpp> #include <stdair/bom/BookingClassTypes.hpp> Modified: trunk/stdair/stdair/bom/FlightDate.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.cpp 2009-10-19 08:50:43 UTC (rev 48) +++ trunk/stdair/stdair/bom/FlightDate.cpp 2009-10-19 09:43:20 UTC (rev 49) @@ -8,7 +8,6 @@ #include <algorithm> // STDAIR #include <stdair/bom/FlightDateStructure.hpp> -#include <stdair/bom/BomRoot.hpp> #include <stdair/bom/Inventory.hpp> #include <stdair/bom/FlightDate.hpp> #include <stdair/bom/SegmentDate.hpp> Modified: trunk/stdair/stdair/bom/FlightDate.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-19 08:50:43 UTC (rev 48) +++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-19 09:43:20 UTC (rev 49) @@ -5,15 +5,15 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/FlightDateContent.hpp> +#include <stdair/bom/BomStructure.hpp> #include <stdair/bom/FlightDateTypes.hpp> #include <stdair/bom/SegmentDateTypes.hpp> #include <stdair/bom/LegDateTypes.hpp> +#include <stdair/bom/FlightDateContent.hpp> namespace stdair { // Forward declarations class FacBomContent; - class BomStructure; class Inventory; struct SegmentDateList_T; struct SegmentDateMap_T; Modified: trunk/stdair/stdair/bom/Inventory.hpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.hpp 2009-10-19 08:50:43 UTC (rev 48) +++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-19 09:43:20 UTC (rev 49) @@ -5,17 +5,15 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/BomRootTypes.hpp> +#include <stdair/bom/BomStructure.hpp> #include <stdair/bom/InventoryTypes.hpp> #include <stdair/bom/FlightDateTypes.hpp> #include <stdair/bom/InventoryContent.hpp> namespace stdair { - // Forward declarations class FacBomContent; class BomRoot; - class FlightDate; struct FlightDateList_T; struct FlightDateMap_T; Modified: trunk/stdair/stdair/bom/InventoryTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/InventoryTypes.hpp 2009-10-19 08:50:43 UTC (rev 48) +++ trunk/stdair/stdair/bom/InventoryTypes.hpp 2009-10-19 09:43:20 UTC (rev 49) @@ -6,8 +6,8 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STL +#include <map> #include <vector> -#include <map> namespace stdair { @@ -22,10 +22,10 @@ /** Define the Inventory key. */ typedef InventoryKey<Inventory> InventoryKey_T; - /** Define the flight-date structure list. */ + /** Define the Inventory structure list. */ typedef std::vector<InventoryStructure_T*> InventoryStructureList_T; - /** Define the flight-date structure map. */ + /** Define the Inventory structure map. */ typedef std::map<const std::string, InventoryStructure_T*> InventoryStructureMap_T; } Modified: trunk/stdair/stdair/bom/LegCabin.hpp =================================================================== --- trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-19 08:50:43 UTC (rev 48) +++ trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-19 09:43:20 UTC (rev 49) @@ -5,6 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR +#include <stdair/bom/BomStructure.hpp> #include <stdair/bom/LegCabinContent.hpp> #include <stdair/bom/LegCabinTypes.hpp> Modified: trunk/stdair/stdair/bom/LegDate.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDate.hpp 2009-10-19 08:50:43 UTC (rev 48) +++ trunk/stdair/stdair/bom/LegDate.hpp 2009-10-19 09:43:20 UTC (rev 49) @@ -5,6 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR +#include <stdair/bom/BomStructure.hpp> #include <stdair/bom/LegDateContent.hpp> #include <stdair/bom/LegDateTypes.hpp> #include <stdair/bom/LegCabinTypes.hpp> Modified: trunk/stdair/stdair/bom/SegmentCabin.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-19 08:50:43 UTC (rev 48) +++ trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-19 09:43:20 UTC (rev 49) @@ -5,6 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR +#include <stdair/bom/BomStructure.hpp> #include <stdair/bom/SegmentCabinContent.hpp> #include <stdair/bom/SegmentCabinTypes.hpp> #include <stdair/bom/BookingClassTypes.hpp> Modified: trunk/stdair/stdair/bom/SegmentDate.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-19 08:50:43 UTC (rev 48) +++ trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-19 09:43:20 UTC (rev 49) @@ -5,9 +5,10 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/SegmentDateContent.hpp> +#include <stdair/bom/BomStructure.hpp> #include <stdair/bom/SegmentDateTypes.hpp> #include <stdair/bom/SegmentCabinTypes.hpp> +#include <stdair/bom/SegmentDateContent.hpp> namespace stdair { // Forward declarations This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2009-10-20 09:41:42
|
Revision: 50 http://stdair.svn.sourceforge.net/stdair/?rev=50&view=rev Author: quannaus Date: 2009-10-20 09:41:29 +0000 (Tue, 20 Oct 2009) Log Message: ----------- [Dev] Changed includes. Modified Paths: -------------- trunk/stdair/stdair/bom/BomRootStructure.hpp trunk/stdair/stdair/bom/BookingClassStructure.hpp trunk/stdair/stdair/bom/FlightDateStructure.hpp trunk/stdair/stdair/bom/InventoryStructure.hpp trunk/stdair/stdair/bom/LegCabinStructure.hpp trunk/stdair/stdair/bom/LegDateStructure.hpp trunk/stdair/stdair/bom/SegmentCabinStructure.hpp trunk/stdair/stdair/bom/SegmentDateStructure.hpp Modified: trunk/stdair/stdair/bom/BomRootStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/BomRootStructure.hpp 2009-10-19 09:43:20 UTC (rev 49) +++ trunk/stdair/stdair/bom/BomRootStructure.hpp 2009-10-20 09:41:29 UTC (rev 50) @@ -9,16 +9,12 @@ // MPL #include <boost/mpl/vector.hpp> // STDAIR -#include <stdair/bom/BomStructure.hpp> +#include <stdair/bom/BomStructureDummy.hpp> +#include <stdair/bom/BomContentDummy.hpp> #include <stdair/bom/BomRootKey.hpp> -#include <stdair/bom/BomChildrenHolderImp.hpp> #include <stdair/bom/InventoryStructure.hpp> namespace stdair { - // Forward declarations. - class BomStructureDummy; - class BomContentDummy; - /** Wrapper class aimed at holding the actual content, modeled by a specific BomContentRoot class. */ template <typename BOM_CONTENT> Modified: trunk/stdair/stdair/bom/BookingClassStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassStructure.hpp 2009-10-19 09:43:20 UTC (rev 49) +++ trunk/stdair/stdair/bom/BookingClassStructure.hpp 2009-10-20 09:41:29 UTC (rev 50) @@ -6,18 +6,12 @@ // ////////////////////////////////////////////////////////////////////// // MPL #include <boost/mpl/vector.hpp> -// STDAIR -#include <stdair/bom/BomStructure.hpp> +// STDAIR +#include <stdair/bom/BomStructureDummy.hpp> +#include <stdair/bom/BomContentDummy.hpp> #include <stdair/bom/BookingClassKey.hpp> -#include <stdair/bom/BomChildrenHolderImp.hpp> namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT> class SegmentCabinStructure; - class BomStructureDummy; - class BomContentDummy; - /** Wrapper class aimed at holding the actual content, modeled by an external specific BookingClass class (for instance, in the AIRSCHED library). */ Modified: trunk/stdair/stdair/bom/FlightDateStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-10-19 09:43:20 UTC (rev 49) +++ trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-10-20 09:41:29 UTC (rev 50) @@ -7,17 +7,13 @@ // MPL #include <boost/mpl/vector.hpp> // STDAIR -#include <stdair/bom/BomStructure.hpp> +#include <stdair/bom/BomStructureDummy.hpp> +#include <stdair/bom/BomContentDummy.hpp> #include <stdair/bom/FlightDateKey.hpp> #include <stdair/bom/SegmentDateStructure.hpp> #include <stdair/bom/LegDateStructure.hpp> -#include <stdair/bom/BomChildrenHolderImp.hpp> namespace stdair { - - // Forward declaration - class BomContentDummy; - /** Wrapper class aimed at holding the actual content, modeled by an external specific FlightDate class (for instance, in the AIRSCHED library). */ Modified: trunk/stdair/stdair/bom/InventoryStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-10-19 09:43:20 UTC (rev 49) +++ trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-10-20 09:41:29 UTC (rev 50) @@ -9,17 +9,12 @@ // (Boost) MPL #include <boost/mpl/vector.hpp> // STDAIR -#include <stdair/bom/BomStructure.hpp> +#include <stdair/bom/BomStructureDummy.hpp> +#include <stdair/bom/BomContentDummy.hpp> #include <stdair/bom/InventoryKey.hpp> -#include <stdair/bom/BomChildrenHolderImp.hpp> #include <stdair/bom/FlightDateStructure.hpp> namespace stdair { - - // Forward declaration - class BomStructureDummy; - class BomContentDummy; - /** Wrapper class aimed at holding the actual content, modeled by an external specific Inventory class (for instance, in the AIRSCHED library). */ Modified: trunk/stdair/stdair/bom/LegCabinStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/LegCabinStructure.hpp 2009-10-19 09:43:20 UTC (rev 49) +++ trunk/stdair/stdair/bom/LegCabinStructure.hpp 2009-10-20 09:41:29 UTC (rev 50) @@ -7,18 +7,12 @@ // MPL #include <boost/mpl/vector.hpp> // STDAIR -#include <stdair/bom/BomStructure.hpp> +#include <stdair/bom/BomStructureDummy.hpp> +#include <stdair/bom/BomContentDummy.hpp> #include <stdair/bom/LegCabinKey.hpp> #include <stdair/bom/BookingClassStructure.hpp> -#include <stdair/bom/BomChildrenHolderImp.hpp> namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT> class LegDateStructure; - class BomStructureDummy; - class BomContentDummy; - /** Wrapper class aimed at holding the actual content, modeled by an external specific LegCabin class (for instance, in the AIRSCHED library). */ Modified: trunk/stdair/stdair/bom/LegDateStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDateStructure.hpp 2009-10-19 09:43:20 UTC (rev 49) +++ trunk/stdair/stdair/bom/LegDateStructure.hpp 2009-10-20 09:41:29 UTC (rev 50) @@ -7,18 +7,12 @@ // MPL #include <boost/mpl/vector.hpp> // STDAIR -#include <stdair/bom/BomStructure.hpp> +#include <stdair/bom/BomStructureDummy.hpp> +#include <stdair/bom/BomContentDummy.hpp> #include <stdair/bom/LegDateKey.hpp> #include <stdair/bom/LegCabinStructure.hpp> -#include <stdair/bom/BomChildrenHolderImp.hpp> -namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT> class FlightDateStructure; - class BomStructureDummy; - class BomContentDummy; - +namespace stdair { /** Wrapper class aimed at holding the actual content, modeled by an external specific LegDate class (for instance, in the AIRSCHED library). */ Modified: trunk/stdair/stdair/bom/SegmentCabinStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentCabinStructure.hpp 2009-10-19 09:43:20 UTC (rev 49) +++ trunk/stdair/stdair/bom/SegmentCabinStructure.hpp 2009-10-20 09:41:29 UTC (rev 50) @@ -7,18 +7,12 @@ // MPL #include <boost/mpl/vector.hpp> // STDAIR -#include <stdair/bom/BomStructure.hpp> +#include <stdair/bom/BomStructureDummy.hpp> +#include <stdair/bom/BomContentDummy.hpp> #include <stdair/bom/SegmentCabinKey.hpp> #include <stdair/bom/BookingClassStructure.hpp> -#include <stdair/bom/BomChildrenHolderImp.hpp> namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT> class SegmentDateStructure; - class BomStructureDummy; - class BomContentDummy; - /** Wrapper class aimed at holding the actual content, modeled by an external specific SegmentCabin class (for instance, in the AIRSCHED library). */ Modified: trunk/stdair/stdair/bom/SegmentDateStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDateStructure.hpp 2009-10-19 09:43:20 UTC (rev 49) +++ trunk/stdair/stdair/bom/SegmentDateStructure.hpp 2009-10-20 09:41:29 UTC (rev 50) @@ -7,18 +7,12 @@ // MPL #include <boost/mpl/vector.hpp> // STDAIR -#include <stdair/bom/BomStructure.hpp> +#include <stdair/bom/BomStructureDummy.hpp> +#include <stdair/bom/BomContentDummy.hpp> #include <stdair/bom/SegmentDateKey.hpp> #include <stdair/bom/SegmentCabinStructure.hpp> -#include <stdair/bom/BomChildrenHolderImp.hpp> namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT> class FlightDateStructure; - class BomStructureDummy; - class BomContentDummy; - /** Wrapper class aimed at holding the actual content, modeled by an external specific SegmentDate class (for instance, in the AIRSCHED library). */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2009-10-20 14:47:29
|
Revision: 53 http://stdair.svn.sourceforge.net/stdair/?rev=53&view=rev Author: quannaus Date: 2009-10-20 14:47:18 +0000 (Tue, 20 Oct 2009) Log Message: ----------- [Dev] Changed some includes. Modified Paths: -------------- trunk/stdair/stdair/bom/BomRoot.hpp trunk/stdair/stdair/bom/BookingClass.hpp trunk/stdair/stdair/bom/FlightDate.hpp trunk/stdair/stdair/bom/Inventory.hpp trunk/stdair/stdair/bom/LegCabin.hpp trunk/stdair/stdair/bom/LegDate.hpp trunk/stdair/stdair/bom/SegmentCabin.hpp trunk/stdair/stdair/bom/SegmentDate.hpp Modified: trunk/stdair/stdair/bom/BomRoot.hpp =================================================================== --- trunk/stdair/stdair/bom/BomRoot.hpp 2009-10-20 14:39:49 UTC (rev 52) +++ trunk/stdair/stdair/bom/BomRoot.hpp 2009-10-20 14:47:18 UTC (rev 53) @@ -5,7 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/BomStructure.hpp> +#include <stdair/bom/BomRootStructure.hpp> #include <stdair/bom/BomRootContent.hpp> #include <stdair/bom/BomRootTypes.hpp> #include <stdair/bom/InventoryTypes.hpp> Modified: trunk/stdair/stdair/bom/BookingClass.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-20 14:39:49 UTC (rev 52) +++ trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-20 14:47:18 UTC (rev 53) @@ -5,7 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/BomStructure.hpp> +#include <stdair/bom/BookingClassStructure.hpp> #include <stdair/bom/BookingClassContent.hpp> #include <stdair/bom/SegmentCabinTypes.hpp> #include <stdair/bom/BookingClassTypes.hpp> Modified: trunk/stdair/stdair/bom/FlightDate.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-20 14:39:49 UTC (rev 52) +++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-20 14:47:18 UTC (rev 53) @@ -5,7 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/BomStructure.hpp> +#include <stdair/bom/FlightDateStructure.hpp> #include <stdair/bom/FlightDateTypes.hpp> #include <stdair/bom/SegmentDateTypes.hpp> #include <stdair/bom/LegDateTypes.hpp> Modified: trunk/stdair/stdair/bom/Inventory.hpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.hpp 2009-10-20 14:39:49 UTC (rev 52) +++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-20 14:47:18 UTC (rev 53) @@ -5,7 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/BomStructure.hpp> +#include <stdair/bom/InventoryStructure.hpp> #include <stdair/bom/InventoryTypes.hpp> #include <stdair/bom/FlightDateTypes.hpp> #include <stdair/bom/InventoryContent.hpp> Modified: trunk/stdair/stdair/bom/LegCabin.hpp =================================================================== --- trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-20 14:39:49 UTC (rev 52) +++ trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-20 14:47:18 UTC (rev 53) @@ -5,7 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/BomStructure.hpp> +#include <stdair/bom/LegCabinStructure.hpp> #include <stdair/bom/LegCabinContent.hpp> #include <stdair/bom/LegCabinTypes.hpp> Modified: trunk/stdair/stdair/bom/LegDate.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDate.hpp 2009-10-20 14:39:49 UTC (rev 52) +++ trunk/stdair/stdair/bom/LegDate.hpp 2009-10-20 14:47:18 UTC (rev 53) @@ -5,7 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/BomStructure.hpp> +#include <stdair/bom/LegDateStructure.hpp> #include <stdair/bom/LegDateContent.hpp> #include <stdair/bom/LegDateTypes.hpp> #include <stdair/bom/LegCabinTypes.hpp> Modified: trunk/stdair/stdair/bom/SegmentCabin.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-20 14:39:49 UTC (rev 52) +++ trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-20 14:47:18 UTC (rev 53) @@ -5,7 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/BomStructure.hpp> +#include <stdair/bom/SegmentCabinStructure.hpp> #include <stdair/bom/SegmentCabinContent.hpp> #include <stdair/bom/SegmentCabinTypes.hpp> #include <stdair/bom/BookingClassTypes.hpp> Modified: trunk/stdair/stdair/bom/SegmentDate.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-20 14:39:49 UTC (rev 52) +++ trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-20 14:47:18 UTC (rev 53) @@ -5,7 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/bom/BomStructure.hpp> +#include <stdair/bom/SegmentDateStructure.hpp> #include <stdair/bom/SegmentDateTypes.hpp> #include <stdair/bom/SegmentCabinTypes.hpp> #include <stdair/bom/SegmentDateContent.hpp> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2009-10-20 15:01:35
|
Revision: 54 http://stdair.svn.sourceforge.net/stdair/?rev=54&view=rev Author: quannaus Date: 2009-10-20 15:01:20 +0000 (Tue, 20 Oct 2009) Log Message: ----------- [Dev] Changed some includes. Modified Paths: -------------- trunk/stdair/stdair/bom/BookingClass.cpp trunk/stdair/stdair/bom/BookingClass.hpp trunk/stdair/stdair/bom/FlightDate.cpp trunk/stdair/stdair/bom/FlightDate.hpp trunk/stdair/stdair/bom/Inventory.cpp trunk/stdair/stdair/bom/Inventory.hpp trunk/stdair/stdair/bom/LegCabin.cpp trunk/stdair/stdair/bom/LegCabin.hpp trunk/stdair/stdair/bom/LegDate.cpp trunk/stdair/stdair/bom/LegDate.hpp trunk/stdair/stdair/bom/SegmentCabin.cpp trunk/stdair/stdair/bom/SegmentCabin.hpp trunk/stdair/stdair/bom/SegmentDate.cpp trunk/stdair/stdair/bom/SegmentDate.hpp Modified: trunk/stdair/stdair/bom/BookingClass.cpp =================================================================== --- trunk/stdair/stdair/bom/BookingClass.cpp 2009-10-20 14:47:18 UTC (rev 53) +++ trunk/stdair/stdair/bom/BookingClass.cpp 2009-10-20 15:01:20 UTC (rev 54) @@ -5,8 +5,6 @@ #include <assert.h> // STDAIR #include <stdair/bom/BookingClassStructure.hpp> -#include <stdair/bom/SegmentCabin.hpp> -#include <stdair/bom/LegCabin.hpp> #include <stdair/bom/BookingClass.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/BookingClass.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-20 14:47:18 UTC (rev 53) +++ trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-20 15:01:20 UTC (rev 54) @@ -5,6 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR +#include <stdair/bom/SegmentCabin.hpp> #include <stdair/bom/BookingClassStructure.hpp> #include <stdair/bom/BookingClassContent.hpp> #include <stdair/bom/SegmentCabinTypes.hpp> @@ -13,7 +14,6 @@ namespace stdair { // Forward declarations class FacBomContent; - class SegmentCabin; struct BookingClassKey_T; struct BookingClassList_T; struct BookingClassMap_T; Modified: trunk/stdair/stdair/bom/FlightDate.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.cpp 2009-10-20 14:47:18 UTC (rev 53) +++ trunk/stdair/stdair/bom/FlightDate.cpp 2009-10-20 15:01:20 UTC (rev 54) @@ -8,7 +8,6 @@ #include <algorithm> // STDAIR #include <stdair/bom/FlightDateStructure.hpp> -#include <stdair/bom/Inventory.hpp> #include <stdair/bom/FlightDate.hpp> #include <stdair/bom/SegmentDate.hpp> #include <stdair/bom/SegmentDateList.hpp> Modified: trunk/stdair/stdair/bom/FlightDate.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-20 14:47:18 UTC (rev 53) +++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-20 15:01:20 UTC (rev 54) @@ -5,6 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR +#include <stdair/bom/Inventory.hpp> #include <stdair/bom/FlightDateStructure.hpp> #include <stdair/bom/FlightDateTypes.hpp> #include <stdair/bom/SegmentDateTypes.hpp> @@ -14,7 +15,6 @@ namespace stdair { // Forward declarations class FacBomContent; - class Inventory; struct FlightDateKey_T; struct SegmentDateList_T; struct SegmentDateMap_T; Modified: trunk/stdair/stdair/bom/Inventory.cpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.cpp 2009-10-20 14:47:18 UTC (rev 53) +++ trunk/stdair/stdair/bom/Inventory.cpp 2009-10-20 15:01:20 UTC (rev 54) @@ -5,7 +5,6 @@ #include <cassert> // STDAIR #include <stdair/bom/InventoryStructure.hpp> -#include <stdair/bom/BomRoot.hpp> #include <stdair/bom/Inventory.hpp> #include <stdair/bom/FlightDate.hpp> #include <stdair/bom/FlightDateList.hpp> Modified: trunk/stdair/stdair/bom/Inventory.hpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.hpp 2009-10-20 14:47:18 UTC (rev 53) +++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-20 15:01:20 UTC (rev 54) @@ -5,6 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR +#include <stdair/bom/BomRoot.hpp> #include <stdair/bom/InventoryStructure.hpp> #include <stdair/bom/InventoryTypes.hpp> #include <stdair/bom/FlightDateTypes.hpp> @@ -13,7 +14,6 @@ namespace stdair { // Forward declarations class FacBomContent; - class BomRoot; struct InventoryKey_T; struct FlightDateList_T; struct FlightDateMap_T; Modified: trunk/stdair/stdair/bom/LegCabin.cpp =================================================================== --- trunk/stdair/stdair/bom/LegCabin.cpp 2009-10-20 14:47:18 UTC (rev 53) +++ trunk/stdair/stdair/bom/LegCabin.cpp 2009-10-20 15:01:20 UTC (rev 54) @@ -5,7 +5,6 @@ #include <assert.h> // STDAIR #include <stdair/bom/LegCabinStructure.hpp> -#include <stdair/bom/LegDate.hpp> #include <stdair/bom/LegCabin.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/LegCabin.hpp =================================================================== --- trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-20 14:47:18 UTC (rev 53) +++ trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-20 15:01:20 UTC (rev 54) @@ -5,6 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR +#include <stdair/bom/LegDate.hpp> #include <stdair/bom/LegCabinStructure.hpp> #include <stdair/bom/LegCabinContent.hpp> #include <stdair/bom/LegCabinTypes.hpp> @@ -12,7 +13,6 @@ namespace stdair { // Forward declarations class FacBomContent; - class LegDate; struct LegCabinKey_T; /** Class representing the actual functional/business content for a Modified: trunk/stdair/stdair/bom/LegDate.cpp =================================================================== --- trunk/stdair/stdair/bom/LegDate.cpp 2009-10-20 14:47:18 UTC (rev 53) +++ trunk/stdair/stdair/bom/LegDate.cpp 2009-10-20 15:01:20 UTC (rev 54) @@ -5,7 +5,6 @@ #include <assert.h> // STDAIR #include <stdair/bom/LegDateStructure.hpp> -#include <stdair/bom/FlightDate.hpp> #include <stdair/bom/LegDate.hpp> #include <stdair/bom/LegCabin.hpp> #include <stdair/bom/LegCabinList.hpp> Modified: trunk/stdair/stdair/bom/LegDate.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDate.hpp 2009-10-20 14:47:18 UTC (rev 53) +++ trunk/stdair/stdair/bom/LegDate.hpp 2009-10-20 15:01:20 UTC (rev 54) @@ -5,6 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR +#include <stdair/bom/FlightDate.hpp> #include <stdair/bom/LegDateStructure.hpp> #include <stdair/bom/LegDateContent.hpp> #include <stdair/bom/LegDateTypes.hpp> @@ -13,7 +14,6 @@ namespace stdair { // Forward declarations class FacBomContent; - class FlightDate; struct LegDateKey_T; struct LegCabinList_T; struct LegCabinMap_T; Modified: trunk/stdair/stdair/bom/SegmentCabin.cpp =================================================================== --- trunk/stdair/stdair/bom/SegmentCabin.cpp 2009-10-20 14:47:18 UTC (rev 53) +++ trunk/stdair/stdair/bom/SegmentCabin.cpp 2009-10-20 15:01:20 UTC (rev 54) @@ -5,7 +5,6 @@ #include <assert.h> // STDAIR #include <stdair/bom/SegmentCabinStructure.hpp> -#include <stdair/bom/SegmentDate.hpp> #include <stdair/bom/SegmentCabin.hpp> #include <stdair/bom/BookingClass.hpp> #include <stdair/bom/BookingClassList.hpp> Modified: trunk/stdair/stdair/bom/SegmentCabin.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-20 14:47:18 UTC (rev 53) +++ trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-20 15:01:20 UTC (rev 54) @@ -5,6 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR +#include <stdair/bom/SegmentDate.hpp> #include <stdair/bom/SegmentCabinStructure.hpp> #include <stdair/bom/SegmentCabinContent.hpp> #include <stdair/bom/SegmentCabinTypes.hpp> @@ -13,7 +14,6 @@ namespace stdair { // Forward declarations class FacBomContent; - class SegmentDate; struct SegmentCabinKey_T; struct BookingClassList_T; struct BookingClassMap_T; Modified: trunk/stdair/stdair/bom/SegmentDate.cpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDate.cpp 2009-10-20 14:47:18 UTC (rev 53) +++ trunk/stdair/stdair/bom/SegmentDate.cpp 2009-10-20 15:01:20 UTC (rev 54) @@ -5,7 +5,6 @@ #include <assert.h> // STDAIR #include <stdair/bom/SegmentDateStructure.hpp> -#include <stdair/bom/FlightDate.hpp> #include <stdair/bom/SegmentDate.hpp> #include <stdair/bom/SegmentCabin.hpp> #include <stdair/bom/SegmentCabinList.hpp> Modified: trunk/stdair/stdair/bom/SegmentDate.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-20 14:47:18 UTC (rev 53) +++ trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-20 15:01:20 UTC (rev 54) @@ -5,6 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR +#include <stdair/bom/FlightDate.hpp> #include <stdair/bom/SegmentDateStructure.hpp> #include <stdair/bom/SegmentDateTypes.hpp> #include <stdair/bom/SegmentCabinTypes.hpp> @@ -13,7 +14,6 @@ namespace stdair { // Forward declarations class FacBomContent; - class FlightDate; struct SegmentDateKey_T; struct SegmentCabinList_T; struct SegmentCabinMap_T; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2009-11-05 10:54:17
|
Revision: 60 http://stdair.svn.sourceforge.net/stdair/?rev=60&view=rev Author: quannaus Date: 2009-11-05 10:54:06 +0000 (Thu, 05 Nov 2009) Log Message: ----------- [Dev] Replaced the list and map structure with templates. Modified Paths: -------------- trunk/stdair/stdair/bom/AirlineFeature.hpp trunk/stdair/stdair/bom/AirlineFeatureSet.cpp trunk/stdair/stdair/bom/AirlineFeatureSet.hpp trunk/stdair/stdair/bom/AirlineFeatureTypes.hpp trunk/stdair/stdair/bom/BomRoot.cpp trunk/stdair/stdair/bom/BomRoot.hpp trunk/stdair/stdair/bom/BookingClass.hpp trunk/stdair/stdair/bom/BookingClassTypes.hpp trunk/stdair/stdair/bom/FlightDate.cpp trunk/stdair/stdair/bom/FlightDate.hpp trunk/stdair/stdair/bom/FlightDateTypes.hpp trunk/stdair/stdair/bom/Inventory.cpp trunk/stdair/stdair/bom/Inventory.hpp trunk/stdair/stdair/bom/InventoryStructure.hpp trunk/stdair/stdair/bom/InventoryTypes.hpp trunk/stdair/stdair/bom/LegCabin.hpp trunk/stdair/stdair/bom/LegCabinTypes.hpp trunk/stdair/stdair/bom/LegDate.cpp trunk/stdair/stdair/bom/LegDate.hpp trunk/stdair/stdair/bom/LegDateTypes.hpp trunk/stdair/stdair/bom/SegmentCabin.cpp trunk/stdair/stdair/bom/SegmentCabin.hpp trunk/stdair/stdair/bom/SegmentCabinTypes.hpp trunk/stdair/stdair/bom/SegmentDate.cpp trunk/stdair/stdair/bom/SegmentDate.hpp trunk/stdair/stdair/bom/SegmentDateTypes.hpp trunk/stdair/stdair/bom/sources.mk Added Paths: ----------- trunk/stdair/stdair/bom/BomList.hpp trunk/stdair/stdair/bom/BomMap.hpp Removed Paths: ------------- trunk/stdair/stdair/bom/AirlineFeatureList.cpp trunk/stdair/stdair/bom/AirlineFeatureList.hpp trunk/stdair/stdair/bom/AirlineFeatureMap.cpp trunk/stdair/stdair/bom/AirlineFeatureMap.hpp trunk/stdair/stdair/bom/BookingClassList.cpp trunk/stdair/stdair/bom/BookingClassList.hpp trunk/stdair/stdair/bom/BookingClassMap.cpp trunk/stdair/stdair/bom/BookingClassMap.hpp trunk/stdair/stdair/bom/FlightDateList.cpp trunk/stdair/stdair/bom/FlightDateList.hpp trunk/stdair/stdair/bom/FlightDateMap.cpp trunk/stdair/stdair/bom/FlightDateMap.hpp trunk/stdair/stdair/bom/InventoryList.cpp trunk/stdair/stdair/bom/InventoryList.hpp trunk/stdair/stdair/bom/InventoryMap.cpp trunk/stdair/stdair/bom/InventoryMap.hpp trunk/stdair/stdair/bom/LegCabinList.cpp trunk/stdair/stdair/bom/LegCabinList.hpp trunk/stdair/stdair/bom/LegCabinMap.cpp trunk/stdair/stdair/bom/LegCabinMap.hpp trunk/stdair/stdair/bom/LegDateList.cpp trunk/stdair/stdair/bom/LegDateList.hpp trunk/stdair/stdair/bom/LegDateMap.cpp trunk/stdair/stdair/bom/LegDateMap.hpp trunk/stdair/stdair/bom/SegmentCabinList.cpp trunk/stdair/stdair/bom/SegmentCabinList.hpp trunk/stdair/stdair/bom/SegmentCabinMap.cpp trunk/stdair/stdair/bom/SegmentCabinMap.hpp trunk/stdair/stdair/bom/SegmentDateList.cpp trunk/stdair/stdair/bom/SegmentDateList.hpp trunk/stdair/stdair/bom/SegmentDateMap.cpp trunk/stdair/stdair/bom/SegmentDateMap.hpp Modified: trunk/stdair/stdair/bom/AirlineFeature.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeature.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/AirlineFeature.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -15,8 +15,6 @@ // Forward declarations class FacBomContent; struct AirlineFeatureKey_T; - struct AirlineFeatureList_T; - struct AirlineFeatureMap_T; /** Class representing the actual functional/business content for a segment-cabin. */ Deleted: trunk/stdair/stdair/bom/AirlineFeatureList.cpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureList.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/AirlineFeatureList.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,50 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <cassert> -// STDAIR -#include <stdair/bom/BomChildrenHolderImp.hpp> -#include <stdair/bom/AirlineFeature.hpp> -#include <stdair/bom/AirlineFeatureList.hpp> - -namespace stdair { - - // //////////////////////////////////////////////////////////////////// - AirlineFeatureList_T:: - AirlineFeatureList_T (const AirlineFeatureHolder_T& iAirlineFeatureHolder) - : _airlineFeatureHolder (iAirlineFeatureHolder) { - } - - // //////////////////////////////////////////////////////////////////// - AirlineFeatureList_T:: - AirlineFeatureList_T (const AirlineFeatureList_T& iAFList) - : _airlineFeatureHolder (iAFList._airlineFeatureHolder) { - } - - // //////////////////////////////////////////////////////////////////// - AirlineFeatureList_T::~AirlineFeatureList_T () { - } - - // ////////////////////////////////////////////////////////////////////// - AirlineFeatureList_T::iterator AirlineFeatureList_T::begin () const { - return _airlineFeatureHolder.listBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - AirlineFeatureList_T::iterator AirlineFeatureList_T::end () const { - return _airlineFeatureHolder.listEnd (); - } - - // ////////////////////////////////////////////////////////////////////// - AirlineFeatureList_T::reverse_iterator AirlineFeatureList_T::rbegin () const { - return _airlineFeatureHolder.listRBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - AirlineFeatureList_T::reverse_iterator AirlineFeatureList_T::rend () const { - return _airlineFeatureHolder.listREnd (); - } - -} - Deleted: trunk/stdair/stdair/bom/AirlineFeatureList.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureList.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/AirlineFeatureList.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,70 +0,0 @@ -#ifndef __STDAIR_BOM_AIRLINEFEATURELIST_HPP -#define __STDAIR_BOM_AIRLINEFEATURELIST_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/bom/AirlineFeatureTypes.hpp> - -namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - template <typename BOM_STRUCTURE> class BomChildrenHolderImp; - class AirlineFeature; - - /** Structure which handles the iterators for a booking class list. */ - struct AirlineFeatureList_T { - - public: - // ///////////////////////////////////////////////////////////////////////// - // See the explanations, within the stdair::BomContentRoot class, for all - // the iterator types specified below - // ///////////////////////////////////////////////////////////////////////// - /** Define the booking class list iterators. */ - typedef BomIterator_T<AirlineFeature, - AirlineFeatureStructureList_T::const_iterator> iterator; - typedef BomIterator_T<AirlineFeature, - AirlineFeatureStructureList_T::const_reverse_iterator> reverse_iterator; - // ///////////////////////////////////////////////////////////////////////// - - /** Define the booking class holder. */ - typedef BomChildrenHolderImp<AirlineFeature> AirlineFeatureHolder_T; - - public: - // /////////// Iteration methods ////////// - /** Initialise the internal iterator on flight date: - return the iterator at the begining of the list. */ - iterator begin () const; - - /** Initialise the internal iterator on flight date: - return the iterator at the end of the list. */ - iterator end () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the rbegining of the list. */ - reverse_iterator rbegin () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the end of the list. */ - reverse_iterator rend () const; - - public: - /** Default constructors. */ - AirlineFeatureList_T (); - AirlineFeatureList_T (const AirlineFeatureList_T&); - AirlineFeatureList_T (const AirlineFeatureHolder_T&); - - /** Destructor. */ - virtual ~AirlineFeatureList_T(); - - private: - // Attributes - /** Reference structure. */ - const AirlineFeatureHolder_T& _airlineFeatureHolder; - }; - -} -#endif // __STDAIR_BOM_AIRLINEFEATURELIST_HPP - Deleted: trunk/stdair/stdair/bom/AirlineFeatureMap.cpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureMap.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/AirlineFeatureMap.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,56 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <cassert> -// STDAIR -#include <stdair/bom/BomChildrenHolderImp.hpp> -#include <stdair/bom/AirlineFeature.hpp> -#include <stdair/bom/AirlineFeatureMap.hpp> - -namespace stdair { - - // //////////////////////////////////////////////////////////////////// - AirlineFeatureMap_T:: - AirlineFeatureMap_T (const AirlineFeatureHolder_T& iAirlineFeatureHolder) - : _airlineFeatureHolder (iAirlineFeatureHolder) { - } - - // //////////////////////////////////////////////////////////////////// - AirlineFeatureMap_T:: - AirlineFeatureMap_T (const AirlineFeatureMap_T& iAFMap) - : _airlineFeatureHolder (iAFMap._airlineFeatureHolder) { - } - - // //////////////////////////////////////////////////////////////////// - AirlineFeatureMap_T::~AirlineFeatureMap_T () { - } - - // ////////////////////////////////////////////////////////////////////// - AirlineFeatureMap_T::iterator AirlineFeatureMap_T::begin () const { - return _airlineFeatureHolder.mapBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - AirlineFeatureMap_T::iterator AirlineFeatureMap_T::end () const { - return _airlineFeatureHolder.mapEnd (); - } - - // ////////////////////////////////////////////////////////////////////// - AirlineFeatureMap_T::reverse_iterator AirlineFeatureMap_T::rbegin () const { - return _airlineFeatureHolder.mapRBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - AirlineFeatureMap_T::reverse_iterator AirlineFeatureMap_T::rend () const { - return _airlineFeatureHolder.mapREnd (); - } - - // ////////////////////////////////////////////////////////////////////// - AirlineFeatureMap_T:: - iterator AirlineFeatureMap_T::find (const MapKey_T& iKey) const { - return _airlineFeatureHolder.find (iKey); - } - -} - Deleted: trunk/stdair/stdair/bom/AirlineFeatureMap.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureMap.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/AirlineFeatureMap.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,74 +0,0 @@ -#ifndef __STDAIR_BOM_AIRLINEFEATUREMAP_HPP -#define __STDAIR_BOM_AIRLINEFEATUREMAP_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/bom/AirlineFeatureTypes.hpp> - -namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - template <typename BOM_STRUCTURE> class BomChildrenHolderImp; - class AirlineFeature; - - /** Structure which handles the iterators for a booking class map. */ - struct AirlineFeatureMap_T { - - public: - // ///////////////////////////////////////////////////////////////////////// - // See the explanations, within the stdair::BomRoot class, for all - // the iterator types specified below - // ///////////////////////////////////////////////////////////////////////// - /** Define the booking class map iterators. */ - typedef BomIterator_T<AirlineFeature, - AirlineFeatureStructureMap_T::const_iterator> iterator; - typedef BomIterator_T<AirlineFeature, - AirlineFeatureStructureMap_T::const_reverse_iterator> reverse_iterator; - // ///////////////////////////////////////////////////////////////////////// - - /** Define the booking class holder. */ - typedef BomChildrenHolderImp<AirlineFeature> AirlineFeatureHolder_T; - - public: - // /////////// Iteration methods ////////// - /** Initialise the internal iterator on flight date: - return the iterator at the begining of the map. */ - iterator begin () const; - - /** Initialise the internal iterator on flight date: - return the iterator at the end of the map. */ - iterator end () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the rbegining of the map. */ - reverse_iterator rbegin () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the end of the map. */ - reverse_iterator rend () const; - - /** Retrieve, if existing, the AirlineFeature corresponding to the - given key. */ - iterator find (const MapKey_T&) const; - - public: - /** Default constructors. */ - AirlineFeatureMap_T (); - AirlineFeatureMap_T (const AirlineFeatureMap_T&); - AirlineFeatureMap_T (const AirlineFeatureHolder_T&); - - /** Destructor. */ - virtual ~AirlineFeatureMap_T(); - - private: - // Attributes - /** Reference structure. */ - const AirlineFeatureHolder_T& _airlineFeatureHolder; - }; - -} -#endif // __STDAIR_BOM_AIRLINEFEATUREMAP_HPP - Modified: trunk/stdair/stdair/bom/AirlineFeatureSet.cpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureSet.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/AirlineFeatureSet.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -7,8 +7,8 @@ #include <stdair/bom/AirlineFeatureSetStructure.hpp> #include <stdair/bom/AirlineFeatureSet.hpp> #include <stdair/bom/AirlineFeature.hpp> -#include <stdair/bom/AirlineFeatureList.hpp> -#include <stdair/bom/AirlineFeatureMap.hpp> +#include <stdair/bom/BomList.hpp> +#include <stdair/bom/BomMap.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/AirlineFeatureSet.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureSet.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/AirlineFeatureSet.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -15,8 +15,6 @@ class FacBomContent; class AirlineFeature; struct AirlineFeatureSetKey_T; - struct AirlineFeatureList_T; - struct AirlineFeatureMap_T; /** Class representing the actual functional/business content for the Bom root. */ Modified: trunk/stdair/stdair/bom/AirlineFeatureTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureTypes.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/AirlineFeatureTypes.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -13,17 +13,25 @@ // Forward declarations. template <typename BOM_CONTENT> class AirlineFeatureStructure; + template <typename BOM> struct BomList_T; + template <typename BOM> struct BomMap_T; class AirlineFeature; - /** Define the AirlineFeature structure. */ + /** Define the airline feature structure. */ typedef AirlineFeatureStructure<AirlineFeature> AirlineFeatureStructure_T; - /** Define the segment-cabin structure list. */ + /** Define the airline feature structure list. */ typedef std::vector<AirlineFeatureStructure_T*> AirlineFeatureStructureList_T; - /** Define the segment-cabin structure map. */ + /** Define the airline feature structure map. */ typedef std::map<const std::string, AirlineFeatureStructure_T*> AirlineFeatureStructureMap_T; + /** Define the airline feature list. */ + typedef BomList_T<AirlineFeature> AirlineFeatureList_T; + + /** Define the airline feature map. */ + typedef BomMap_T<AirlineFeature> AirlineFeatureMap_T; + } #endif // __STDAIR_BOM_AIRLINEFEATURETYPES_HPP Copied: trunk/stdair/stdair/bom/BomList.hpp (from rev 58, trunk/stdair/stdair/bom/InventoryList.hpp) =================================================================== --- trunk/stdair/stdair/bom/BomList.hpp (rev 0) +++ trunk/stdair/stdair/bom/BomList.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -0,0 +1,70 @@ +#ifndef __STDAIR_BOM_BOMLIST_HPP +#define __STDAIR_BOM_BOMLIST_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// + +namespace stdair { + + // Forward declarations + template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; + template <typename BOM_CONTENT> class BomChildrenHolderImp; + + /** Structure which handles the iterators for a bom list. */ + template <typename BOM> struct BomList_T { + + public: + /** Definition that allows to retrieve the corresponding BomStructure + associated to the BOM. */ + typedef typename BOM::BomStructure_T BomStructure_T; + /** Define the list of bom objects. */ + typedef std::vector<BomStructure_T*> BomStructureList_T; + /** Define the bom holder. */ + typedef BomChildrenHolderImp<BOM> BomHolder_T; + + // ///////////////////////////////////////////////////////////////////////// + // See the explanations, within the stdair::BomContentRoot class, for all + // the iterator types specified below + // ///////////////////////////////////////////////////////////////////////// + /** Define the bom list iterators. */ + typedef BomIterator_T<BOM, typename BomStructureList_T::const_iterator> iterator; + typedef BomIterator_T<BOM, typename BomStructureList_T::const_reverse_iterator> reverse_iterator; + // ///////////////////////////////////////////////////////////////////////// + + public: + // /////////// Iteration methods ////////// + /** Initialise the internal iterator on flight date: + return the iterator at the begining of the list. */ + iterator begin () const { return _bomHolder.listBegin(); } + + /** Initialise the internal iterator on flight date: + return the iterator at the end of the list. */ + iterator end () const { return _bomHolder.listEnd(); } + + /** Initialise the internal reverse iterator on flight date: + return the reverse iterator at the rbegining of the list. */ + reverse_iterator rbegin () const { return _bomHolder.listRBegin(); } + + /** Initialise the internal reverse iterator on flight date: + return the reverse iterator at the end of the list. */ + reverse_iterator rend () const { return _bomHolder.listREnd(); } + + public: + /** Default constructors. */ + BomList_T (); + BomList_T (const BomList_T& iBomList) : _bomHolder (iBomList._bomHolder) { } + BomList_T (const BomHolder_T& iBomHolder) : _bomHolder (iBomHolder) { } + + /** Destructor. */ + ~BomList_T() { } + + private: + // Attributes + /** Reference structure. */ + const BomHolder_T& _bomHolder; + }; + +} +#endif // __STDAIR_BOM_BOMLIST_HPP + Copied: trunk/stdair/stdair/bom/BomMap.hpp (from rev 58, trunk/stdair/stdair/bom/InventoryList.hpp) =================================================================== --- trunk/stdair/stdair/bom/BomMap.hpp (rev 0) +++ trunk/stdair/stdair/bom/BomMap.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -0,0 +1,74 @@ +#ifndef __STDAIR_BOM_BOMMAP_HPP +#define __STDAIR_BOM_BOMMAP_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// + +namespace stdair { + + // Forward declarations + template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; + template <typename BOM_CONTENT> class BomChildrenHolderImp; + + /** Structure which handles the iterators for a bom map. */ + template <typename BOM> struct BomMap_T { + + public: + /** Definition that allows to retrieve the corresponding BomStructure + associated to the BOM. */ + typedef typename BOM::BomStructure_T BomStructure_T; + /** Define the map of bom objects. */ + typedef std::map<const MapKey_T, BomStructure_T*> BomStructureMap_T; + /** Define the bom holder. */ + typedef BomChildrenHolderImp<BOM> BomHolder_T; + + // ///////////////////////////////////////////////////////////////////////// + // See the explanations, within the stdair::BomContentRoot class, for all + // the iterator types specified below + // ///////////////////////////////////////////////////////////////////////// + /** Define the bom map iterators. */ + typedef BomIterator_T<BOM, typename BomStructureMap_T::const_iterator> iterator; + typedef BomIterator_T<BOM, typename BomStructureMap_T::const_reverse_iterator> reverse_iterator; + // ///////////////////////////////////////////////////////////////////////// + + public: + // /////////// Iteration methods ////////// + /** Initialise the internal iterator on flight date: + return the iterator at the begining of the map. */ + iterator begin () const { return _bomHolder.mapBegin(); } + + /** Initialise the internal iterator on flight date: + return the iterator at the end of the map. */ + iterator end () const { return _bomHolder.mapEnd(); } + + /** Initialise the internal reverse iterator on flight date: + return the reverse iterator at the rbegining of the map. */ + reverse_iterator rbegin () const { return _bomHolder.mapRBegin(); } + + /** Initialise the internal reverse iterator on flight date: + return the reverse iterator at the end of the map. */ + reverse_iterator rend () const { return _bomHolder.mapREnd(); } + + /** Retrieve, if existing, the Inventory corresponding to the + given key. */ + iterator find (const MapKey_T& iKey) const { return _bomHolder.find (iKey); } + + public: + /** Default constructors. */ + BomMap_T (); + BomMap_T (const BomMap_T& iBomMap) : _bomHolder (iBomMap._bomHolder) { } + BomMap_T (const BomHolder_T& iBomHolder) : _bomHolder (iBomHolder) { } + + /** Destructor. */ + ~BomMap_T() { } + + private: + // Attributes + /** Reference structure. */ + const BomHolder_T& _bomHolder; + }; + +} +#endif // __STDAIR_BOM_BOMMAP_HPP + Modified: trunk/stdair/stdair/bom/BomRoot.cpp =================================================================== --- trunk/stdair/stdair/bom/BomRoot.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/BomRoot.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -6,9 +6,9 @@ // STDAIR #include <stdair/bom/BomRootStructure.hpp> #include <stdair/bom/BomRoot.hpp> +#include <stdair/bom/BomList.hpp> +#include <stdair/bom/BomMap.hpp> #include <stdair/bom/Inventory.hpp> -#include <stdair/bom/InventoryList.hpp> -#include <stdair/bom/InventoryMap.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/BomRoot.hpp =================================================================== --- trunk/stdair/stdair/bom/BomRoot.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/BomRoot.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -15,8 +15,6 @@ class FacBomContent; class AirlineFeatureSet; struct BomRootKey_T; - struct InventoryList_T; - struct InventoryMap_T; /** Class representing the actual functional/business content for the Bom root. */ Modified: trunk/stdair/stdair/bom/BookingClass.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClass.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/BookingClass.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -15,8 +15,6 @@ // Forward declarations class FacBomContent; struct BookingClassKey_T; - struct BookingClassList_T; - struct BookingClassMap_T; /** Class representing the actual functional/business content for a segment-cabin. */ Deleted: trunk/stdair/stdair/bom/BookingClassList.cpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassList.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/BookingClassList.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,50 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <cassert> -// STDAIR -#include <stdair/bom/BomChildrenHolderImp.hpp> -#include <stdair/bom/BookingClass.hpp> -#include <stdair/bom/BookingClassList.hpp> - -namespace stdair { - - // //////////////////////////////////////////////////////////////////// - BookingClassList_T:: - BookingClassList_T (const BookingClassHolder_T& iBookingClassHolder) - : _bookingClassHolder (iBookingClassHolder) { - } - - // //////////////////////////////////////////////////////////////////// - BookingClassList_T:: - BookingClassList_T (const BookingClassList_T& iBCList) - : _bookingClassHolder (iBCList._bookingClassHolder) { - } - - // //////////////////////////////////////////////////////////////////// - BookingClassList_T::~BookingClassList_T () { - } - - // ////////////////////////////////////////////////////////////////////// - BookingClassList_T::iterator BookingClassList_T::begin () const { - return _bookingClassHolder.listBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - BookingClassList_T::iterator BookingClassList_T::end () const { - return _bookingClassHolder.listEnd (); - } - - // ////////////////////////////////////////////////////////////////////// - BookingClassList_T::reverse_iterator BookingClassList_T::rbegin () const { - return _bookingClassHolder.listRBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - BookingClassList_T::reverse_iterator BookingClassList_T::rend () const { - return _bookingClassHolder.listREnd (); - } - -} - Deleted: trunk/stdair/stdair/bom/BookingClassList.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassList.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/BookingClassList.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,70 +0,0 @@ -#ifndef __STDAIR_BOM_BOOKINGCLASSLIST_HPP -#define __STDAIR_BOM_BOOKINGCLASSLIST_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/bom/BookingClassTypes.hpp> - -namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - template <typename BOM_STRUCTURE> class BomChildrenHolderImp; - class BookingClass; - - /** Structure which handles the iterators for a booking class list. */ - struct BookingClassList_T { - - public: - // ///////////////////////////////////////////////////////////////////////// - // See the explanations, within the stdair::BomContentRoot class, for all - // the iterator types specified below - // ///////////////////////////////////////////////////////////////////////// - /** Define the booking class list iterators. */ - typedef BomIterator_T<BookingClass, - BookingClassStructureList_T::const_iterator> iterator; - typedef BomIterator_T<BookingClass, - BookingClassStructureList_T::const_reverse_iterator> reverse_iterator; - // ///////////////////////////////////////////////////////////////////////// - - /** Define the booking class holder. */ - typedef BomChildrenHolderImp<BookingClass> BookingClassHolder_T; - - public: - // /////////// Iteration methods ////////// - /** Initialise the internal iterator on flight date: - return the iterator at the begining of the list. */ - iterator begin () const; - - /** Initialise the internal iterator on flight date: - return the iterator at the end of the list. */ - iterator end () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the rbegining of the list. */ - reverse_iterator rbegin () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the end of the list. */ - reverse_iterator rend () const; - - public: - /** Default constructors. */ - BookingClassList_T (); - BookingClassList_T (const BookingClassList_T&); - BookingClassList_T (const BookingClassHolder_T&); - - /** Destructor. */ - virtual ~BookingClassList_T(); - - private: - // Attributes - /** Reference structure. */ - const BookingClassHolder_T& _bookingClassHolder; - }; - -} -#endif // __STDAIR_BOM_BOOKINGCLASSLIST_HPP - Deleted: trunk/stdair/stdair/bom/BookingClassMap.cpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassMap.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/BookingClassMap.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,56 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <cassert> -// STDAIR -#include <stdair/bom/BomChildrenHolderImp.hpp> -#include <stdair/bom/BookingClass.hpp> -#include <stdair/bom/BookingClassMap.hpp> - -namespace stdair { - - // //////////////////////////////////////////////////////////////////// - BookingClassMap_T:: - BookingClassMap_T (const BookingClassHolder_T& iBookingClassHolder) - : _bookingClassHolder (iBookingClassHolder) { - } - - // //////////////////////////////////////////////////////////////////// - BookingClassMap_T:: - BookingClassMap_T (const BookingClassMap_T& iBCMap) - : _bookingClassHolder (iBCMap._bookingClassHolder) { - } - - // //////////////////////////////////////////////////////////////////// - BookingClassMap_T::~BookingClassMap_T () { - } - - // ////////////////////////////////////////////////////////////////////// - BookingClassMap_T::iterator BookingClassMap_T::begin () const { - return _bookingClassHolder.mapBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - BookingClassMap_T::iterator BookingClassMap_T::end () const { - return _bookingClassHolder.mapEnd (); - } - - // ////////////////////////////////////////////////////////////////////// - BookingClassMap_T::reverse_iterator BookingClassMap_T::rbegin () const { - return _bookingClassHolder.mapRBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - BookingClassMap_T::reverse_iterator BookingClassMap_T::rend () const { - return _bookingClassHolder.mapREnd (); - } - - // ////////////////////////////////////////////////////////////////////// - BookingClassMap_T:: - iterator BookingClassMap_T::find (const MapKey_T& iKey) const { - return _bookingClassHolder.find (iKey); - } - -} - Deleted: trunk/stdair/stdair/bom/BookingClassMap.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassMap.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/BookingClassMap.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,74 +0,0 @@ -#ifndef __STDAIR_BOM_BOOKINGCLASSMAP_HPP -#define __STDAIR_BOM_BOOKINGCLASSMAP_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/bom/BookingClassTypes.hpp> - -namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - template <typename BOM_STRUCTURE> class BomChildrenHolderImp; - class BookingClass; - - /** Structure which handles the iterators for a booking class map. */ - struct BookingClassMap_T { - - public: - // ///////////////////////////////////////////////////////////////////////// - // See the explanations, within the stdair::BomContentRoot class, for all - // the iterator types specified below - // ///////////////////////////////////////////////////////////////////////// - /** Define the booking class map iterators. */ - typedef BomIterator_T<BookingClass, - BookingClassStructureMap_T::const_iterator> iterator; - typedef BomIterator_T<BookingClass, - BookingClassStructureMap_T::const_reverse_iterator> reverse_iterator; - // ///////////////////////////////////////////////////////////////////////// - - /** Define the booking class holder. */ - typedef BomChildrenHolderImp<BookingClass> BookingClassHolder_T; - - public: - // /////////// Iteration methods ////////// - /** Initialise the internal iterator on flight date: - return the iterator at the begining of the map. */ - iterator begin () const; - - /** Initialise the internal iterator on flight date: - return the iterator at the end of the map. */ - iterator end () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the rbegining of the map. */ - reverse_iterator rbegin () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the end of the map. */ - reverse_iterator rend () const; - - /** Retrieve, if existing, the BookingClass corresponding to the - given key. */ - iterator find (const MapKey_T&) const; - - public: - /** Default constructors. */ - BookingClassMap_T (); - BookingClassMap_T (const BookingClassMap_T&); - BookingClassMap_T (const BookingClassHolder_T&); - - /** Destructor. */ - virtual ~BookingClassMap_T(); - - private: - // Attributes - /** Reference structure. */ - const BookingClassHolder_T& _bookingClassHolder; - }; - -} -#endif // __STDAIR_BOM_BOOKINGCLASSMAP_HPP - Modified: trunk/stdair/stdair/bom/BookingClassTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassTypes.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/BookingClassTypes.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -13,17 +13,24 @@ // Forward declarations. template <typename BOM_CONTENT> class BookingClassStructure; + template <typename BOM> struct BomList_T; + template <typename BOM> struct BomMap_T; class BookingClass; - /** Define the BookingClass structure. */ + /** Define the booking class structure. */ typedef BookingClassStructure<BookingClass> BookingClassStructure_T; - /** Define the segment-cabin structure list. */ + /** Define the booking class structure list. */ typedef std::vector<BookingClassStructure_T*> BookingClassStructureList_T; - /** Define the segment-cabin structure map. */ + /** Define the booking class structure map. */ typedef std::map<const std::string, BookingClassStructure_T*> BookingClassStructureMap_T; + /** Define the booking class list. */ + typedef BomList_T<BookingClass> BookingClassList_T; + + /** Define the booking class map. */ + typedef BomMap_T<BookingClass> BookingClassMap_T; } #endif // __STDAIR_BOM_BOOKINGCLASSTYPES_HPP Modified: trunk/stdair/stdair/bom/FlightDate.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/FlightDate.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -10,11 +10,9 @@ #include <stdair/bom/FlightDateStructure.hpp> #include <stdair/bom/FlightDate.hpp> #include <stdair/bom/SegmentDate.hpp> -#include <stdair/bom/SegmentDateList.hpp> -#include <stdair/bom/SegmentDateMap.hpp> #include <stdair/bom/LegDate.hpp> -#include <stdair/bom/LegDateList.hpp> -#include <stdair/bom/LegDateMap.hpp> +#include <stdair/bom/BomList.hpp> +#include <stdair/bom/BomMap.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/FlightDate.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -16,10 +16,6 @@ // Forward declarations class FacBomContent; struct FlightDateKey_T; - struct SegmentDateList_T; - struct SegmentDateMap_T; - struct LegDateList_T; - struct LegDateMap_T; /** Class representing the actual functional/business content for a flight-date. */ Deleted: trunk/stdair/stdair/bom/FlightDateList.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateList.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/FlightDateList.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,50 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <cassert> -// STDAIR -#include <stdair/bom/BomChildrenHolderImp.hpp> -#include <stdair/bom/FlightDate.hpp> -#include <stdair/bom/FlightDateList.hpp> - -namespace stdair { - - // //////////////////////////////////////////////////////////////////// - FlightDateList_T:: - FlightDateList_T (const FlightDateHolder_T& iFlightDateHolder) - : _flightDateHolder (iFlightDateHolder) { - } - - // //////////////////////////////////////////////////////////////////// - FlightDateList_T:: - FlightDateList_T (const FlightDateList_T& iFDList) - : _flightDateHolder (iFDList._flightDateHolder) { - } - - // //////////////////////////////////////////////////////////////////// - FlightDateList_T::~FlightDateList_T () { - } - - // ////////////////////////////////////////////////////////////////////// - FlightDateList_T::iterator FlightDateList_T::begin () const { - return _flightDateHolder.listBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - FlightDateList_T::iterator FlightDateList_T::end () const { - return _flightDateHolder.listEnd (); - } - - // ////////////////////////////////////////////////////////////////////// - FlightDateList_T::reverse_iterator FlightDateList_T::rbegin () const { - return _flightDateHolder.listRBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - FlightDateList_T::reverse_iterator FlightDateList_T::rend () const { - return _flightDateHolder.listREnd (); - } - -} - Deleted: trunk/stdair/stdair/bom/FlightDateList.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateList.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/FlightDateList.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,70 +0,0 @@ -#ifndef __STDAIR_BOM_FLIGHTDATELIST_HPP -#define __STDAIR_BOM_FLIGHTDATELIST_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/bom/FlightDateTypes.hpp> - -namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - template <typename BOM_STRUCTURE> class BomChildrenHolderImp; - class FlightDate; - - /** Structure which handles the iterators for a flight-date list. */ - struct FlightDateList_T { - - public: - // ///////////////////////////////////////////////////////////////////////// - // See the explanations, within the stdair::BomContentRoot class, for all - // the iterator types specified below - // ///////////////////////////////////////////////////////////////////////// - /** Define the flight-date list iterators. */ - typedef BomIterator_T<FlightDate, - FlightDateStructureList_T::const_iterator> iterator; - typedef BomIterator_T<FlightDate, - FlightDateStructureList_T::const_reverse_iterator> reverse_iterator; - // ///////////////////////////////////////////////////////////////////////// - - /** Define the flight-date holder. */ - typedef BomChildrenHolderImp<FlightDate> FlightDateHolder_T; - - public: - // /////////// Iteration methods ////////// - /** Initialise the internal iterator on flight date: - return the iterator at the begining of the list. */ - iterator begin () const; - - /** Initialise the internal iterator on flight date: - return the iterator at the end of the list. */ - iterator end () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the rbegining of the list. */ - reverse_iterator rbegin () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the end of the list. */ - reverse_iterator rend () const; - - public: - /** Default constructors. */ - FlightDateList_T (); - FlightDateList_T (const FlightDateList_T&); - FlightDateList_T (const FlightDateHolder_T&); - - /** Destructor. */ - virtual ~FlightDateList_T(); - - private: - // Attributes - /** Reference structure. */ - const FlightDateHolder_T& _flightDateHolder; - }; - -} -#endif // __STDAIR_BOM_FLIGHTDATELIST_HPP - Deleted: trunk/stdair/stdair/bom/FlightDateMap.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateMap.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/FlightDateMap.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,56 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <cassert> -// STDAIR -#include <stdair/bom/BomChildrenHolderImp.hpp> -#include <stdair/bom/FlightDate.hpp> -#include <stdair/bom/FlightDateMap.hpp> - -namespace stdair { - - // //////////////////////////////////////////////////////////////////// - FlightDateMap_T:: - FlightDateMap_T (const FlightDateHolder_T& iFlightDateHolder) - : _flightDateHolder (iFlightDateHolder) { - } - - // //////////////////////////////////////////////////////////////////// - FlightDateMap_T:: - FlightDateMap_T (const FlightDateMap_T& iFDMap) - : _flightDateHolder (iFDMap._flightDateHolder) { - } - - // //////////////////////////////////////////////////////////////////// - FlightDateMap_T::~FlightDateMap_T () { - } - - // ////////////////////////////////////////////////////////////////////// - FlightDateMap_T::iterator FlightDateMap_T::begin () const { - return _flightDateHolder.mapBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - FlightDateMap_T::iterator FlightDateMap_T::end () const { - return _flightDateHolder.mapEnd (); - } - - // ////////////////////////////////////////////////////////////////////// - FlightDateMap_T::reverse_iterator FlightDateMap_T::rbegin () const { - return _flightDateHolder.mapRBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - FlightDateMap_T::reverse_iterator FlightDateMap_T::rend () const { - return _flightDateHolder.mapREnd (); - } - - // ////////////////////////////////////////////////////////////////////// - FlightDateMap_T:: - iterator FlightDateMap_T::find (const MapKey_T& iKey) const { - return _flightDateHolder.find (iKey); - } - -} - Deleted: trunk/stdair/stdair/bom/FlightDateMap.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateMap.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/FlightDateMap.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,74 +0,0 @@ -#ifndef __STDAIR_BOM_FLIGHTDATEMAP_HPP -#define __STDAIR_BOM_FLIGHTDATEMAP_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/bom/FlightDateTypes.hpp> - -namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - template <typename BOM_STRUCTURE> class BomChildrenHolderImp; - class FlightDate; - - /** Structure which handles the iterators for a flight-date map. */ - struct FlightDateMap_T { - - public: - // ///////////////////////////////////////////////////////////////////////// - // See the explanations, within the stdair::BomContentRoot class, for all - // the iterator types specified below - // ///////////////////////////////////////////////////////////////////////// - /** Define the flight-date map iterators. */ - typedef BomIterator_T<FlightDate, - FlightDateStructureMap_T::const_iterator> iterator; - typedef BomIterator_T<FlightDate, - FlightDateStructureMap_T::const_reverse_iterator> reverse_iterator; - // ///////////////////////////////////////////////////////////////////////// - - /** Define the flight-date holder. */ - typedef BomChildrenHolderImp<FlightDate> FlightDateHolder_T; - - public: - // /////////// Iteration methods ////////// - /** Initialise the internal iterator on flight date: - return the iterator at the begining of the map. */ - iterator begin () const; - - /** Initialise the internal iterator on flight date: - return the iterator at the end of the map. */ - iterator end () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the rbegining of the map. */ - reverse_iterator rbegin () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the end of the map. */ - reverse_iterator rend () const; - - /** Retrieve, if existing, the FlightDate corresponding to the - given key. */ - iterator find (const MapKey_T&) const; - - public: - /** Default constructors. */ - FlightDateMap_T (); - FlightDateMap_T (const FlightDateMap_T&); - FlightDateMap_T (const FlightDateHolder_T&); - - /** Destructor. */ - virtual ~FlightDateMap_T(); - - private: - // Attributes - /** Reference structure. */ - const FlightDateHolder_T& _flightDateHolder; - }; - -} -#endif // __STDAIR_BOM_FLIGHTDATEMAP_HPP - Modified: trunk/stdair/stdair/bom/FlightDateTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateTypes.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/FlightDateTypes.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -13,6 +13,8 @@ // Forward declarations. template <typename BOM_CONTENT> class FlightDateStructure; + template <typename BOM> struct BomList_T; + template <typename BOM> struct BomMap_T; class FlightDate; /** Define the FlightDate structure. */ @@ -24,6 +26,11 @@ /** Define the flight-date structure map. */ typedef std::map<const std::string, FlightDateStructure_T*> FlightDateStructureMap_T; + /** Define the flight-date list. */ + typedef BomList_T<FlightDate> FlightDateList_T; + + /** Define the flight-date map. */ + typedef BomMap_T<FlightDate> FlightDateMap_T; } #endif // __STDAIR_BOM_FLIGHTDATETYPES_HPP Modified: trunk/stdair/stdair/bom/Inventory.cpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/Inventory.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -7,8 +7,8 @@ #include <stdair/bom/InventoryStructure.hpp> #include <stdair/bom/Inventory.hpp> #include <stdair/bom/FlightDate.hpp> -#include <stdair/bom/FlightDateList.hpp> -#include <stdair/bom/FlightDateMap.hpp> +#include <stdair/bom/BomList.hpp> +#include <stdair/bom/BomMap.hpp> namespace stdair { @@ -34,6 +34,7 @@ // ////////////////////////////////////////////////////////////////////// std::string Inventory::toString() const { std::ostringstream oStr; + oStr << _key.toString(); return oStr.str(); } Modified: trunk/stdair/stdair/bom/Inventory.hpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/Inventory.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -10,15 +10,13 @@ #include <stdair/bom/InventoryTypes.hpp> #include <stdair/bom/FlightDateTypes.hpp> #include <stdair/bom/InventoryContent.hpp> -#include <stdair/bom/BookingClassMap.hpp> namespace stdair { // Forward declarations class FacBomContent; class AirlineFeature; + class BookingClass; struct InventoryKey_T; - struct FlightDateList_T; - struct FlightDateMap_T; /** Class representing the actual functional/business content for an airline inventory. */ @@ -43,6 +41,9 @@ /** Definition allowing to retrieve the associated BOM content child type. */ typedef FlightDate ContentChild_T; + + /** Definition allowing to retrieve the specific BookingClass type. */ + typedef BookingClass BookingClassContent_T; // ///////////////////////////////////////////////////////////////////////// public: @@ -138,7 +139,7 @@ const AirlineFeature* _airlineFeature; /** List of booking classes. */ - //BookingClassMap_T _bookingClassList; + //BookingClassHolder_T _bookingClassList; }; } Deleted: trunk/stdair/stdair/bom/InventoryList.cpp =================================================================== --- trunk/stdair/stdair/bom/InventoryList.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/InventoryList.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,50 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <cassert> -// STDAIR -#include <stdair/bom/BomChildrenHolderImp.hpp> -#include <stdair/bom/Inventory.hpp> -#include <stdair/bom/InventoryList.hpp> - -namespace stdair { - - // //////////////////////////////////////////////////////////////////// - InventoryList_T:: - InventoryList_T (const InventoryHolder_T& iInventoryHolder) - : _inventoryHolder (iInventoryHolder) { - } - - // //////////////////////////////////////////////////////////////////// - InventoryList_T:: - InventoryList_T (const InventoryList_T& iINVList) - : _inventoryHolder (iINVList._inventoryHolder) { - } - - // //////////////////////////////////////////////////////////////////// - InventoryList_T::~InventoryList_T () { - } - - // ////////////////////////////////////////////////////////////////////// - InventoryList_T::iterator InventoryList_T::begin () const { - return _inventoryHolder.listBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - InventoryList_T::iterator InventoryList_T::end () const { - return _inventoryHolder.listEnd (); - } - - // ////////////////////////////////////////////////////////////////////// - InventoryList_T::reverse_iterator InventoryList_T::rbegin () const { - return _inventoryHolder.listRBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - InventoryList_T::reverse_iterator InventoryList_T::rend () const { - return _inventoryHolder.listREnd (); - } - -} - Deleted: trunk/stdair/stdair/bom/InventoryList.hpp =================================================================== --- trunk/stdair/stdair/bom/InventoryList.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/InventoryList.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,70 +0,0 @@ -#ifndef __STDAIR_BOM_INVENTORYLIST_HPP -#define __STDAIR_BOM_INVENTORYLIST_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/bom/InventoryTypes.hpp> - -namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - template <typename BOM_STRUCTURE> class BomChildrenHolderImp; - class Inventory; - - /** Structure which handles the iterators for a inventory list. */ - struct InventoryList_T { - - public: - // ///////////////////////////////////////////////////////////////////////// - // See the explanations, within the stdair::BomContentRoot class, for all - // the iterator types specified below - // ///////////////////////////////////////////////////////////////////////// - /** Define the inventory list iterators. */ - typedef BomIterator_T<Inventory, - InventoryStructureList_T::const_iterator> iterator; - typedef BomIterator_T<Inventory, - InventoryStructureList_T::const_reverse_iterator> reverse_iterator; - // ///////////////////////////////////////////////////////////////////////// - - /** Define the inventory holder. */ - typedef BomChildrenHolderImp<Inventory> InventoryHolder_T; - - public: - // /////////// Iteration methods ////////// - /** Initialise the internal iterator on flight date: - return the iterator at the begining of the list. */ - iterator begin () const; - - /** Initialise the internal iterator on flight date: - return the iterator at the end of the list. */ - iterator end () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the rbegining of the list. */ - reverse_iterator rbegin () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the end of the list. */ - reverse_iterator rend () const; - - public: - /** Default constructors. */ - InventoryList_T (); - InventoryList_T (const InventoryList_T&); - InventoryList_T (const InventoryHolder_T&); - - /** Destructor. */ - virtual ~InventoryList_T(); - - private: - // Attributes - /** Reference structure. */ - const InventoryHolder_T& _inventoryHolder; - }; - -} -#endif // __STDAIR_BOM_INVENTORYLIST_HPP - Deleted: trunk/stdair/stdair/bom/InventoryMap.cpp =================================================================== --- trunk/stdair/stdair/bom/InventoryMap.cpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/InventoryMap.cpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,56 +0,0 @@ -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <cassert> -// STDAIR -#include <stdair/bom/BomChildrenHolderImp.hpp> -#include <stdair/bom/Inventory.hpp> -#include <stdair/bom/InventoryMap.hpp> - -namespace stdair { - - // //////////////////////////////////////////////////////////////////// - InventoryMap_T:: - InventoryMap_T (const InventoryHolder_T& iInventoryHolder) - : _inventoryHolder (iInventoryHolder) { - } - - // //////////////////////////////////////////////////////////////////// - InventoryMap_T:: - InventoryMap_T (const InventoryMap_T& iINVMap) - : _inventoryHolder (iINVMap._inventoryHolder) { - } - - // //////////////////////////////////////////////////////////////////// - InventoryMap_T::~InventoryMap_T () { - } - - // ////////////////////////////////////////////////////////////////////// - InventoryMap_T::iterator InventoryMap_T::begin () const { - return _inventoryHolder.mapBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - InventoryMap_T::iterator InventoryMap_T::end () const { - return _inventoryHolder.mapEnd (); - } - - // ////////////////////////////////////////////////////////////////////// - InventoryMap_T::reverse_iterator InventoryMap_T::rbegin () const { - return _inventoryHolder.mapRBegin (); - } - - // ////////////////////////////////////////////////////////////////////// - InventoryMap_T::reverse_iterator InventoryMap_T::rend () const { - return _inventoryHolder.mapREnd (); - } - - // ////////////////////////////////////////////////////////////////////// - InventoryMap_T:: - iterator InventoryMap_T::find (const MapKey_T& iKey) const { - return _inventoryHolder.find (iKey); - } - -} - Deleted: trunk/stdair/stdair/bom/InventoryMap.hpp =================================================================== --- trunk/stdair/stdair/bom/InventoryMap.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/stdair/bom/InventoryMap.hpp 2009-11-05 10:54:06 UTC (rev 60) @@ -1,74 +0,0 @@ -#ifndef __STDAIR_BOM_INVENTORYMAP_HPP -#define __STDAIR_BOM_INVENTORYMAP_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/bom/InventoryTypes.hpp> - -namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT, typename ITERATOR> struct BomIterator_T; - template <typename BOM_STRUCTURE> class BomChildrenHolderImp; - class Inventory; - - /** Structure which handles the iterators for a inventory map. */ - struct InventoryMap_T { - - public: - // ///////////////////////////////////////////////////////////////////////// - // See the explanations, within the stdair::BomContentRoot class, for all - // the iterator types specified below - // ///////////////////////////////////////////////////////////////////////// - /** Define the inventory map iterators. */ - typedef BomIterator_T<Inventory, - InventoryStructureMap_T::const_iterator> iterator; - typedef BomIterator_T<Inventory, - InventoryStructureMap_T::const_reverse_iterator> reverse_iterator; - // ///////////////////////////////////////////////////////////////////////// - - /** Define the inventory holder. */ - typedef BomChildrenHolderImp<Inventory> InventoryHolder_T; - - public: - // /////////// Iteration methods ////////// - /** Initialise the internal iterator on flight date: - return the iterator at the begining of the map. */ - iterator begin () const; - - /** Initialise the internal iterator on flight date: - return the iterator at the end of the map. */ - iterator end () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the rbegining of the map. */ - reverse_iterator rbegin () const; - - /** Initialise the internal reverse iterator on flight date: - return the reverse iterator at the end of the map. */ - reverse_iterator rend () const; - - /** Retrieve, if existing, the Inventory corresponding to the - given key. */ - iterator find (const MapKey_T&) const; - - public: - /** Default constructors. */ - InventoryMap_T (); - InventoryMap_T (const InventoryMap_T&); - InventoryMap_T (const InventoryHolder_T&); - - /** Destructor. */ - virtual ~InventoryMap_T(); - - private: - // Attributes - /** Reference structure. */ - const InventoryHolder_T& _inventoryHolder; - }; - -} -#endif // __STDAIR_BOM_INVENTORYMAP_HPP - Modified: trunk/stdair/stdair/bom/InventoryStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-11-04 10:39:37 UTC (rev 59) +++ trunk/stdair/s... [truncated message content] |
From: <den...@us...> - 2010-01-02 01:12:26
|
Revision: 82 http://stdair.svn.sourceforge.net/stdair/?rev=82&view=rev Author: denis_arnaud Date: 2010-01-02 01:12:19 +0000 (Sat, 02 Jan 2010) Log Message: ----------- [Dev] Added the implementation of both BookingRequestStruct and TravelSolutionStruct. There is still work to do, though, for those objects. Modified Paths: -------------- trunk/stdair/stdair/bom/BookingRequestStruct.hpp trunk/stdair/stdair/bom/TravelSolutionStruct.hpp trunk/stdair/stdair/bom/sources.mk Added Paths: ----------- trunk/stdair/stdair/bom/BookingRequestStruct.cpp trunk/stdair/stdair/bom/TravelSolutionStruct.cpp Added: trunk/stdair/stdair/bom/BookingRequestStruct.cpp =================================================================== --- trunk/stdair/stdair/bom/BookingRequestStruct.cpp (rev 0) +++ trunk/stdair/stdair/bom/BookingRequestStruct.cpp 2010-01-02 01:12:19 UTC (rev 82) @@ -0,0 +1,28 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +#include <istream> +#include <ostream> +#include <sstream> +// StdAir +#include <stdair/bom/BookingRequestStruct.hpp> + +namespace stdair { + + // ////////////////////////////////////////////////////////////////////// + void BookingRequestStruct::toStream (std::ostream& ioOut) const { + ioOut << describe(); + } + + // ////////////////////////////////////////////////////////////////////// + void BookingRequestStruct::fromStream (std::istream& ioIn) { + } + + // ////////////////////////////////////////////////////////////////////// + const std::string BookingRequestStruct::describe() const { + return ""; + } + +} Modified: trunk/stdair/stdair/bom/BookingRequestStruct.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingRequestStruct.hpp 2010-01-01 19:02:08 UTC (rev 81) +++ trunk/stdair/stdair/bom/BookingRequestStruct.hpp 2010-01-02 01:12:19 UTC (rev 82) @@ -9,33 +9,96 @@ #include <string> // StdAir #include <stdair/bom/StructAbstract.hpp> +#include <stdair/STDAIR_Types.hpp> namespace stdair { /** Structure holding the elements of a booking request. */ struct BookingRequestStruct : public StructAbstract { public: + // /////////////// Getters ///////////////// + /** Get the requested origin. */ + const AirportCode_T& getOrigin() const { + return _origin; + } + /** Get the requested destination. */ + const AirportCode_T& getDestination() const { + return _destination; + } + + /** Get the requested departure date. */ + const Date_T& getDepartureDate() const { + return _departureDate; + } + + /** Get the passenger type. */ + const PassengerType_T& getPaxType() const { + return _paxType; + } + + /** Get the party size. */ + const NbOfSeats_T& getPartySize() const { + return _partySize; + } + + + // /////////////// Setters ///////////////// + /** Set the requested origin. */ + void setOrigin (const AirportCode_T& iOrigin) { + _origin = iOrigin; + } + + /** Set the requested destination. */ + void setDestination (const AirportCode_T& iDestination) { + _destination = iDestination; + } + + /** Set the requested departure date. */ + void setDepartureDate (const Date_T& iDepartureDate) { + _departureDate = iDepartureDate; + } + + /** Set the passenger type. */ + void setPaxType (const PassengerType_T& iPaxType) { + _paxType = iPaxType; + } + + /** Set the party size. */ + void setPartySize (const NbOfSeats_T& iPartySize) { + _partySize = iPartySize; + } + + // /////////// Display support method ///////////// /** Dump a Business Object into an output stream. @param ostream& the output stream. */ - void toStream (std::ostream& ioOut) const { - ioOut << describe(); - } + void toStream (std::ostream& ioOut) const; /** Read a Business Object from an input stream. @param istream& the input stream. */ - void fromStream (std::istream& ioIn) { - } + void fromStream (std::istream& ioIn); /** Display of the structure. */ - const std::string describe() const { - return ""; - } + const std::string describe() const; - + private: + // /////////////// Attributes ///////////////// + /** Origin. */ + AirportCode_T _origin; + /** Destination. */ + AirportCode_T _destination; + + /** Departure date. */ + Date_T _departureDate; + + /** Passenger type. */ + PassengerType_T _paxType; + + /** Party size. */ + NbOfSeats_T _partySize; }; } Added: trunk/stdair/stdair/bom/TravelSolutionStruct.cpp =================================================================== --- trunk/stdair/stdair/bom/TravelSolutionStruct.cpp (rev 0) +++ trunk/stdair/stdair/bom/TravelSolutionStruct.cpp 2010-01-02 01:12:19 UTC (rev 82) @@ -0,0 +1,28 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <cassert> +#include <istream> +#include <ostream> +#include <sstream> +// StdAir +#include <stdair/bom/TravelSolutionStruct.hpp> + +namespace stdair { + + // ////////////////////////////////////////////////////////////////////// + void TravelSolutionStruct::toStream (std::ostream& ioOut) const { + ioOut << describe(); + } + + // ////////////////////////////////////////////////////////////////////// + void TravelSolutionStruct::fromStream (std::istream& ioIn) { + } + + // ////////////////////////////////////////////////////////////////////// + const std::string TravelSolutionStruct::describe() const { + return ""; + } + +} Modified: trunk/stdair/stdair/bom/TravelSolutionStruct.hpp =================================================================== --- trunk/stdair/stdair/bom/TravelSolutionStruct.hpp 2010-01-01 19:02:08 UTC (rev 81) +++ trunk/stdair/stdair/bom/TravelSolutionStruct.hpp 2010-01-02 01:12:19 UTC (rev 82) @@ -19,19 +19,14 @@ // /////////// Display support method ///////////// /** Dump a Business Object into an output stream. @param ostream& the output stream. */ - void toStream (std::ostream& ioOut) const { - ioOut << describe(); - } + void toStream (std::ostream& ioOut) const; /** Read a Business Object from an input stream. @param istream& the input stream. */ - void fromStream (std::istream& ioIn) { - } + void fromStream (std::istream& ioIn); /** Display of the structure. */ - const std::string describe() const { - return ""; - } + const std::string describe() const; private: Modified: trunk/stdair/stdair/bom/sources.mk =================================================================== --- trunk/stdair/stdair/bom/sources.mk 2010-01-01 19:02:08 UTC (rev 81) +++ trunk/stdair/stdair/bom/sources.mk 2010-01-02 01:12:19 UTC (rev 82) @@ -98,5 +98,6 @@ $(top_srcdir)/stdair/bom/AirlineFeatureContent.cpp \ $(top_srcdir)/stdair/bom/OptimizerStruct.cpp \ $(top_srcdir)/stdair/bom/DoWStruct.cpp \ + $(top_srcdir)/stdair/bom/TravelSolutionStruct.cpp \ + $(top_srcdir)/stdair/bom/BookingRequestStruct.cpp \ $(top_srcdir)/stdair/bom/BomManager.cpp - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |