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
TOrderedArray< T > Class Template Reference

Ordered Array container template. More...

#include <tarray.h>

+ Inheritance diagram for TOrderedArray< T >:

Public Member Functions

 TOrderedArray (int32 initSize=0, int32 delta=TArrayBase< T >::kDefaultDelta)
 
 TOrderedArray (const TOrderedArray< T > &a)
 
 TOrderedArray (const TContainer< T > &c)
 
virtual TContainer< T > * newInstance () const
 Create a copy of this container. More...
 
virtual int32 index (const T &t) const
 Get index of item. More...
 
virtual int32 shouldGo (const T &t) const
 Get index for potential item. More...
 
- Public Member Functions inherited from TArrayBase< T >
 TArrayBase (int32 initSize=0, int32 delta=kDefaultDelta)
 
 ~TArrayBase ()
 
TArrayBase< T > & operator= (const TArrayBase< T > &)
 
void delta (int32 d)
 Set delta value. More...
 
int32 delta () const
 Get delta value. More...
 
void enableExponentialGroth (bool state)
 Instead of using delta, always double the array size. More...
 
bool hasExponentialGroth () const
 
bool resize (int32 newSize)
 Resize the array. More...
 
virtual int32 total () const
 Return number of items. More...
 
virtual bool isEmpty () const
 Is container empty? More...
 
virtual bool add (const T &)
 Add item to container. More...
 
virtual bool remove (const T &)
 Remove equal item. More...
 
virtual bool remove (const TIterator< T > &)
 Remove item at current iterator position. More...
 
virtual bool removeAt (int32 index)
 Remove item at given index. More...
 
virtual void removeAll ()
 Remove all items from list. More...
 
bool removeRange (int32 from, int32 to)
 Remove items from index 'from' to index 'to'. More...
 
virtual T & at (int32) 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
 Create container iterator instance. More...
 
T & first () const
 
T & last () const
 
- 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 size () const
 Returns the container size. 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

- Static Public Attributes inherited from TArrayBase< T >
static const int32 kDefaultDelta = 10
 
static const int32 kExponentialDelta = -1
 
- Protected Member Functions inherited from TArrayBase< T >
int32 indexSorted (const T &) const
 
int32 indexUnsorted (const T &) const
 
int32 shouldGoSorted (const T &) const
 Get index for potential item. More...
 
int32 shouldGoUnsorted (const T &) const
 Get index for potential item. More...
 
void doQuickSort ()
 
bool doInsertAt (int32 index, const T &)
 Insert item at index. More...
 
- 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...
 
- Static Protected Member Functions inherited from TArrayBase< T >
static int cmpData (const void *, const void *)
 Quick sort compare function. More...
 
- Protected Attributes inherited from TArrayBase< T >
int32 _delta
 Delta value. More...
 
int32 _total
 Number of items. More...
 
T * _entries
 Array of "T" pointers. 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::TOrderedArray< T >

Ordered Array container template.

This class always adds items sorted.

See also
TArray, TSortableArray, TArrayIterator

Constructor & Destructor Documentation

TOrderedArray ( int32  initSize = 0,
int32  delta = TArrayBase<T>::kDefaultDelta 
)
inline
TOrderedArray ( const TOrderedArray< T > &  a)
inline
TOrderedArray ( const TContainer< T > &  c)
inline

Member Function Documentation

virtual TContainer<T>* newInstance ( ) const
inlinevirtual

Create a copy of this container.

Implements TContainer< T >.

virtual int32 index ( const T &  t) const
inlinevirtual

Get index of item.

Implements TArrayBase< T >.

virtual int32 shouldGo ( const T &  t) const
inlinevirtual

Get index for potential item.

Implements TArrayBase< T >.

Empty

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