blocxx
Public Types | Public Member Functions | Private Member Functions | Private Attributes

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 Types

enum  EDirectionFlag

Public Member Functions

 IOIFCStreamBuffer (IOIFC *dev, int bufSize, const char *direction) BLOCXX_DEPRECATED
 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.


Member Enumeration Documentation

Definition at line 60 of file BaseStreamBuffer.hpp.


Constructor & Destructor Documentation

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

Definition at line 64 of file IOIFCStreamBuffer.cpp.

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

Definition at line 73 of file IOIFCStreamBuffer.cpp.

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

Definition at line 81 of file IOIFCStreamBuffer.cpp.

References BLOCXX_NAMESPACE::BaseStreamBuffer::sync().

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

Member Function Documentation

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

Fill the buffer from the "device".

Parameters:
cA pointer to the beginning of the buffer
nThe 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:
IOExceptionon failure.

Reimplemented from BLOCXX_NAMESPACE::BaseStreamBuffer.

Definition at line 106 of file IOIFCStreamBuffer.cpp.

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

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

Writes the buffer to the "device".

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

Reimplemented from BLOCXX_NAMESPACE::BaseStreamBuffer.

Definition at line 116 of file IOIFCStreamBuffer.cpp.

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

IOIFCStreamBuffer& BLOCXX_NAMESPACE::IOIFCStreamBuffer::operator= ( const IOIFCStreamBuffer arg) [private]
void BLOCXX_NAMESPACE::IOIFCStreamBuffer::reset ( ) [virtual]
void BLOCXX_NAMESPACE::IOIFCStreamBuffer::setErrorAction ( IOIFC::ErrorAction  error_action)

Definition at line 99 of file IOIFCStreamBuffer.cpp.

References m_error_action.

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

Definition at line 92 of file IOIFCStreamBuffer.cpp.

References m_tied_buf.


Member Data Documentation

Definition at line 68 of file IOIFCStreamBuffer.hpp.

Referenced by buffer_from_device(), and buffer_to_device().

Definition at line 70 of file IOIFCStreamBuffer.hpp.

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

Definition at line 69 of file IOIFCStreamBuffer.hpp.

Referenced by buffer_from_device(), and tie().


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