Base Module  VST 3.6.6
SDK for developing VST Plug-in
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions
TBTreeSet< T > Class Template Reference

B-Tree set template definition. More...

#include <tbtreeset.h>

+ Inheritance diagram for TBTreeSet< T >:

Public Member Functions

 TBTreeSet (int32 order=3)
 Default constructor. More...
 
 TBTreeSet (const TBTreeSet< T > &set)
 Copy constructor. More...
 
 TBTreeSet (const TContainer< T > &container)
 Construct a set from the elements of the container. More...
 
 ~TBTreeSet ()
 Destructor. More...
 
TBTreeSet< T > & operator= (const TBTreeSet< T > &set)
 Assignment operator. More...
 
TBTreeSet< T > operator- (const TBTreeSet< T > &set) const
 Set difference. More...
 
TBTreeSet< T > operator& (const TBTreeSet< T > &set) const
 Set intersection. More...
 
TBTreeSet< T > operator| (const TBTreeSet< T > &set) const
 Set union. More...
 
bool add (const T &item)
 Add item to set. More...
 
- Public Member Functions inherited from TBTree< T >
 TBTree (int32=3)
 Default tree constructor. More...
 
 TBTree (const TBTree< T > &)
 Tree copy constructor. More...
 
 TBTree (const TContainer< T > &)
 Construct from container. More...
 
 ~TBTree ()
 Tree destructor. More...
 
TContainer< T > * newInstance () const
 
TBTree< T > & operator= (const TBTree< T > &)
 Assignment operator. More...
 
int32 order () const
 Return tree order. More...
 
int32 height () const
 Return tree height. More...
 
virtual bool remove (const T &)
 Remove item from tree. More...
 
virtual bool remove (const TIterator< T > &)
 Remove iterator item. More...
 
virtual bool removeAt (int32)
 Remove at index. More...
 
virtual void removeAll ()
 Remove all items. More...
 
virtual T & lookup (const T &) const
 Find equal item in tree. More...
 
bool lookup (const T &, TBTreeIterator< T > &)
 
bool lookupLowerEqual (const T &, TBTreeIterator< T > &)
 
virtual bool contains (const T &) const
 See if tree contains equal. More...
 
virtual int32 occurrences (const T &) const
 Count occurrences of equal. More...
 
TIterator< T > * lookupIterator (const T &) const
 
TIterator< T > * newIterator () const
 Create tree iterator. More...
 
- Public Member Functions inherited from TContainer< T >
 TContainer ()
 
 TContainer (const TContainer< T > &)
 
virtual ~TContainer ()
 
bool operator== (const TContainer< T > &) const
 
bool operator!= (const TContainer< T > &) const
 
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 T & at (int32 index) const
 Get item at index. 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...
 

Additional Inherited Members

- Protected Member Functions inherited from TContainer< T >
void copy (const TContainer< T > &container)
 Internal copy method. Copies the contents of the specified container into this container. More...
 
- Protected Attributes inherited from TContainer< T >
errorObject
 Object used as return value when methods returning a T& fail. More...
 
int32 _size
 Container size. More...
 

Detailed Description

template<class T>
class Steinberg::TBTreeSet< T >

B-Tree set template definition.

TBTreeSet is a template class for managing unique items in a TBTree. Every item can only be inserted once in the set. For more information about TBTree (which should not be confused with a "binary tree", which is in tbinarytree.h) see the tbtree.h header.

Constructor & Destructor Documentation

TBTreeSet ( int32  order = 3)

Default constructor.

"TBTreeSet" is the default set constructor.

Parameters
orderthe order of the B-Tree is the maximum number of children for each node. Order has to be >= 3.
TBTreeSet ( const TBTreeSet< T > &  set)

Copy constructor.

TBTreeSet ( const TContainer< T > &  container)

Construct a set from the elements of the container.

Constructs a TBTreeSet of order 3 from the specified container by copying all elements of the container into the set. Elements, that appear multiple times in the container will only be once in the set.

Parameters
containerthe source container.
~TBTreeSet ( )
inline

Destructor.

Member Function Documentation

TBTreeSet< T > & operator= ( const TBTreeSet< T > &  set)

Assignment operator.

Assignment operator copies the specified set into this set.

TBTreeSet< T > operator- ( const TBTreeSet< T > &  set) const

Set difference.

"-" difference operator returns a set containing those items, that appear in this set, but that have no equal in the specified set.

Parameters
setthe set that will be subtracted from this
Returns
a new set containing all items, that are in this set, but not in the specified set.
TBTreeSet< T > operator& ( const TBTreeSet< T > &  set) const

Set intersection.

"&" intersection operator returns a set containing only those items, that appear in this set and the input set.

Parameters
setthe set that will be intersected with this
Returns
a new set containing all items, that are in both sets.
TBTreeSet< T > operator| ( const TBTreeSet< T > &  set) const

Set union.

"|" union operator returns a set containing those items, that appear in this set or the input set or both sets.

Parameters
setthe set that will be unified with this.
Returns
a new set containing all items, that are in this set or in the input set or in both sets.
bool add ( const T &  item)
virtual

Add item to set.

"add" adds a new item to this set. If it would be a duplicate, nothing is added.

Parameters
itemthe item to add
Returns
was the item added successfully?

Reimplemented from TBTree< T >.

Empty

Copyright ©2016 Steinberg Media Technologies GmbH. All Rights Reserved.