MULTIBODY SIMULATION SOFTWARE - API documentation
Public Member Functions
chrono::ChStreamOutBinary Class Reference

#include <CHstream.h>

Inheritance diagram for chrono::ChStreamOutBinary:
Inheritance graph
[legend]
Collaboration diagram for chrono::ChStreamOutBinary:
Collaboration graph
[legend]

List of all members.

Public Member Functions

template<class T >
ChStreamOutBinaryoperator<< (T &obj)
ChStreamOutBinaryoperator<< (char Val)
ChStreamOutBinaryoperator<< (bool Val)
ChStreamOutBinaryoperator<< (int Val)
ChStreamOutBinaryoperator<< (unsigned int Val)
ChStreamOutBinaryoperator<< (double Val)
ChStreamOutBinaryoperator<< (float Val)
ChStreamOutBinaryoperator<< (std::string &str)
ChStreamOutBinaryoperator<< (char *str)
template<class T >
void GenericBinaryOutput (T &ogg)
template<class t >
t * AbstractWrite (t *pObj)
template<class t >
t * AbstractWriteAll (t *pObj)
void VersionWrite (int mver)

Detailed Description

This is a base class for all BINARY OUTPUT streams, in a way such that the stream is platform indepent (see the 'little endian' stuff in 'floating point to persistent data' topics..) Defines some << operators from basic types, converting all them into calls to the Output() function. At least some inherited class should be used by the user in order to get some practical effect (file saving, etc.)


Member Function Documentation

template<class t >
t* chrono::ChStreamOutBinary::AbstractWrite ( t *  pObj)

Stores an object, given the pointer, into the archive. This function can be used to serialize objects from nontrivial class trees, where at load time one may wonder which was the class type of the saved object. Note: the object must be load with ChStreamInBinary::AbstractReadCreate() Also, the AbstractWrite()-AbstractReadCreate() mechanism avoids storing/creating multiple times the shared objects. Supports only objects with Chrono RTTI and serializer member StreamOUT().

template<class t >
t* chrono::ChStreamOutBinary::AbstractWriteAll ( t *  pObj)

Stores an object, given the pointer, into the archive. This function can be used to serialize objects from nontrivial class trees, where at load time one may wonder which was the class type of the saved object. Note: the object must be load with ChStreamInBinary::AbstractReadCreate() Also, the AbstractWrite()-AbstractReadCreate() mechanism avoids storing/creating multiple times the shared objects. Supports only objects with Chrono RTTI and serializer member StreamOUT().

template<class T >
void chrono::ChStreamOutBinary::GenericBinaryOutput ( T &  ogg)

Generic operator for binary streaming of generic objects. WARNING!!! raw byte streaming! If class 'T' contains double, int, long, etc, these may give problems when loading on another platform which has big-endian ordering, if generated on a little-edian platform...

template<class T >
ChStreamOutBinary& chrono::ChStreamOutBinary::operator<< ( T &  obj)

Generic << operator for all classes which implement serialization by means of a method named 'void StreamOUT(ChStreamOutBinary&)'

ChStreamOutBinary & chrono::ChStreamOutBinary::operator<< ( char  Val)

Specialized operators for basic primitives (numbers like long, double, int. etc., and booleans) Handle byte ordering issues in little.endian/big.endian representations, for cross platform portability.

void chrono::ChStreamOutBinary::VersionWrite ( int  mver)

Some objects may write class version at the beginning of the streamed data, using this function.


CHRONO::ENGINE
C++ library for multibody simulation, (C) Alessandro Tasora
This API documentation has been generated on Tue Jul 10 2012 by Doxygen