UT_RingBufferRaw Class Reference

#include <UT_RingBufferRaw.h>

List of all members.

Public Member Functions

 UT_RingBufferRaw ()
 UT_RingBufferRaw (int capacity)
 ~UT_RingBufferRaw ()
void insert (int id, void *data)
void remove (int id)
int push (void *data)
void pop ()
 Pop a single element from the start of the buffer.
void pop (int number)
 Pop the next "number" elements from the buffer.
int entries () const
int peakUsage () const
void * operator[] (int id) const
void * operator() (int id) const
void * front () const
int frontId () const
void * back () const
int backId () const
void display () const


Detailed Description

A UT_RingBufferRaw is an indexable queue. The buffer uses indices that represent the insertion order of items in the buffer. The buffer may contain "holes", which have no associated data but still have an order number.

Definition at line 28 of file UT_RingBufferRaw.h.


Constructor & Destructor Documentation

UT_RingBufferRaw::UT_RingBufferRaw (  ) 

UT_RingBufferRaw::UT_RingBufferRaw ( int  capacity  ) 

UT_RingBufferRaw::~UT_RingBufferRaw (  ) 


Member Function Documentation

void* UT_RingBufferRaw::back (  )  const [inline]

Definition at line 60 of file UT_RingBufferRaw.h.

int UT_RingBufferRaw::backId (  )  const [inline]

Definition at line 61 of file UT_RingBufferRaw.h.

void UT_RingBufferRaw::display (  )  const

int UT_RingBufferRaw::entries ( void   )  const [inline]

Definition at line 50 of file UT_RingBufferRaw.h.

void* UT_RingBufferRaw::front (  )  const [inline]

Definition at line 58 of file UT_RingBufferRaw.h.

int UT_RingBufferRaw::frontId (  )  const [inline]

Definition at line 59 of file UT_RingBufferRaw.h.

void UT_RingBufferRaw::insert ( int  id,
void *  data 
)

Null-padded insertion. If the id of the incoming object is greater than the next order number that would be assigned by push(), holes are created in the buffer.

void* UT_RingBufferRaw::operator() ( int  id  )  const

void* UT_RingBufferRaw::operator[] ( int  id  )  const

operator [] is the bounds checked version of the operator. The id is the order number of the object being indexed.

int UT_RingBufferRaw::peakUsage (  )  const [inline]

Definition at line 51 of file UT_RingBufferRaw.h.

void UT_RingBufferRaw::pop ( int  number  ) 

Pop the next "number" elements from the buffer.

void UT_RingBufferRaw::pop (  ) 

Pop a single element from the start of the buffer.

int UT_RingBufferRaw::push ( void *  data  ) 

Insert the data into the buffer, and return the order number that it is assigned.

void UT_RingBufferRaw::remove ( int  id  ) 


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

Generated on Fri May 25 00:10:52 2012 for HDK by  doxygen 1.5.9