Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

CRingBufferWriter Class Reference

#include <RingBuffer.h>

List of all members.

Public Member Functions


Constructor & Destructor Documentation

CRingBufferWriter::CRingBufferWriter CRingBuffer ring  ) 
 

Constructor for writer; attaches to ring automatically.

There is no default constructor.

CRingBufferWriter::~CRingBufferWriter  ) 
 

Destructor; detaches from ring automatically.


Member Function Documentation

void CRingBufferWriter::Flush  )  const
 

int CRingBufferWriter::SpaceLeft  )  const
 

int CRingBufferWriter::SpaceUsed  )  const
 

int CRingBufferWriter::WriteToBuffer void *  data,
int  len,
bool  must_fit = false
const
 

Put data in buffer.

Parameters:
data A pointer to the data
len Number of bytes to write
must_fit Data must fit in buffer
Returns:
Number of bytes written
This function tries to put new data in the circular buffer. It returns the number of bytes that actually got written, which may be < len. If must_fit is TRUE then there must be enough space available in the buffer to write the whole data block. When there's not enough room, 0 will be returned.

This function has an interesting side effect: when there are no readers, the buffer is never filled!


The documentation for this class was generated from the following files:
Generated on Wed Dec 13 23:38:47 2006 for CamStream by doxygen 1.3.7