Wrapper class for C FILE* streams.
Public Member Functions | |
Constructors etc. | |
mcstream (FILE *f=__null) | |
~mcstream (void) | |
Integrity Tests | |
virtual bool | valid (void) |
virtual bool | eof (void) |
virtual std::string | errmsg (void) |
Open/Close | |
virtual bool | reopen (void) |
virtual bool | close (void) |
Input Methods | |
virtual ByteCount | read (char *buf, size_t n) |
virtual int | getbyte (void) |
Output Methods | |
virtual bool | flush (void) |
virtual bool | write (const char *buf, size_t n) |
virtual bool | putbyte (unsigned char c) |
virtual bool | puts (const char *s) |
virtual bool | puts (const std::string &s) |
virtual bool | vprintf (const char *fmt, va_list &ap) |
Public Member Functions inherited from mootio::mistream | |
mistream (void) | |
virtual | ~mistream (void) |
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) |
operator bool (void) | |
Public Member Functions inherited from mootio::mostream | |
mostream (void) | |
virtual | ~mostream (void) |
bool | printf (const char *fmt,...) |
Public Attributes | |
FILE * | file |
underlying FILE* More... | |
Public Attributes inherited from mootio::mstream | |
std::string | name |
symbolic name of this stream More... | |
|
inline |
Default constructor
|
inline |
Destructor
|
inlinevirtual |
Test stream integrity
Reimplemented from mootio::mstream.
|
inlinevirtual |
Test for eof
Reimplemented from mootio::mstream.
|
inlinevirtual |
Get current error message
Reimplemented from mootio::mstream.
|
inlinevirtual |
Does nothing
Reimplemented from mootio::mstream.
Reimplemented in mootio::mfstream.
Referenced by mootio::mfstream::open().
|
inlinevirtual |
Just resets internal FILE* to NULL, does nothing else
Reimplemented from mootio::mstream.
Reimplemented in mootio::mfstream.
Referenced by mootio::mfstream::reopen(), mootio::mfstream::~mfstream(), mootio::mifstream::~mifstream(), and mootio::mofstream::~mofstream().
|
inlinevirtual |
Read up to n
bytes of data into buf
, returns number of bytes actually read.
Reimplemented from mootio::mistream.
|
inlinevirtual |
Read a single byte of data. Returns EOF on eof.
Reimplemented from mootio::mistream.
|
inlinevirtual |
Flush all pending writes.
Reimplemented from mootio::mostream.
|
inlinevirtual |
Write n
bytes from buf
to the stream
Reimplemented from mootio::mostream.
|
inlinevirtual |
Write a single byte to the stream
Reimplemented from mootio::mostream.
|
inlinevirtual |
Write a C string to the stream
Reimplemented from mootio::mostream.
|
inlinevirtual |
|
inlinevirtual |
printf() to the stream, va_list version (the real thing)
Reimplemented from mootio::mostream.
FILE* mootio::mcstream::file |
Referenced by mootio::mfstream::close(), puts(), and mootio::mfstream::reopen().