DABC (Data Acquisition Backbone Core)  2.9.9
Public Member Functions | Protected Attributes
dabc::BuffersQueue Class Reference

Queue of buffers More...

#include <dabc/BuffersQueue.h>

Public Member Functions

 BuffersQueue (unsigned capacity)
 
unsigned Capacity () const
 
void Cleanup ()
 
void Cleanup (Mutex *m)
 
bool Empty () const
 
bool Full () const
 
Buffer Item (unsigned n) const
 Returns reference on the Buffer in the queue, one can create any kind of buffer copies from it. More...
 
bool PopBuffer (Buffer &buf)
 
bool PushBuffer (Buffer &buf)
 
unsigned Size () const
 
BufferSize_t TotalBuffersSize () const
 
virtual ~BuffersQueue ()
 

Protected Attributes

unsigned front
 
unsigned size
 
unsigned tail
 
std::vector< dabc::Buffervect
 

Detailed Description

Queue of buffers

Organizes queue of dabc::Buffer objects in memory. Locking should be done outside, when necessary.

Definition at line 39 of file BuffersQueue.h.

Constructor & Destructor Documentation

◆ BuffersQueue()

dabc::BuffersQueue::BuffersQueue ( unsigned  capacity)
inline

Definition at line 49 of file BuffersQueue.h.

◆ ~BuffersQueue()

virtual dabc::BuffersQueue::~BuffersQueue ( )
inlinevirtual

Definition at line 59 of file BuffersQueue.h.

Member Function Documentation

◆ PushBuffer()

bool dabc::BuffersQueue::PushBuffer ( Buffer buf)
inline

Definition at line 61 of file BuffersQueue.h.

◆ PopBuffer()

bool dabc::BuffersQueue::PopBuffer ( Buffer buf)
inline

Definition at line 70 of file BuffersQueue.h.

◆ Size()

unsigned dabc::BuffersQueue::Size ( ) const
inline

Definition at line 79 of file BuffersQueue.h.

◆ Capacity()

unsigned dabc::BuffersQueue::Capacity ( ) const
inline

Definition at line 81 of file BuffersQueue.h.

◆ Full()

bool dabc::BuffersQueue::Full ( ) const
inline

Definition at line 83 of file BuffersQueue.h.

◆ Empty()

bool dabc::BuffersQueue::Empty ( ) const
inline

Definition at line 85 of file BuffersQueue.h.

◆ Cleanup() [1/2]

void dabc::BuffersQueue::Cleanup ( )

Definition at line 20 of file BuffersQueue.cxx.

◆ Cleanup() [2/2]

void dabc::BuffersQueue::Cleanup ( Mutex m)

Definition at line 29 of file BuffersQueue.cxx.

◆ Item()

Buffer dabc::BuffersQueue::Item ( unsigned  n) const
inline

Returns reference on the Buffer in the queue, one can create any kind of buffer copies from it.

Definition at line 93 of file BuffersQueue.h.

◆ TotalBuffersSize()

BufferSize_t dabc::BuffersQueue::TotalBuffersSize ( ) const
inline

Definition at line 98 of file BuffersQueue.h.

Field Documentation

◆ vect

std::vector<dabc::Buffer> dabc::BuffersQueue::vect
protected

Definition at line 42 of file BuffersQueue.h.

◆ front

unsigned dabc::BuffersQueue::front
protected

Definition at line 44 of file BuffersQueue.h.

◆ tail

unsigned dabc::BuffersQueue::tail
protected

Definition at line 45 of file BuffersQueue.h.

◆ size

unsigned dabc::BuffersQueue::size
protected

Definition at line 46 of file BuffersQueue.h.


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