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

BTree template definition. More...

#include <tbtree.h>

+ Inheritance diagram for TBTree< T >:

Public Member Functions

 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 add (const T &)
 Add item to tree. 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::TBTree< T >

BTree template definition.

Template definition for a BTree

Constructor & Destructor Documentation

TBTree ( int32  ordr = 3)

Default tree constructor.

TBTree ( const TBTree< T > &  tree)

Tree copy constructor.

TBTree ( const TContainer< T > &  cont)

Construct from container.

~TBTree ( )

Tree destructor.

Member Function Documentation

TContainer< T > * newInstance ( ) const
virtual

Implements TContainer< T >.

TBTree< T > & operator= ( const TBTree< T > &  tree)

Assignment operator.

int32 order ( ) const

Return tree order.

int32 height ( ) const

Return tree height.

bool add ( const T &  rObj)
virtual

Add item to tree.

Implements TContainer< T >.

Reimplemented in TBTreeSet< T >.

bool remove ( const T &  rObj)
virtual

Remove item from tree.

Implements TContainer< T >.

bool remove ( const TIterator< T > &  iter)
virtual

Remove iterator item.

Implements TContainer< T >.

bool removeAt ( int32  idx)
virtual

Remove at index.

Implements TContainer< T >.

void removeAll ( )
virtual

Remove all items.

Implements TContainer< T >.

T & lookup ( const T &  rObj) const
virtual

Find equal item in tree.

Reimplemented from TContainer< T >.

bool lookup ( const T &  rObj,
TBTreeIterator< T > &  iter 
)
bool lookupLowerEqual ( const T &  rObj,
TBTreeIterator< T > &  iter 
)
bool contains ( const T &  rObj) const
virtual

See if tree contains equal.

Reimplemented from TContainer< T >.

int32 occurrences ( const T &  rObj) const
virtual

Count occurrences of equal.

Reimplemented from TContainer< T >.

TIterator< T > * lookupIterator ( const T &  rObj) const
TIterator< T > * newIterator ( ) const
virtual

Create tree iterator.

Implements TContainer< T >.

Empty

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