chrono::ChStreamInBinaryFile Class Reference

Description

Specialized class for BINARY input on system's file.

#include <ChStream.h>

Inheritance diagram for chrono::ChStreamInBinaryFile:
Collaboration diagram for chrono::ChStreamInBinaryFile:

Public Member Functions

 ChStreamInBinaryFile (const std::string &filename)
 
virtual bool End_of_stream () const override
 Returns true if end of stream reached.
 
- Public Member Functions inherited from 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. 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...
 
std::fstream & GetFstream ()
 Reference to fstream encapsulated here.
 
- Public Member Functions inherited from chrono::ChStreamInBinary
template<class T >
ChStreamInBinaryoperator>> (T &obj)
 Generic >> operator for all classes which implement serialization by means of a method named 'void StreamIn(ChStreamInBinary&)'.
 
ChStreamInBinaryoperator>> (char &Val)
 Specialized operators for basic primitives (numbers like long, double, int, and booleans). More...
 
ChStreamInBinaryoperator>> (bool &Val)
 
ChStreamInBinaryoperator>> (int &Val)
 
ChStreamInBinaryoperator>> (unsigned int &Val)
 
ChStreamInBinaryoperator>> (double &Val)
 
ChStreamInBinaryoperator>> (float &Val)
 
ChStreamInBinaryoperator>> (long &Val)
 
ChStreamInBinaryoperator>> (unsigned long &Val)
 
ChStreamInBinaryoperator>> (unsigned long long &Val)
 
ChStreamInBinaryoperator>> (std::string &str)
 
ChStreamInBinaryoperator>> (char *str)
 Specialized operator for C strings.
 
template<class T >
void GenericBinaryInput (T &ogg)
 Generic operator for raw binary streaming of generic objects. More...
 
template<class t >
t * AbstractReadCreate (t **mObj)
 Extract an object from the archive, and assignes the pointer to it. More...
 
template<class t >
t * AbstractReadAllCreate (t **mObj)
 Extract an object from the archive, and assigns the pointer to it. More...
 
int VersionRead ()
 Some objects may write class version at the beginning of the streamed data, they can use this function to read class from stream.
 
- Public Member Functions inherited from chrono::ChBinaryArchive
bool IsBigEndianMachine ()
 Returns true if the machine where the code runs has big endian byte ordering, returns false otherwise.
 
void Init ()
 Reinitialize the vector of pointers to loaded/saved objects.
 
int PutPointer (void *object)
 Put a pointer in pointer vector, but only if it was not previously inserted. More...
 

Additional Inherited Members

- Public Types inherited from chrono::ChStream
enum  eChMode { CHFILE_NORMAL = 0, CHFILE_NOWRITE, CHFILE_SAFEWRITE, CHFILE_OPENLATER }
 [Obsolete] Modes for chrono files (the ch-modes). More...
 
enum  eChStreamError { CHSTREAM_OK = 0, CHSTREAM_EOF, CHSTREAM_FAIL }
 Errors for chrono files (the ch-modes). More...
 
- Protected Attributes inherited from chrono::ChBinaryArchive
bool big_endian_machine
 
std::vector< void * > objects_pointers
 Vector of pointers to stored/retrieved objects.
 

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