|
Base Module
VST 3.6.5
SDK for developing VST Plug-in
|
Template container base class (abstract). More...
#include <tcontainer.h>
Inheritance diagram for TContainer< T >:Public Member Functions | |
| TContainer () | |
| TContainer (const TContainer< T > &) | |
| virtual | ~TContainer () |
| bool | operator== (const TContainer< T > &) const |
| bool | operator!= (const TContainer< T > &) const |
| virtual TContainer< T > * | newInstance () const =0 |
| Create a copy of this container. More... | |
| T & | operator[] (int32) const |
| "[]" indexing operator returns the item at the specified index. More... | |
| virtual int32 | total () const |
| Return number of items. More... | |
| virtual bool | isEmpty () const |
| Is container empty? More... | |
| virtual int32 | size () const |
| Returns the container size. More... | |
| virtual bool | add (const T &item)=0 |
| Add item to container. More... | |
| virtual bool | remove (const T &item)=0 |
| Remove equal item. More... | |
| virtual bool | remove (const TIterator< T > &)=0 |
| Remove item at current iterator position. More... | |
| virtual bool | removeAt (int32 index)=0 |
| Remove item at given index. More... | |
| virtual void | removeAll ()=0 |
| Remove all items from list. More... | |
| virtual T & | at (int32 index) const |
| Get item at index. More... | |
| virtual T & | lookup (const T &item) const |
| Searches for the item equal to the specified item in the list and returns the first occurrence. More... | |
| virtual bool | contains (const T &item) const |
| See if container has equal item. More... | |
| virtual int32 | occurrences (const T &item) const |
| Count occurrences of equal items. More... | |
| virtual TIterator< T > * | newIterator () const =0 |
| Create container iterator instance. More... | |
| TContainer< T > * | lookupAll (const T &item) const |
| Allocate and returns a container with all items in this container equal to the specified item. More... | |
| bool | addAllFrom (const TContainer< T > &container) |
| Adds all the items from the specified container to this container. More... | |
| bool | addNewFrom (const TContainer< T > &container) |
| Adds the items from the specified container to this container that are not in this container already. More... | |
| T & | error () const |
| Access error object. More... | |
Protected Member Functions | |
| void | copy (const TContainer< T > &container) |
| Internal copy method. Copies the contents of the specified container into this container. More... | |
Protected Attributes | |
| T | errorObject |
| Object used as return value when methods returning a T& fail. More... | |
| int32 | _size |
| Container size. More... | |
Template container base class (abstract).
This class defines the basic interface for any container implementation in this module.
Please note that:
|
inline |
| TContainer | ( | const TContainer< T > & | ) |
|
virtual |
| bool operator== | ( | const TContainer< T > & | other | ) | const |
| bool operator!= | ( | const TContainer< T > & | other | ) | const |
|
pure virtual |
Create a copy of this container.
Implemented in TSortableArray< T >, TOrderedArray< T >, TArray< T >, TArray< Rect >, TArray< TAssociation< K, O > >, TArray< Block >, TArray< void * >, TArray< FObjectBlock * >, THashTable< T >, THashTable< SorterByCID >, THashTable< TAssociation< TKey, TObject > >, THashTable< SorterByName >, TBinaryTree< T >, TBTree< T >, TBTree< TAssociation< K, O > >, TDLinkedList< T >, TDLinkedList< TAssociation< TKey, TObject > >, and TLinkedList< T >.
|
inline |
"[]" indexing operator returns the item at the specified index.
|
virtual |
Return number of items.
Reimplemented in THashTable< T >, THashTable< SorterByCID >, THashTable< TAssociation< TKey, TObject > >, THashTable< SorterByName >, TArrayBase< T >, TArrayBase< Rect >, TArrayBase< TAssociation< K, O > >, TArrayBase< Block >, TArrayBase< void * >, and TArrayBase< FObjectBlock * >.
|
virtual |
Is container empty?
Reimplemented in THashTable< T >, THashTable< SorterByCID >, THashTable< TAssociation< TKey, TObject > >, THashTable< SorterByName >, TArrayBase< T >, TArrayBase< Rect >, TArrayBase< TAssociation< K, O > >, TArrayBase< Block >, TArrayBase< void * >, and TArrayBase< FObjectBlock * >.
|
virtual |
Returns the container size.
The size of a container can be larger than the number of items it contains. For example the TArray implementation returns the number of items that fit into the allocated memory and not the number of actually inserted items
|
pure virtual |
Add item to container.
Implemented in THashTable< T >, THashTable< SorterByCID >, THashTable< TAssociation< TKey, TObject > >, THashTable< SorterByName >, TBTree< T >, TBTree< TAssociation< K, O > >, TArrayBase< T >, TArrayBase< Rect >, TArrayBase< TAssociation< K, O > >, TArrayBase< Block >, TArrayBase< void * >, TArrayBase< FObjectBlock * >, TBinaryTree< T >, THashSet< T >, TBag< T >, TBTreeSet< T >, TDLinkedList< T >, TDLinkedList< TAssociation< TKey, TObject > >, and TLinkedList< T >.
|
pure virtual |
Remove equal item.
Implemented in THashTable< T >, THashTable< SorterByCID >, THashTable< TAssociation< TKey, TObject > >, THashTable< SorterByName >, TBTree< T >, TBTree< TAssociation< K, O > >, TArrayBase< T >, TArrayBase< Rect >, TArrayBase< TAssociation< K, O > >, TArrayBase< Block >, TArrayBase< void * >, TArrayBase< FObjectBlock * >, TBinaryTree< T >, TDLinkedList< T >, TDLinkedList< TAssociation< TKey, TObject > >, TBag< T >, and TLinkedList< T >.
|
pure virtual |
Remove item at current iterator position.
Implemented in THashTable< T >, THashTable< SorterByCID >, THashTable< TAssociation< TKey, TObject > >, THashTable< SorterByName >, TBTree< T >, TBTree< TAssociation< K, O > >, TArrayBase< T >, TArrayBase< Rect >, TArrayBase< TAssociation< K, O > >, TArrayBase< Block >, TArrayBase< void * >, TArrayBase< FObjectBlock * >, TBinaryTree< T >, TDLinkedList< T >, TDLinkedList< TAssociation< TKey, TObject > >, and TLinkedList< T >.
|
pure virtual |
Remove item at given index.
Implemented in THashTable< T >, THashTable< SorterByCID >, THashTable< TAssociation< TKey, TObject > >, THashTable< SorterByName >, TBTree< T >, TBTree< TAssociation< K, O > >, TArrayBase< T >, TArrayBase< Rect >, TArrayBase< TAssociation< K, O > >, TArrayBase< Block >, TArrayBase< void * >, TArrayBase< FObjectBlock * >, TBinaryTree< T >, TDLinkedList< T >, TDLinkedList< TAssociation< TKey, TObject > >, and TLinkedList< T >.
|
pure virtual |
Remove all items from list.
Implemented in THashTable< T >, THashTable< SorterByCID >, THashTable< TAssociation< TKey, TObject > >, THashTable< SorterByName >, TBTree< T >, TBTree< TAssociation< K, O > >, TArrayBase< T >, TArrayBase< Rect >, TArrayBase< TAssociation< K, O > >, TArrayBase< Block >, TArrayBase< void * >, TArrayBase< FObjectBlock * >, TBinaryTree< T >, TDLinkedList< T >, TDLinkedList< TAssociation< TKey, TObject > >, TBag< T >, and TLinkedList< T >.
|
virtual |
Get item at index.
Reimplemented in TLinkedList< T >, TDLinkedList< T >, TDLinkedList< TAssociation< TKey, TObject > >, TArrayBase< T >, TArrayBase< Rect >, TArrayBase< TAssociation< K, O > >, TArrayBase< Block >, TArrayBase< void * >, and TArrayBase< FObjectBlock * >.
|
virtual |
Searches for the item equal to the specified item in the list and returns the first occurrence.
Reimplemented in TLinkedList< T >, TDLinkedList< T >, TDLinkedList< TAssociation< TKey, TObject > >, THashTable< T >, THashTable< SorterByCID >, THashTable< TAssociation< TKey, TObject > >, THashTable< SorterByName >, TArrayBase< T >, TArrayBase< Rect >, TArrayBase< TAssociation< K, O > >, TArrayBase< Block >, TArrayBase< void * >, TArrayBase< FObjectBlock * >, TBinaryTree< T >, TBTree< T >, and TBTree< TAssociation< K, O > >.
|
virtual |
See if container has equal item.
Reimplemented in TLinkedList< T >, TDLinkedList< T >, TDLinkedList< TAssociation< TKey, TObject > >, THashTable< T >, THashTable< SorterByCID >, THashTable< TAssociation< TKey, TObject > >, THashTable< SorterByName >, TBTree< T >, TBTree< TAssociation< K, O > >, TArrayBase< T >, TArrayBase< Rect >, TArrayBase< TAssociation< K, O > >, TArrayBase< Block >, TArrayBase< void * >, TArrayBase< FObjectBlock * >, and TBinaryTree< T >.
|
virtual |
Count occurrences of equal items.
Reimplemented in TLinkedList< T >, TDLinkedList< T >, TDLinkedList< TAssociation< TKey, TObject > >, THashTable< T >, THashTable< SorterByCID >, THashTable< TAssociation< TKey, TObject > >, THashTable< SorterByName >, TBTree< T >, TBTree< TAssociation< K, O > >, TArrayBase< T >, TArrayBase< Rect >, TArrayBase< TAssociation< K, O > >, TArrayBase< Block >, TArrayBase< void * >, TArrayBase< FObjectBlock * >, and TBinaryTree< T >.
|
pure virtual |
Create container iterator instance.
Implemented in TLinkedList< T >, TDLinkedList< T >, TDLinkedList< TAssociation< TKey, TObject > >, TBTree< T >, THashTable< T >, TBTree< TAssociation< K, O > >, THashTable< SorterByCID >, THashTable< TAssociation< TKey, TObject > >, THashTable< SorterByName >, TArrayBase< T >, TArrayBase< Rect >, TArrayBase< TAssociation< K, O > >, TArrayBase< Block >, TArrayBase< void * >, TArrayBase< FObjectBlock * >, and TBinaryTree< T >.
| TContainer< T > * lookupAll | ( | const T & | item | ) | const |
Allocate and returns a container with all items in this container equal to the specified item.
| bool addAllFrom | ( | const TContainer< T > & | container | ) |
Adds all the items from the specified container to this container.
| bool addNewFrom | ( | const TContainer< T > & | container | ) |
Adds the items from the specified container to this container that are not in this container already.
|
inline |
Access error object.
|
protected |
Internal copy method. Copies the contents of the specified container into this container.
|
protected |
Object used as return value when methods returning a T& fail.
|
protected |
Container size.