BLOCXX_NAMESPACE::IOIFCStreamBuffer Class Reference

DO NOT DERIVE FROM THIS CLASS, as the dtor has to call a virtual fct. More...

#include <IOIFCStreamBuffer.hpp>

Inheritance diagram for BLOCXX_NAMESPACE::IOIFCStreamBuffer:

BLOCXX_NAMESPACE::BaseStreamBuffer BLOCXX_NAMESPACE::SocketStreamBuffer

List of all members.

Public Member Functions

 IOIFCStreamBuffer (IOIFC *dev, int bufSize, const char *direction)
 IOIFCStreamBuffer (IOIFC *dev, EDirectionFlag direction=E_IN_OUT, int bufSize=64 *1024)
void setErrorAction (IOIFC::ErrorAction error_action)
virtual ~IOIFCStreamBuffer ()
virtual void reset ()
std::streambuf * tie (std::streambuf *tied_buf)

Private Member Functions

 IOIFCStreamBuffer (const IOIFCStreamBuffer &arg)
IOIFCStreamBufferoperator= (const IOIFCStreamBuffer &arg)
virtual int buffer_to_device (const char *c, int n)
 Writes the buffer to the "device".
virtual int buffer_from_device (char *c, int n)
 Fill the buffer from the "device".

Private Attributes

IOIFCm_dev
std::streambuf * m_tied_buf
IOIFC::ErrorAction m_error_action


Detailed Description

DO NOT DERIVE FROM THIS CLASS, as the dtor has to call a virtual fct.

Definition at line 51 of file IOIFCStreamBuffer.hpp.


Constructor & Destructor Documentation

BLOCXX_NAMESPACE::IOIFCStreamBuffer::IOIFCStreamBuffer ( IOIFC dev,
int  bufSize,
const char *  direction 
)

Definition at line 63 of file IOIFCStreamBuffer.cpp.

BLOCXX_NAMESPACE::IOIFCStreamBuffer::IOIFCStreamBuffer ( IOIFC dev,
EDirectionFlag  direction = E_IN_OUT,
int  bufSize = 64*1024 
)

Definition at line 72 of file IOIFCStreamBuffer.cpp.

BLOCXX_NAMESPACE::IOIFCStreamBuffer::~IOIFCStreamBuffer (  )  [virtual]

Definition at line 80 of file IOIFCStreamBuffer.cpp.

References BLOCXX_NAMESPACE::BaseStreamBuffer::sync().

BLOCXX_NAMESPACE::IOIFCStreamBuffer::IOIFCStreamBuffer ( const IOIFCStreamBuffer arg  )  [private]


Member Function Documentation

void BLOCXX_NAMESPACE::IOIFCStreamBuffer::setErrorAction ( IOIFC::ErrorAction  error_action  ) 

Definition at line 98 of file IOIFCStreamBuffer.cpp.

References m_error_action.

void BLOCXX_NAMESPACE::IOIFCStreamBuffer::reset (  )  [virtual]

std::streambuf * BLOCXX_NAMESPACE::IOIFCStreamBuffer::tie ( std::streambuf *  tied_buf  ) 

Definition at line 91 of file IOIFCStreamBuffer.cpp.

References m_tied_buf.

IOIFCStreamBuffer& BLOCXX_NAMESPACE::IOIFCStreamBuffer::operator= ( const IOIFCStreamBuffer arg  )  [private]

int BLOCXX_NAMESPACE::IOIFCStreamBuffer::buffer_to_device ( const char *  c,
int  n 
) [private, virtual]

Writes the buffer to the "device".

Parameters:
c A pointer to the start of the buffer
n the number of bytes to write
Returns:
-1 if error, 0 if the entire buffer was written.

Reimplemented from BLOCXX_NAMESPACE::BaseStreamBuffer.

Definition at line 115 of file IOIFCStreamBuffer.cpp.

References m_dev, m_error_action, and BLOCXX_NAMESPACE::IOIFC::write().

int BLOCXX_NAMESPACE::IOIFCStreamBuffer::buffer_from_device ( char *  c,
int  n 
) [private, virtual]

Fill the buffer from the "device".

Parameters:
c A pointer to the beginning of the buffer
n The number of bytes to be read into the buffer.
Returns:
-1 if no bytes are able to be read from the "device" (for instance, end of input stream). Otherwise, return the number of bytes read into the buffer.
Exceptions:
IOException on failure.

Reimplemented from BLOCXX_NAMESPACE::BaseStreamBuffer.

Definition at line 105 of file IOIFCStreamBuffer.cpp.

References m_dev, m_error_action, m_tied_buf, and BLOCXX_NAMESPACE::IOIFC::read().


Member Data Documentation

Definition at line 68 of file IOIFCStreamBuffer.hpp.

Referenced by buffer_from_device(), and buffer_to_device().

Definition at line 69 of file IOIFCStreamBuffer.hpp.

Referenced by buffer_from_device(), and tie().

Definition at line 70 of file IOIFCStreamBuffer.hpp.

Referenced by buffer_from_device(), buffer_to_device(), and setErrorAction().


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

Generated on Wed Feb 25 19:05:06 2009 for blocxx by  doxygen 1.5.6