chrono::ChStreamFile Class Reference
Description
Base class for typical output on system's file, on a disk, using the typical C++ 'fstream' handler.
#include <ChStream.h>
Inheritance diagram for chrono::ChStreamFile:
Public Member Functions | |
ChStreamFile (const std::string &filename, std::ios::openmode mode) | |
Creates and open a file, given the filename on disk and the opening mode. More... | |
virtual | ~ChStreamFile () |
Destruction means that the file stream is also closed. | |
virtual void | Flush () |
Synchronizes the associated stream buffer with its controlled output sequence. | |
virtual void | Write (const char *data, size_t n) |
Writes to file, up to n chars. More... | |
virtual void | Read (char *data, size_t n) |
Reads from file, up to n chars. More... | |
virtual bool | End_of_stream () const |
Returns true if end of stream reached. | |
std::fstream & | GetFstream () |
Reference to fstream encapsulated here. | |
Constructor & Destructor Documentation
◆ ChStreamFile()
chrono::ChStreamFile::ChStreamFile | ( | const std::string & | filename, |
std::ios::openmode | mode | ||
) |
Creates and open a file, given the filename on disk and the opening mode.
(e.g.: std::ios::out or std::ios::in)
Member Function Documentation
◆ Read()
|
virtual |
Reads from file, up to n chars.
If does not succeed, throws exception.
◆ Write()
|
virtual |
Writes to file, up to n chars.
If does not succeed, throws exception.
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono/core/ChStream.h
- /builds/uwsbel/chrono/src/chrono/core/ChStream.cpp