chrono::ChStreamVectorWrapper Class Reference

Description

This is a wrapper for a std::vector<char> (buffer of chars)

#include <ChStream.h>

Inheritance diagram for chrono::ChStreamVectorWrapper:

Public Member Functions

 ChStreamVectorWrapper (std::vector< char > *mchars)
 Creates a wrapper for an already existing std::vector<char>, given the pointer to that vector.
 
virtual ~ChStreamVectorWrapper ()
 Deleting this wrapper does not delete nor closes the wrapped buffer!
 
virtual void Read (char *data, size_t n)
 Reads from vector, up to n chars. More...
 
virtual void Write (const char *data, size_t n)
 Writes raw data to vector, up to n chars. More...
 
virtual bool End_of_stream ()
 Returns true if end of stream (end of vector) reached.
 
std::vector< char > * GetVector ()
 Direct reference to std::vector<char> encapsulated here.
 
void Seek (int position)
 Rewind read position to char number (0= beginning). More...
 

Member Function Documentation

◆ Read()

void chrono::ChStreamVectorWrapper::Read ( char *  data,
size_t  n 
)
virtual

Reads from vector, up to n chars.

If does not succeed, throws exception.

◆ Seek()

void chrono::ChStreamVectorWrapper::Seek ( int  position)
inline

Rewind read position to char number (0= beginning).

Write position is always at the end (append).

◆ Write()

void chrono::ChStreamVectorWrapper::Write ( const char *  data,
size_t  n 
)
virtual

Writes raw data to vector, 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