|
Base Module
VST 3.6.5
SDK for developing VST Plug-in
|
B-Tree dictionary template definition. More...
#include <tbtreedictionary.h>
Inheritance diagram for TBTreeDictionary< K, O >:Public Member Functions | |
| TBTreeDictionary (int32 order=3) | |
| Default constructor. More... | |
| TBTreeDictionary (const TBTreeDictionary< K, O > &dict) | |
| Copy constructor. More... | |
| ~TBTreeDictionary () | |
| Destructor. More... | |
| TBTreeDictionary< K, O > & | operator= (const TBTreeDictionary< K, O > &dict) |
| Assignment operator. More... | |
| bool | addKey (const K &key) |
| Add an association with a key and a default object. More... | |
| bool | addKeyAndObject (const K &key, const O &object) |
| Add an association with a key and an object. More... | |
| bool | addAssoc (const TAssociation< K, O > &assoc) |
| Add the passed association. More... | |
| bool | replace (const K &key, const O &object) |
| Replace the object associated with key with the passed object. More... | |
| bool | removeKey (const K &key) |
| Remove the association with the key. More... | |
| const K & | lookupKey (const K &key) const |
| Returns an equal key contained in the dictionary. More... | |
| const O & | lookupObject (const K &key) const |
| Returns the object associated with key. More... | |
| bool | containsKey (const K &key) const |
| Returns if the key is contained in the dictionary. More... | |
| const TAssociation< K, O > & | lookupAssoc (const K &key) const |
| Lookup an association, that has the passed key. More... | |
Public Member Functions inherited from TBTree< TAssociation< K, O > > | |
| TBTree (int32=3) | |
| Default tree constructor. More... | |
| TBTree (const TBTree< TAssociation< K, O > > &) | |
| Tree copy constructor. More... | |
| TBTree (const TContainer< TAssociation< K, O > > &) | |
| Construct from container. More... | |
| ~TBTree () | |
| Tree destructor. More... | |
| TContainer< TAssociation< K, O > > * | newInstance () const |
| TBTree< TAssociation< K, O > > & | operator= (const TBTree< TAssociation< K, O > > &) |
| Assignment operator. More... | |
| int32 | order () const |
| Return tree order. More... | |
| int32 | height () const |
| Return tree height. More... | |
| virtual bool | add (const TAssociation< K, O > &) |
| Add item to tree. More... | |
| virtual bool | remove (const TAssociation< K, O > &) |
| Remove item from tree. More... | |
| virtual bool | remove (const TIterator< TAssociation< K, O > > &) |
| Remove iterator item. More... | |
| virtual bool | removeAt (int32) |
| Remove at index. More... | |
| virtual void | removeAll () |
| Remove all items. More... | |
| virtual TAssociation< K, O > & | lookup (const TAssociation< K, O > &) const |
| Find equal item in tree. More... | |
| bool | lookup (const TAssociation< K, O > &, TBTreeIterator< TAssociation< K, O > > &) |
| bool | lookupLowerEqual (const TAssociation< K, O > &, TBTreeIterator< TAssociation< K, O > > &) |
| virtual bool | contains (const TAssociation< K, O > &) const |
| See if tree contains equal. More... | |
| virtual int32 | occurrences (const TAssociation< K, O > &) const |
| Count occurrences of equal. More... | |
| TIterator< TAssociation< K, O > > * | lookupIterator (const TAssociation< K, O > &) const |
| TIterator< TAssociation< K, O > > * | newIterator () const |
| Create tree iterator. More... | |
Public Member Functions inherited from TContainer< TAssociation< K, O > > | |
| TContainer () | |
| TContainer (const TContainer< TAssociation< K, O > > &) | |
| virtual | ~TContainer () |
| bool | operator== (const TContainer< TAssociation< K, O > > &) const |
| bool | operator!= (const TContainer< TAssociation< K, O > > &) const |
| TAssociation< K, O > & | 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 TAssociation< K, O > & | at (int32 index) const |
| Get item at index. More... | |
| TContainer< TAssociation< K, O > > * | lookupAll (const TAssociation< K, O > &item) const |
| Allocate and returns a container with all items in this container equal to the specified item. More... | |
| bool | addAllFrom (const TContainer< TAssociation< K, O > > &container) |
| Adds all the items from the specified container to this container. More... | |
| bool | addNewFrom (const TContainer< TAssociation< K, O > > &container) |
| Adds the items from the specified container to this container that are not in this container already. More... | |
| TAssociation< K, O > & | error () const |
| Access error object. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from TContainer< TAssociation< K, O > > | |
| void | copy (const TContainer< TAssociation< K, O > > &container) |
| Internal copy method. Copies the contents of the specified container into this container. More... | |
Protected Attributes inherited from TContainer< TAssociation< K, O > > | |
| TAssociation< K, O > | errorObject |
| Object used as return value when methods returning a T& fail. More... | |
| int32 | _size |
| Container size. More... | |
B-Tree dictionary template definition.
TBTreeDictionary is a template class for managing (key, object) pairs in a TBTree. The (key, object) pairs are stored as TAssociation objects. Every key can only be used once in the dictionary. For more information about TBTree (which should not be confused with a "binary tree", which is in tbinarytree.h) see the tbtree.h header.
| TBTreeDictionary | ( | int32 | order = 3 | ) |
Default constructor.
"TBTreeDictionary" is the default dictionary constructor.
| order | the order of the B-Tree is the maximum number of children for each node. Order has to be >= 3. |
| TBTreeDictionary | ( | const TBTreeDictionary< K, O > & | dict | ) |
Copy constructor.
|
inline |
Destructor.
| TBTreeDictionary< K, O > & operator= | ( | const TBTreeDictionary< K, O > & | dict | ) |
Assignment operator.
Assignment operator "=" copies the specified dictionary into this dictionary.
| bool addKey | ( | const K & | key | ) |
Add an association with a key and a default object.
"addKey" adds an association with the specified key to the dictionary. If the key is already contained in the dictionary nothing is added.
| bool addKeyAndObject | ( | const K & | key, |
| const O & | obj | ||
| ) |
Add an association with a key and an object.
"addKeyAndObject" adds an association with the specified key and the specified object to the dictionary. If the key is already contained in the dictionary nothing is added.
| bool addAssoc | ( | const TAssociation< K, O > & | assoc | ) |
Add the passed association.
"addAssoc" adds the specified association to the dictionary. If the key of the association is already contained in the dictionary nothing is added.
| bool replace | ( | const K & | key, |
| const O & | obj | ||
| ) |
Replace the object associated with key with the passed object.
"replace" finds the first occurrence of an association containing the specified key and replaces the object value. If the key is not contained in the dictionary nothing is done.
| bool removeKey | ( | const K & | key | ) |
Remove the association with the key.
"removeKey" removes the first association containing the specified key from the dictionary.
| const K & lookupKey | ( | const K & | key | ) | const |
Returns an equal key contained in the dictionary.
| const O & lookupObject | ( | const K & | key | ) | const |
Returns the object associated with key.
| bool containsKey | ( | const K & | key | ) | const |
Returns if the key is contained in the dictionary.
| const TAssociation< K, O > & lookupAssoc | ( | const K & | key | ) | const |
Lookup an association, that has the passed key.