Class for encoding VTK compatible base64 data streams.
This class is typically used as follows: First, an instance of type Base64Writer is created. It is then filled with data using the left shift operator. Finally, the base64 encoded data is written to a VTK file by calling the member function toStream( std::ostream& os ) where "os" is a reference to an output stream which is attached to the VTK output file:
std::ofstream vtkFile( [filename] );
[...]
for( ... )
base64 << [data];
[...]
vtkFile.close();
Class for encoding VTK compatible base64 data streams.
Definition Base64Writer.h:57
void toStream(std::ostream &os)
This function can be used in order to convert all the data that was passed to this Base64Writer objec...
Definition Base64Writer.cpp:39
#include <Base64Writer.h>
|
template<typename T > |
Base64Writer & | operator<< (const T &data) |
| This function can be used in order to add data to a Base64Writer instance which then can be converted to a base64 encoded stream.
|
|
void | toStream (std::ostream &os) |
| This function can be used in order to convert all the data that was passed to this Base64Writer object into a base64 encoded stream.
|
|
|
void | encodeblock (const std::array< unsigned char, 3 > in, std::array< unsigned char, 4 > &out, int len) |
|
◆ encodeblock()
void walberla::vtk::Base64Writer::encodeblock |
( |
const std::array< unsigned char, 3 > | in, |
|
|
std::array< unsigned char, 4 > & | out, |
|
|
int | len ) |
|
inlineprivate |
◆ operator<<()
template<typename T >
Base64Writer & walberla::vtk::Base64Writer::operator<< |
( |
const T & | data | ) |
|
|
inline |
This function can be used in order to add data to a Base64Writer instance which then can be converted to a base64 encoded stream.
For more information on how a Base64Writer is typically used refer to the documentation/general description of this class.
◆ toStream()
void walberla::vtk::Base64Writer::toStream |
( |
std::ostream & | os | ) |
|
This function can be used in order to convert all the data that was passed to this Base64Writer object into a base64 encoded stream.
In accordance with the VTK specification, the beginning of the base64 encoded stream will contain a 32bit unsigned int value specifying the size (in bytes) of the data that follows. For more information on how a Base64Writer is typically used refer to the documentation/general description of this class.
◆ buffer_
std::vector<char> walberla::vtk::Base64Writer::buffer_ |
|
private |
The documentation for this class was generated from the following files: