File indexing completed on 2025-01-18 10:04:20
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef NCollection_TListIterator_HeaderFile
0017 #define NCollection_TListIterator_HeaderFile
0018
0019 #include <NCollection_BaseList.hxx>
0020 #include <NCollection_TListNode.hxx>
0021
0022
0023
0024
0025
0026
0027 template <class TheItemType> class NCollection_TListIterator
0028 : public NCollection_BaseList::Iterator
0029 {
0030 public:
0031
0032 NCollection_TListIterator (void) :
0033 NCollection_BaseList::Iterator () {}
0034
0035 NCollection_TListIterator (const NCollection_BaseList& theList) :
0036 NCollection_BaseList::Iterator (theList) {}
0037
0038 Standard_Boolean More (void) const
0039 { return (myCurrent!=NULL); }
0040
0041 void Next (void)
0042 {
0043 myPrevious = myCurrent;
0044 myCurrent = myCurrent->Next();
0045 }
0046
0047
0048 const TheItemType& Value (void) const
0049 { return ((const NCollection_TListNode<TheItemType>*) myCurrent)->Value(); }
0050
0051
0052 TheItemType& Value (void)
0053 { return ((NCollection_TListNode<TheItemType>*) myCurrent)->ChangeValue(); }
0054
0055
0056 TheItemType& ChangeValue (void) const
0057 { return ((NCollection_TListNode<TheItemType> *)myCurrent)->ChangeValue(); }
0058 };
0059
0060 #endif