TBTreeSet< T > Class Template Reference
[Template Containers]

B-Tree set template definition. More...

#include <tbtreeset.h>

Inheritance diagram for TBTreeSet< T >:
Inheritance graph
[legend]

Public Member Functions

 TBTreeSet (int32 order=3)
 Default constructor.
 TBTreeSet (const TBTreeSet< T > &set)
 Copy constructor.
 TBTreeSet (const TContainer< T > &container)
 Construct a set from the elements of the container.
 ~TBTreeSet ()
 Destructor.
TBTreeSet< T > & operator= (const TBTreeSet< T > &set)
 Assignment operator.
TBTreeSet< T > operator- (const TBTreeSet< T > &set) const
 Set difference.
TBTreeSet< T > operator& (const TBTreeSet< T > &set) const
 Set intersection.
TBTreeSet< T > operator| (const TBTreeSet< T > &set) const
 Set union.
bool add (const T &item)
 Add item to set.

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  )  [inline]

Default constructor.

"TBTreeSet" is the default set constructor.

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

Copy constructor.

TBTreeSet ( const TContainer< T > &  container  )  [inline]

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:
container the source container.
~TBTreeSet (  )  [inline]

Destructor.


Member Function Documentation

TBTreeSet< T > & operator= ( const TBTreeSet< T > &  set  )  [inline]

Assignment operator.

Assignment operator copies the specified set into this set.

Reimplemented from TBTree< T >.

TBTreeSet< T > operator- ( const TBTreeSet< T > &  set  )  const [inline]

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:
set the 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 [inline]

Set intersection.

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

Parameters:
set the 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 [inline]

Set union.

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

Parameters:
set the 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  )  [inline, virtual]

Add item to set.

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

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

Reimplemented from TBTree< T >.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
Empty

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