dune-grid  2.2.0
Public Member Functions
Dune::Base64Stream Class Reference

class to base64 encode a stream of data More...

#include <dune/grid/io/file/vtk/streams.hh>

List of all members.

Public Member Functions

 Base64Stream (std::ostream &s_)
 Construct a Base64Stream.
template<class X >
void write (X &data)
 encode a data item
void flush ()
 flush the current unwritten data to the stream.
 ~Base64Stream ()
 destroy the object

Detailed Description

class to base64 encode a stream of data


Constructor & Destructor Documentation

Dune::Base64Stream::Base64Stream ( std::ostream &  s_)
inline

Construct a Base64Stream.

Parameters:
s_The stream the resulting base64-encoded text will be written to.

References Dune::b64txt::read(), and Dune::b64chunk::txt.

Dune::Base64Stream::~Base64Stream ( )
inline

destroy the object

Calls flush()

References flush().


Member Function Documentation

void Dune::Base64Stream::flush ( )
inline

flush the current unwritten data to the stream.

If the size of the received input is not a multiple of three bytes, an end-marker will be written.

Calling this function a second time without calling b64enc() or calling it right after construction has no effect.

References Dune::b64chunk::data, Dune::b64txt::size, Dune::b64chunk::txt, and Dune::b64data::write().

Referenced by Dune::VTK::BinaryDataArrayWriter< T >::BinaryDataArrayWriter(), Dune::VTK::NakedBase64DataArrayWriter< T >::NakedBase64DataArrayWriter(), ~Base64Stream(), and Dune::VTK::BinaryDataArrayWriter< T >::~BinaryDataArrayWriter().

template<class X >
void Dune::Base64Stream::write ( X &  data)
inline

encode a data item

The result will be written to the stream, eventually. This method may be called multiple times in a row. After this method has been called, noone else may write to the undelying stream until flush() has been called or this writer object has been destroyed.

References Dune::b64chunk::data, Dune::b64txt::put(), Dune::b64txt::size, Dune::b64chunk::txt, and Dune::b64data::write().

Referenced by Dune::VTK::BinaryDataArrayWriter< T >::BinaryDataArrayWriter(), Dune::VTK::NakedBase64DataArrayWriter< T >::NakedBase64DataArrayWriter(), Dune::VTK::BinaryDataArrayWriter< T >::write(), and Dune::VTK::NakedBase64DataArrayWriter< T >::write().


The documentation for this class was generated from the following file: