|
MULTIBODY SIMULATION SOFTWARE - API documentation |
#include <CHstream.h>

Public Member Functions | |
| ChStreamFile (const char *filename, std::ios::openmode mmode) | |
| virtual | ~ChStreamFile () |
| virtual void | Write (const char *data, int n) |
| virtual void | Read (char *data, int n) |
| virtual bool | End_of_stream () |
| std::fstream & | GetFstream () |
| chrono::ChStreamFile::ChStreamFile | ( | const char * | filename, | |
| std::ios::openmode | mmode | |||
| ) |
Creates a system file, like the C++ fstream, and opens it, given filename on disk, and the opening mode (ex: std::ios::out or std::ios::in)
| chrono::ChStreamFile::~ChStreamFile | ( | ) | [virtual] |
Destruction means that the file stream is also closed.
| void chrono::ChStreamFile::Write | ( | const char * | data, | |
| int | n | |||
| ) | [virtual] |
Writes to file, up to n chars. If does not succeed, throws exception.
| void chrono::ChStreamFile::Read | ( | char * | data, | |
| int | n | |||
| ) | [virtual] |
Reads from file, up to n chars. If does not succeed, throws exception.
| virtual bool chrono::ChStreamFile::End_of_stream | ( | ) | [virtual] |
Returns true if end of stream reached.
Reimplemented in chrono::ChStreamInBinaryFile, and chrono::ChStreamInAsciiFile.
| std::fstream& chrono::ChStreamFile::GetFstream | ( | ) |
Reference to fstream encapsulated here.
CHRONO::ENGINE