chrono::ChStreamIstreamWrapper Class Reference

Description

This is a wrapper for already-opened std::istream input streams.

#include <ChStream.h>

Inheritance diagram for chrono::ChStreamIstreamWrapper:

Public Member Functions

 ChStreamIstreamWrapper (std::istream *mfile)
 Creates a wrapper for an already existing, already opened, istream, given the pointer to that istream. More...
 
virtual ~ChStreamIstreamWrapper ()
 Deleting this stream wrapper does not delete nor closes the wrapped istream!
 
virtual void Read (char *data, size_t n)
 Reads from stream, up to n chars. More...
 
virtual bool End_of_stream ()
 Returns true if end of stream reached.
 
std::istream * GetIstream ()
 Reference to istream encapsulated here.
 

Constructor & Destructor Documentation

chrono::ChStreamIstreamWrapper::ChStreamIstreamWrapper ( std::istream *  mfile)

Creates a wrapper for an already existing, already opened, istream, given the pointer to that istream.

Member Function Documentation

void chrono::ChStreamIstreamWrapper::Read ( char *  data,
size_t  n 
)
virtual

Reads from stream, up to n chars.

If does not succeed, throws exception.