commore  1.0.6-SNAPSHOT
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
commore::IBStream Class Reference

#include <IOBStream.h>

Classes

class  Impl
 

Public Member Functions

 IBStream ()
 
 ~IBStream ()
 
 IBStream (const AChar *s)
 
 IBStream (const StringBuffer &s)
 
 IBStream (const Path &file_path, bool text=true)
 
 IBStream (const CommBuffer &buffer)
 
bool open (const Path &file_path, bool text=true)
 
bool open (const AChar *s)
 
bool open (const StringBuffer &s)
 
bool open (const CommBuffer &b)
 
bool is_open ()
 
bool eof ()
 
int get ()
 
int get (char *dest, size_t len)
 
int peek ()
 
void eatwhite ()
 
const AChardump ()
 
void close ()
 

Protected Attributes

Implimpl_
 

Detailed Description

Genenic stream reader

Constructor & Destructor Documentation

IBStream::IBStream ( )
IBStream::~IBStream ( )
IBStream::IBStream ( const AChar s)
Parameters
sas text input stream in a null terminated string
IBStream::IBStream ( const StringBuffer s)
Parameters
sas text input stream in a StringBuffer
IBStream::IBStream ( const Path file_path,
bool  text = true 
)
Parameters
file_pathpath of a file as input stream
textif true file is a text file
IBStream::IBStream ( const CommBuffer buffer)
Parameters
bufferinput stream in a communication buffer

Member Function Documentation

void IBStream::close ( )

Close stream

const AChar * IBStream::dump ( )

Debug pupose

void IBStream::eatwhite ( )

Read all white space

bool IBStream::eof ( )
Returns
true if stream is terminated
int IBStream::get ( )

Get current character and go to next

Returns
-1 if end of stream
int IBStream::get ( char *  dest,
size_t  len 
)

Get len character and copy them to dest

Returns
number of read character
bool IBStream::is_open ( )
Returns
true if stream is open
bool IBStream::open ( const Path file_path,
bool  text = true 
)

Open stream on a file content

Parameters
file_pathpath of a file as input stream
textif true file is a text file
bool IBStream::open ( const AChar s)

Open stream on a string content

Parameters
s
bool IBStream::open ( const StringBuffer s)

Open stream on a string buffer content

Parameters
s
bool IBStream::open ( const CommBuffer b)

Open stream on a communication buffer content

Parameters
bCommBuffer to use as input
int IBStream::peek ( )

Get current character

Returns
-1 if end of stream

Member Data Documentation

Impl* commore::IBStream::impl_
protected

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