CMS 3D CMS Logo

lat::WriteBuffer Class Reference

Object for buffering writes for output streaming. More...

#include <Iguana/Utilities/classlib/iotools/WriteBuffer.h>

List of all members.

Public Types

enum  { DEFAULT_SIZE = 4096 }

Public Member Functions

unsigned char * buffer (void) const
void bump (IOSize n)
IOSize capacity (void) const
unsigned char * current (void) const
unsigned char * dirty (void) const
unsigned char * limit (void) const
WriteBufferoperator= (const WriteBuffer &x)
void put (const void *data, IOSize n)
void reset (void)
IOSize size (void) const
void taken (IOSize n)
 WriteBuffer (const WriteBuffer &x)
 WriteBuffer (IOSize bufsize=DEFAULT_SIZE)
 ~WriteBuffer (void)

Private Attributes

unsigned char * m_buffer
unsigned char * m_current
unsigned char * m_dirty
unsigned char * m_limit


Detailed Description

Object for buffering writes for output streaming.

Clients should use put() for buffered writes to the store. If capacity() returns zero to indicate the buffer is full, clients should write the section dirty() .. current () to the store. current() - dirty() is the number of bytes to write. Once the data has been written, the client should call taken() to move the buffer pointers.

Definition at line 25 of file WriteBuffer.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
DEFAULT_SIZE 

Definition at line 28 of file WriteBuffer.h.

00028 { DEFAULT_SIZE = 4096 }; //< Default buffer size.


Constructor & Destructor Documentation

lat::WriteBuffer::WriteBuffer ( IOSize  bufsize = DEFAULT_SIZE  ) 

lat::WriteBuffer::WriteBuffer ( const WriteBuffer x  ) 

lat::WriteBuffer::~WriteBuffer ( void   ) 


Member Function Documentation

unsigned char* lat::WriteBuffer::buffer ( void   )  const

void lat::WriteBuffer::bump ( IOSize  n  ) 

IOSize lat::WriteBuffer::capacity ( void   )  const

unsigned char* lat::WriteBuffer::current ( void   )  const

unsigned char* lat::WriteBuffer::dirty ( void   )  const

unsigned char* lat::WriteBuffer::limit ( void   )  const

WriteBuffer& lat::WriteBuffer::operator= ( const WriteBuffer x  ) 

void lat::WriteBuffer::put ( const void data,
IOSize  n 
)

void lat::WriteBuffer::reset ( void   ) 

IOSize lat::WriteBuffer::size ( void   )  const

void lat::WriteBuffer::taken ( IOSize  n  ) 


Member Data Documentation

unsigned char* lat::WriteBuffer::m_buffer [private]

Definition at line 49 of file WriteBuffer.h.

unsigned char* lat::WriteBuffer::m_current [private]

Definition at line 50 of file WriteBuffer.h.

unsigned char* lat::WriteBuffer::m_dirty [private]

Definition at line 52 of file WriteBuffer.h.

unsigned char* lat::WriteBuffer::m_limit [private]

Definition at line 51 of file WriteBuffer.h.


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:48:37 2009 for CMSSW by  doxygen 1.5.4