List of all members
mootio::mostream Class Reference

Abstract base class for output stream wrappers.

Inheritance diagram for mootio::mostream:
Inheritance graph
[legend]
Collaboration diagram for mootio::mostream:
Collaboration graph
[legend]

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...
 

Constructor & Destructor Documentation

◆ mostream()

mootio::mostream::mostream ( void  )
inline

Default constructor

◆ ~mostream()

virtual mootio::mostream::~mostream ( void  )
inlinevirtual

Destructor

Member Function Documentation

◆ flush()

virtual bool mootio::mostream::flush ( void  )
inlinevirtual

Flush all pending writes.

Reimplemented in mootio::mcbuffer, mootio::mzstream, and mootio::mcstream.

Referenced by moot::TokenWriter::autoflush(), and moot::TokenWriter::flush().

◆ write()

virtual bool mootio::mostream::write ( const char *  buf,
size_t  n 
)
inlinevirtual

◆ putbyte()

virtual bool mootio::mostream::putbyte ( unsigned char  c)
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.

◆ puts() [1/2]

virtual bool mootio::mostream::puts ( const char *  s)
inlinevirtual

◆ puts() [2/2]

virtual bool mootio::mostream::puts ( const std::string &  s)
inlinevirtual

Write a C++ string to the buffer

Reimplemented in mootio::mcbuffer, mootio::mocxxstream, mootio::mzstream, and mootio::mcstream.

◆ vprintf()

virtual bool mootio::mostream::vprintf ( const char *  fmt,
va_list &  ap 
)
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.

◆ printf()

bool mootio::mostream::printf ( const char *  fmt,
  ... 
)
inline

printf() to the stream, arglist version. Default version calls vprintf()


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