Abstract base class for output stream wrappers.
Public Member Functions | |
Constructors etc. | |
mostream (void) | |
virtual | ~mostream (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) |
bool | printf (const char *fmt,...) |
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 |
Flush all pending writes.
Reimplemented in mootio::mcbuffer, mootio::mzstream, and mootio::mcstream.
Referenced by moot::TokenWriter::autoflush(), and moot::TokenWriter::flush().
|
inlinevirtual |
Write n
bytes from buf
to the stream
Reimplemented in mootio::mcbuffer, mootio::mocxxstream, mootio::mzstream, and mootio::mcstream.
Referenced by moot::mootXMLRecoder::buffer2mstream(), mootBinIO::Item< ProbT >::save_n(), and mootBinIO::saveItem().
|
inlinevirtual |
Write a single byte to the stream. Formerly known as 'putc()', but conflicts with macro on gcc-4.4 (cf. http://odo.dwds.de/mantis/view.php?id=180)
Reimplemented in mootio::mcbuffer, mootio::mocxxstream, mootio::mzstream, and mootio::mcstream.
|
inlinevirtual |
Write a C string to the stream
Reimplemented in mootio::mcbuffer, mootio::mocxxstream, mootio::mzstream, and mootio::mcstream.
Referenced by moot::mootRecoder::buffer2mstream(), and moot::mootRecoder::string2mstream().
|
inlinevirtual |
Write a C++ string to the buffer
Reimplemented in mootio::mcbuffer, mootio::mocxxstream, mootio::mzstream, and mootio::mcstream.
|
virtual |
printf() to the stream, va_list version Default implementation uses a dynamically allocated temporary buffer and calls write()
Reimplemented in mootio::mcbuffer, mootio::mocxxstream, and mootio::mcstream.
|
inline |