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::fdoutbuf Class Reference

An output stream buffer. More...

#include <sos/fdstream.h>

Inheritance diagram for VICI::cfi::fdoutbuf:

Public Member Functions

 fdoutbuf (int fd, bool isCloseNeeded, fdostream &owner)
 constructor More...
 
void close ()
 Close the output file descriptor. More...
 
virtual ~fdoutbuf ()
 destructor.
 

Protected Member Functions

int flushBuffer ()
 Flush the characters in the buffer.
 
virtual int overflow (int c)
 Write the indicated character and all previous characters. More...
 
virtual int sync ()
 Flush the data in the buffer.
 

Protected Attributes

fdostreammOwner
 Our owning output stream.
 
int mFd
 The output file descriptor.
 
bool mIsCloseNeeded
 Whether the file descriptor needs to be closed on destruction.
 
char mBuffer [BUFFER_SIZE]
 Output buffer.
 

Static Protected Attributes

static const int BUFFER_SIZE = 8192
 Output buffer size.
 

Detailed Description

An output stream buffer.

An output stream buffer which writes to a file descriptor. This provides output buffering.

Constructor & Destructor Documentation

fdoutbuf::fdoutbuf ( int  fd,
bool  isCloseNeeded,
fdostream owner 
)

constructor

Parameters
fdthe file descriptor to write to
isCloseNeededa flag indicating whether the file descriptor is closed on destruction
ownerour owning output stream

Member Function Documentation

void fdoutbuf::close ( )

Close the output file descriptor.

This will be done whether or not the close needed flag is set.

int fdoutbuf::overflow ( int  c)
protectedvirtual

Write the indicated character and all previous characters.

Parameters
cthe current character.

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