Abstract base class for input stream wrappers.
Public Member Functions | |
Constructors etc. | |
mistream (void) | |
virtual | ~mistream (void) |
Input Methods | |
virtual int | getbyte (void) |
virtual ByteCount | read (char *buf, size_t n) |
virtual ByteCount | getline (std::string &s, const std::string &delim="\") |
Public Member Functions inherited from mootio::mstream | |
mstream (const std::string &myname="") | |
virtual | ~mstream (void) |
virtual bool | valid (void) |
operator bool (void) | |
virtual bool | eof (void) |
virtual std::string | errmsg (void) |
virtual bool | reopen (void) |
virtual bool | close (void) |
Additional Inherited Members | |
Public Attributes inherited from mootio::mstream | |
std::string | name |
symbolic name of this stream More... | |
|
inline |
Default constructor
|
inlinevirtual |
Destructor
|
inlinevirtual |
Read a single byte of data. Returns EOF on eof.
Reimplemented in mootio::micbuffer, mootio::mzstream, mootio::micxxstream, and mootio::mcstream.
|
inlinevirtual |
Read up to n
bytes of data into buf
, returns number of bytes actually read.
Reimplemented in mootio::micbuffer, mootio::mzstream, mootio::micxxstream, and mootio::mcstream.
Referenced by mootBinIO::Item< ProbT >::load_n(), mootBinIO::loadItem(), and moot::GenericLexer::yyinput().
|
inlinevirtual |
Read a single line of data into s
, using delimiters from delim
. Returns the number of bytes read, or EOF
on eof The default implementation is quite inefficient. Implicitly clears s
.