stream  0.10.0
stream analysis framework
Data Structures | Public Member Functions | Protected Attributes | Friends
base::Queue< T, canexpand > Class Template Reference

queue class More...

#include <base/Queue.h>

Inheritance diagram for base::Queue< T, canexpand >:
base::RecordsQueue< GlobalMarker, false > base::RecordsQueue< base::SyncMarker, false > base::RecordsQueue< base::Buffer, false > base::RecordsQueue< LocalTimeMarker, false >

Data Structures

class  Iterator
 iterator over queue elements More...
 

Public Member Functions

 Queue ()
 default constructor
 
 Queue (unsigned _capacity)
 constructor with capacity
 
virtual ~Queue ()
 destructor
 
void Init (unsigned _capacity)
 init queue
 
void Allocate (unsigned _capacity)
 allocate queue
 
virtual void CopyTo (T *tgt)
 Method can be used to copy content of the queue into externally allocated array.
 
bool Expand (unsigned newcapacity=0)
 increase capacity of queue without lost of content
 
bool Remove (T value)
 remove value from queue
 
bool erase_item (unsigned indx)
 erase item with index
 
bool MakePlaceForNext ()
 create place for next entry
 
void push (const T &val)
 push value
 
T * PushEmpty ()
 push empty, return pointer on place
 
void pop ()
 pop element
 
pop_front ()
 pop front element
 
T & front () const
 access front element
 
T & item (unsigned indx) const
 access arbitrary item
 
T * item_ptr (unsigned indx) const
 provide item pointer
 
T & back () const
 access back element
 
void clear ()
 clear queue
 
unsigned capacity () const
 return queue capacity
 
unsigned size () const
 return queue size
 
bool full () const
 is queue full
 
bool empty () const
 is queue empty
 
Iterator begin ()
 begin iterator
 
Iterator end ()
 end iterator
 

Protected Attributes

T * fQueue
 queue
 
T * fBorder
 maximum pointer value
 
unsigned fCapacity
 capacity
 
unsigned fSize
 size
 
T * fHead
 head
 
T * fTail
 tail
 
unsigned fInitSize
 original size of the queue, restored then clear() method is called
 

Friends

class Queue< T, canexpand >::Iterator
 

Detailed Description

template<class T, bool canexpand = false>
class base::Queue< T, canexpand >

queue class


The documentation for this class was generated from the following file: