|
Base Module
VST 3.6.5
SDK for developing VST Plug-in
|
Template container iterator base class (abstract). More...
#include <tcontainer.h>
Inheritance diagram for TIterator< T >:Public Member Functions | |
| TIterator (const TContainer< T > &cont) | |
| virtual | ~TIterator () |
| virtual bool | done () const =0 |
| Check if end of container is reached. More... | |
| virtual T & | next ()=0 |
| Returns the current data and advances the iterator. postfix as in t = c++;. More... | |
| virtual T & | previous ()=0 |
| Returns the current data and backup. postfix as in t = c–;. More... | |
| virtual T & | current () const =0 |
| Returns the current data. More... | |
| virtual void | first ()=0 |
| Move to first data. More... | |
| virtual void | last ()=0 |
| Move to last data. More... | |
| T & | next (const T &) |
| Advance to next equal. More... | |
| T & | previous (const T &) |
| Backup to previous equal. More... | |
| const TContainer< T > & | container () const |
| Return container reference. More... | |
| operator int32 () const | |
| Check if not end. More... | |
| T & | operator++ () |
| Advance the iterator to the next item and return it. More... | |
| T & | operator++ (int) |
| Return the current item and advance the iterator to the next. More... | |
| T & | operator+= (int32 n) |
| Advance the iterator n places and returns the item. More... | |
| T & | operator-- () |
| Decrement the iterator by one and return the item. More... | |
| T & | operator-- (int) |
| Return the current item and decrement the iterator by one. More... | |
| T & | operator-= (int32) |
| Decrement the iterator n places and returns the item. More... | |
| T & | operator() () const |
| Return current item. More... | |
Protected Attributes | |
| const TContainer< T > & | _container |
| Iterated container. More... | |
Template container iterator base class (abstract).
Each container implementation has a matching iterator. This class defines the basic interface for any iterator implementation.
Please note that TIterator::next and TIterator::previous always return the current iterator item and switch to the new item afterwards. This allows iteration loops in this style:
|
inlineexplicit |
|
inlinevirtual |
|
pure virtual |
Check if end of container is reached.
Implemented in TArrayIterator< T >, THashTableIterator< T >, THashTableIterator< TAssociation< TKey, TObject > >, TBTreeIterator< T >, TDLinkedListIterator< T >, TDLinkedListIterator< TAssociation< TKey, TObject > >, and TLinkedListIterator< T >.
|
pure virtual |
Returns the current data and advances the iterator. postfix as in t = c++;.
Implemented in TArrayIterator< T >, THashTableIterator< T >, THashTableIterator< TAssociation< TKey, TObject > >, TBTreeIterator< T >, TDLinkedListIterator< T >, TDLinkedListIterator< TAssociation< TKey, TObject > >, and TLinkedListIterator< T >.
|
pure virtual |
Returns the current data and backup. postfix as in t = c–;.
Implemented in TArrayIterator< T >, THashTableIterator< T >, THashTableIterator< TAssociation< TKey, TObject > >, TBTreeIterator< T >, TDLinkedListIterator< T >, TDLinkedListIterator< TAssociation< TKey, TObject > >, and TLinkedListIterator< T >.
|
pure virtual |
Returns the current data.
Implemented in TArrayIterator< T >, THashTableIterator< T >, THashTableIterator< TAssociation< TKey, TObject > >, TBTreeIterator< T >, TDLinkedListIterator< T >, TDLinkedListIterator< TAssociation< TKey, TObject > >, and TLinkedListIterator< T >.
|
pure virtual |
|
pure virtual |
| T & next | ( | const T & | rItem | ) |
Advance to next equal.
| T & previous | ( | const T & | rItem | ) |
Backup to previous equal.
| const TContainer< T > & container | ( | ) | const |
Return container reference.
| operator int32 | ( | ) | const |
Check if not end.
| T & operator++ | ( | ) |
Advance the iterator to the next item and return it.
| T & operator++ | ( | int | ) |
Return the current item and advance the iterator to the next.
| T & operator+= | ( | int32 | n | ) |
Advance the iterator n places and returns the item.
| T & operator-- | ( | ) |
Decrement the iterator by one and return the item.
| T & operator-- | ( | int | ) |
Return the current item and decrement the iterator by one.
| T & operator-= | ( | int32 | num | ) |
Decrement the iterator n places and returns the item.
| T & operator() | ( | ) | const |
Return current item.
|
protected |
Iterated container.