VICI  0.11.815
Visual Chart Interpreter
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
VICI::cfi::fdinbuf Class Reference

An input stream buffer. More...

#include <sos/fdstream.h>

Inheritance diagram for VICI::cfi::fdinbuf:

Public Member Functions

 fdinbuf (int fd, bool isCloseNeeded, fdistream &owner)
 constructor More...
 
void close ()
 Close the input file descriptor.
 
virtual ~fdinbuf ()
 destructor.
 

Protected Member Functions

virtual int underflow ()
 read characters from the buffer.
 

Protected Attributes

fdistreammOwner
 Our owning input stream.
 
int mFd
 The input file descriptor.
 
bool mIsCloseNeeded
 Whether the file descriptor needs to be closed on destruction.
 
char mBuffer [BUFFER_SIZE+PUSHBACK_SIZE]
 

Static Protected Attributes

static const int BUFFER_SIZE = 8192
 Size of buffer.
 
static const int PUSHBACK_SIZE = 4
 maximum number of push back characters supported
 

Detailed Description

An input stream buffer.

An input stream buffer which reads from a file descriptor. This provides input buffering.

Constructor & Destructor Documentation

fdinbuf::fdinbuf ( int  fd,
bool  isCloseNeeded,
fdistream owner 
)

constructor

Constructor which accepts the file descriptor to read from.

Parameters
fdthe file descriptor to read from
isCloseNeededa flag indicating whether the file descriptor is closed on destruction
ownerour owning input stream

Member Data Documentation

char VICI::cfi::fdinbuf::mBuffer[BUFFER_SIZE+PUSHBACK_SIZE]
protected

Input buffer. This holds the data read and a bit more for a push-back buffer.


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