UCommon
ucommon::StreamBuffer Class Reference

Common stream buffer for std C++ i/o classes. More...

#include <stream.h>

Inheritance diagram for ucommon::StreamBuffer:

Public Member Functions

bool is_open (void) const
 
 operator bool () const
 
bool operator! () const
 
int sync (void)
 Flush the stream input and output buffers, writes pending output.
 

Protected Member Functions

void allocate (size_t size)
 
void release (void)
 
int uflow ()
 This streambuf method is used for doing unbuffered reads through the establish tcp socket connection when in interactive mode.
 

Protected Attributes

size_t bufsize
 
char * gbuf
 
char * pbuf
 

Detailed Description

Common stream buffer for std C++ i/o classes.

This both binds the character protocol to iostream and offers a common base class for all other c++ stdlib based streaming classes.

Author
David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org

Definition at line 64 of file stream.h.

Member Function Documentation

◆ is_open()

bool ucommon::StreamBuffer::is_open ( void ) const
inline

Definition at line 96 of file stream.h.

◆ operator bool()

ucommon::StreamBuffer::operator bool ( ) const
inline

Definition at line 99 of file stream.h.

◆ operator!()

bool ucommon::StreamBuffer::operator! ( ) const
inline

Definition at line 102 of file stream.h.

◆ sync()

int ucommon::StreamBuffer::sync ( void )

Flush the stream input and output buffers, writes pending output.

Returns
0 on success, or error code.

◆ uflow()

int ucommon::StreamBuffer::uflow ( )
protected

This streambuf method is used for doing unbuffered reads through the establish tcp socket connection when in interactive mode.

Also this method will handle proper use of buffers if not in interactive mode.

Returns
char from tcp socket connection, EOF if not connected.

Field Documentation

◆ bufsize

size_t ucommon::StreamBuffer::bufsize
protected

Definition at line 70 of file stream.h.

◆ gbuf

char* ucommon::StreamBuffer::gbuf
protected

Definition at line 71 of file stream.h.

◆ pbuf

char * ucommon::StreamBuffer::pbuf
protected

Definition at line 71 of file stream.h.


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