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

Public Member Functions | |
| ChStreamVectorWrapper (std::vector< char > *mchars) | |
| virtual | ~ChStreamVectorWrapper () |
| virtual void | Read (char *data, int n) |
| virtual void | Write (const char *data, int n) |
| virtual bool | End_of_stream () |
| std::vector< char > * | GetVector () |
| void | Seek (int position) |
This is a wrapper for a std::vector<char> (buffer of chars)
| chrono::ChStreamVectorWrapper::ChStreamVectorWrapper | ( | std::vector< char > * | mchars | ) |
Creates a wrapper for an already existing std::vector<char>, given the pointer to that vector.
| chrono::ChStreamVectorWrapper::~ChStreamVectorWrapper | ( | ) | [virtual] |
Deleting this wrapper does not delete nor closes the wrapped buffer!
| void chrono::ChStreamVectorWrapper::Read | ( | char * | data, |
| int | n | ||
| ) | [virtual] |
Reads from vector, up to n chars. If does not succeed, throws exception.
| void chrono::ChStreamVectorWrapper::Seek | ( | int | position | ) |
Rewind read position to char number (0= beginning). Write position is always at the end (append).
| void chrono::ChStreamVectorWrapper::Write | ( | const char * | data, |
| int | n | ||
| ) | [virtual] |
Writes raw data to vector, up to n chars. If does not succeed, throws exception.
CHRONO::ENGINE