sipxportlib  Version 3.3
Public Types | List of all members
CircularBuffer Class Reference

#include <CircularBuffer.h>

Inheritance diagram for CircularBuffer:
Inheritance graph
[legend]

Public Types

typedef char ElementType
 

Public Member Functions

Creators
 CircularBuffer (unsigned long capacity=0)
 Default constructor. More...
 
 ~CircularBuffer ()
 
Manipulators
void initialize (unsigned long capacity)
 
bool write (const ElementType *buffer, unsigned long bufferSize, unsigned long *newSize=0, unsigned long *previousSize=0)
 
bool fill (ElementType value, unsigned long count, unsigned long *newSize=0, unsigned long *previousSize=0)
 
unsigned long extract (ElementType *buffer, unsigned long bufferSize)
 
Accessors
unsigned long getSize ()
 

Member Typedef Documentation

typedef char ElementType

Constructor & Destructor Documentation

CircularBuffer ( unsigned long  capacity = 0)

Default constructor.

Construct circular buffer of given size in char

Parameters
[in]capacity- size of buffer in char

Member Function Documentation

void initialize ( unsigned long  capacity)
bool write ( const ElementType buffer,
unsigned long  bufferSize,
unsigned long *  newSize = 0,
unsigned long *  previousSize = 0 
)
bool fill ( ElementType  value,
unsigned long  count,
unsigned long *  newSize = 0,
unsigned long *  previousSize = 0 
)
unsigned long extract ( ElementType buffer,
unsigned long  bufferSize 
)
unsigned long getSize ( )