Public Member Functions | Protected Member Functions

zeus::TQueueCB< T > Class Template Reference

#include <QueueCB.hpp>

Inheritance diagram for zeus::TQueueCB< T >:
zeus::IQueue< T > zeus::IValueType

List of all members.

Public Member Functions

 TQueueCB (Int iSize=20, EArrayCopyMode eCopyMode=etDeepCopy)
 TQueueCB (const T &rEmptyItem, Int iSize, EArrayCopyMode eCopyMode)
 TQueueCB (const TQueueCB< T > &rQueue)
virtual ~TQueueCB ()
bool append (const T &tData)
void assign (const TQueueCB< T > &rQueue)
EArrayCopyMode getCopyMode () const
Int getReaderIndex () const
Int getWriterIndex () const
T & remove (bool *pError=NULL)
virtual void MQUALIFIER appendItem (const T &tData)
virtual void MQUALIFIER copyToQueue (IQueue< T > &rQueue) const
virtual void MQUALIFIER copyToList (IList< T > &rList) const
virtual T MQUALIFIER removeItem ()
virtual Int MQUALIFIER getCount () const
virtual void MQUALIFIER flush ()
virtual bool MQUALIFIER isEmpty () const
virtual T &MQUALIFIER peekItem ()
virtual const T &MQUALIFIER peekItemConst () const
TQueueCB< T > & operator= (const TQueueCB< T > &rQueue)
TQueueCB< T > & operator= (const IQueue< T > &rQueue)

Protected Member Functions

T & getItem (Int iIndex)
const T & getItem (Int iIndex) const

Detailed Description

template<class T>
class zeus::TQueueCB< T >

This class implements the abstract data type FIFO queue using a circular buffer as storage


Constructor & Destructor Documentation

template<class T >
zeus::TQueueCB< T >::TQueueCB ( Int  iSize = 20,
EArrayCopyMode  eCopyMode = etDeepCopy 
)

Creates a circular buffer queue.

Parameters:
iSize: Size of the buffer
eCopyMode: Copy mode of the elements
template<class T >
zeus::TQueueCB< T >::TQueueCB ( const T &  rEmptyItem,
Int  iSize,
EArrayCopyMode  eCopyMode 
)

Creates a circular buffer queue.

Parameters:
rEmptyItem: Empty item
iSize: Size of the buffer
eCopyMode: Copy mode of the elements
template<class T >
zeus::TQueueCB< T >::TQueueCB ( const TQueueCB< T > &  rQueue ) [inline]

Copy constructor

Parameters:
rQueue: Source queue
template<class T >
zeus::TQueueCB< T >::~TQueueCB (  ) [inline, virtual]

Destroys the queue


Member Function Documentation

template<class T >
bool zeus::TQueueCB< T >::append ( const T &  tData )

Appends an item to the buffer

Parameters:
tData: Item to add
Return values:
true: item added
false,:queue is full
template<class T >
void MQUALIFIER zeus::TQueueCB< T >::appendItem ( const T &  tData ) [inline, virtual]
See also:
IQueue::appendItem

Implements zeus::IQueue< T >.

template<class T >
void zeus::TQueueCB< T >::assign ( const TQueueCB< T > &  rQueue )

assigns the buffer of an other queue

template<class T >
void MQUALIFIER zeus::TQueueCB< T >::copyToList ( IList< T > &  rList ) const [inline, virtual]
See also:
IQueue::copyToList

Implements zeus::IQueue< T >.

template<class T >
void MQUALIFIER zeus::TQueueCB< T >::copyToQueue ( IQueue< T > &  rQueue ) const [inline, virtual]
See also:
IQueue::copyToQueue

Implements zeus::IQueue< T >.

template<class T >
void MQUALIFIER zeus::TQueueCB< T >::flush (  ) [inline, virtual]
See also:
IQueue::flush

Implements zeus::IQueue< T >.

template<class T >
EArrayCopyMode zeus::TQueueCB< T >::getCopyMode (  ) const [inline]

Returns the copy mode of the queue

template<class T >
Int MQUALIFIER zeus::TQueueCB< T >::getCount (  ) const [inline, virtual]
See also:
IQueue::getCount

Implements zeus::IQueue< T >.

template<class T >
T & zeus::TQueueCB< T >::getItem ( Int  iIndex ) [inline, protected]

This returns the indexed value of the circular queue. Used internaly for coping queues.

Returns:
Element: indexed value
template<class T >
const T & zeus::TQueueCB< T >::getItem ( Int  iIndex ) const [inline, protected]

This returns the indexed value of the circular queue. Used internaly for coping queues.

Returns:
Element: indexed value
template<class T >
Int zeus::TQueueCB< T >::getReaderIndex (  ) const [inline]

returns the writer index

template<class T >
Int zeus::TQueueCB< T >::getWriterIndex (  ) const [inline]

returns the writer index

template<class T >
bool MQUALIFIER zeus::TQueueCB< T >::isEmpty (  ) const [inline, virtual]
See also:
IQueue::isEmpty

Implements zeus::IQueue< T >.

template<class T >
TQueueCB< T > & zeus::TQueueCB< T >::operator= ( const IQueue< T > &  rQueue ) [inline]

Copies a queue into an other queue

Parameters:
rQueue,:Queue to copy from
template<class T >
TQueueCB< T > & zeus::TQueueCB< T >::operator= ( const TQueueCB< T > &  rQueue ) [inline]

Copies a queue into an other queue

Parameters:
rQueue,:Queue to copy from
template<class T >
T &MQUALIFIER zeus::TQueueCB< T >::peekItem (  ) [inline, virtual]
See also:
IQueue::peekItem

Implements zeus::IQueue< T >.

template<class T >
const T &MQUALIFIER zeus::TQueueCB< T >::peekItemConst (  ) const [inline, virtual]
template<class T >
T & zeus::TQueueCB< T >::remove ( bool *  pError = NULL )

Appends an item to the buffer

Parameters:
pError: Optional error return
Returns:
removed item
template<class T >
T MQUALIFIER zeus::TQueueCB< T >::removeItem (  ) [inline, virtual]
See also:
IQueue::removeItem

Implements zeus::IQueue< T >.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Sun Jan 22 2012 15:28:40