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. |