File indexing completed on 2026-09-13 09:17:16
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>
0028 class NCollection_TListIterator : public NCollection_BaseList::Iterator
0029 {
0030 public:
0031
0032 NCollection_TListIterator() noexcept
0033 : NCollection_BaseList::Iterator()
0034 {
0035 }
0036
0037
0038 NCollection_TListIterator(const NCollection_BaseList& theList) noexcept
0039 : NCollection_BaseList::Iterator(theList)
0040 {
0041 }
0042
0043
0044 bool More() const noexcept { return (myCurrent != nullptr); }
0045
0046
0047 void Next() noexcept
0048 {
0049 myPrevious = myCurrent;
0050 myCurrent = myCurrent->Next();
0051 }
0052
0053
0054 const TheItemType& Value() const noexcept
0055 {
0056 return ((const NCollection_TListNode<TheItemType>*)myCurrent)->Value();
0057 }
0058
0059
0060 TheItemType& Value() noexcept
0061 {
0062 return ((NCollection_TListNode<TheItemType>*)myCurrent)->ChangeValue();
0063 }
0064
0065
0066 TheItemType& ChangeValue() const noexcept
0067 {
0068 return ((NCollection_TListNode<TheItemType>*)myCurrent)->ChangeValue();
0069 }
0070 };
0071
0072 #endif