chrono::ChStreamOstreamWrapper Class Reference

Description

This is a wrapper for already-opened std::ostream output streams (like std::cout or similar)

#include <ChStream.h>

Inheritance diagram for chrono::ChStreamOstreamWrapper:

Public Member Functions

 ChStreamOstreamWrapper (std::ostream *mfile)
 Creates a wrapper for an already existing, already opened, ostream, given the pointer to that ostream. More...
 
virtual ~ChStreamOstreamWrapper ()
 Deleting this stream wrapper does not delete nor closes the wrapped ostream!
 
virtual void Write (const char *data, size_t n)
 Writes raw data to file, up to n chars. More...
 
virtual bool End_of_stream () const
 Returns true if end of stream reached.
 
std::ostream * GetOstream () const
 Reference to ostream encapsulated here.
 

Constructor & Destructor Documentation

chrono::ChStreamOstreamWrapper::ChStreamOstreamWrapper ( std::ostream *  mfile)

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

Member Function Documentation

void chrono::ChStreamOstreamWrapper::Write ( const char *  data,
size_t  n 
)
virtual

Writes raw data to file, up to n chars.

If does not succeed, throws exception.