List of all members
mootio::mistream Class Reference

Abstract base class for input stream wrappers.

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

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

Constructor & Destructor Documentation

◆ mistream()

mootio::mistream::mistream ( void  )
inline

Default constructor

◆ ~mistream()

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

Destructor

Member Function Documentation

◆ getbyte()

virtual int mootio::mistream::getbyte ( void  )
inlinevirtual

Read a single byte of data. Returns EOF on eof.

Reimplemented in mootio::micbuffer, mootio::mzstream, mootio::micxxstream, and mootio::mcstream.

◆ read()

virtual ByteCount mootio::mistream::read ( char *  buf,
size_t  n 
)
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().

◆ getline()

virtual ByteCount mootio::mistream::getline ( std::string &  s,
const std::string &  delim = "\n\r" 
)
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.


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