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

TDeque is a double ended queue. More...

#include <tdeque.h>

+ Inheritance diagram for TDeque< T >:

Public Member Functions

 TDeque ()
 Default constructor. More...
 
 TDeque (const TDeque< T > &)
 Copy constructor. More...
 
 ~TDeque ()
 Destructor. More...
 
TDeque< T > & operator= (const TDeque< T > &)
 Assignment operator. More...
 
bool pushLeft (const T &)
 Push item into queue left. More...
 
bool pushRight (const T &)
 Push item into queue right. More...
 
popLeft ()
 Pop item from queue left. More...
 
popRight ()
 Pop item from queue right. More...
 
const T & peekLeft () const
 Return copy of left item. More...
 
const T & peekRight () const
 Return copy of right item. More...
 
- Public Member Functions inherited from TLinkedList< T >
 TLinkedList ()
 
 TLinkedList (const TLinkedList< T > &)
 List copy constructor. More...
 
 TLinkedList (const TContainer< T > &)
 Construct from container. More...
 
 ~TLinkedList ()
 List destructor. More...
 
TContainer< T > * newInstance () const
 Create a copy of this container. More...
 
TLinkedList< T > & operator= (const TLinkedList< T > &)
 Assignment operator. More...
 
virtual bool add (const T &)
 Create a copy of this container. More...
 
bool append (const T &)
 Same as TLinkedList::add. More...
 
bool prepend (const T &)
 Add item to beginning of the list. More...
 
bool insertAt (int32 index, const T &)
 Insert item at the specified index. More...
 
bool replaceAt (int32 index, const T &)
 Replace item at the specified index. 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)
 Remove item at given index. More...
 
virtual void removeAll ()
 Remove all items from list. More...
 
removeFirst ()
 Remove first item and return copy of the removed item. More...
 
removeLast ()
 Remove last item and return copy of the removed item. More...
 
bool insertAfter (const T &after, const T &data)
 Search for the first item equal to the specified item in the list and inserts the second item immediately after. More...
 
bool insertBefore (const T &before, const T &data)
 Search for the first item equal to the specified item in the list and inserts the second item immediately before. More...
 
T & first () const
 Get first item in list. More...
 
T & last () const
 Get last item in list. More...
 
int32 index (const T &item) const
 Get index of equal item. More...
 
virtual T & at (int32 index) 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...
 
- 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...
 
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::TDeque< T >

TDeque is a double ended queue.

Items can be pushed or popped to the left and right end of the queue.

See also
TContainer, TLinkedList

Constructor & Destructor Documentation

TDeque ( )
inline

Default constructor.

TDeque ( const TDeque< T > &  deque)

Copy constructor.

Parameters
[in]dequeDeque to copy.
~TDeque ( )
inline

Destructor.

Member Function Documentation

TDeque< T > & operator= ( const TDeque< T > &  deque)

Assignment operator.

Parameters
[in]dequeAssign left side (this) to deque.
Returns
Assigned double ended queue.
bool pushLeft ( const T &  obj)

Push item into queue left.

Parameters
[in]objItem to push on left side.
Returns
true, if pushed.
false, if failed
bool pushRight ( const T &  obj)

Push item into queue right.

Parameters
[in]objItem to push on right side.
Returns
true, if pushed.
false, if failed
T popLeft ( )

Pop item from queue left.

Returns
Removed item.
T popRight ( )

Pop item from queue right.

Returns
Removed item
const T & peekLeft ( ) const

Return copy of left item.

Returns
Copy of item on left end of queue
const T & peekRight ( ) const

Return copy of right item.

Returns
Copy of item on right end of queue
Empty

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