A Marshaller for generating a stream of numbers, ordered in columns. More...
#include <rtt/marsh/TableMarshaller.hpp>
Public Types | |
typedef o_stream | output_stream |
typedef o_stream | OutputStream |
Public Member Functions | |
TableMarshaller (output_stream &os, std::string sep=" ") | |
Create a new marshaller, streaming the data to a stream. | |
virtual void | serialize (PropertyBase *v) |
Serialize a property. | |
virtual void | serialize (const PropertyBag &v) |
Serialize the contents of a property bag with headers and footers. | |
virtual void | flush () |
Flush all buffers, write footers. | |
void | setStream (o_stream &_s) |
Set a new Stream. | |
o_stream & | getStream () |
Get the current Stream. | |
Protected Attributes | |
o_stream * | s |
A Marshaller for generating a stream of numbers, ordered in columns.
A new row is created on each flush() command. The TableHeaderMarshaller can create the appropriate heading for the columns.
Definition at line 55 of file TableMarshaller.hpp.
RTT::TableMarshaller< o_stream >::TableMarshaller | ( | output_stream & | os, | |
std::string | sep = " " | |||
) | [inline] |
Create a new marshaller, streaming the data to a stream.
os | The stream to write the data to (i.e. cerr) | |
sep | The separater to place between each column and at the end of the line. |
Definition at line 69 of file TableMarshaller.hpp.
virtual void RTT::TableMarshaller< o_stream >::flush | ( | ) | [inline, virtual] |
Flush all buffers, write footers.
Instructs the Marshaller to flush any remaining buffered data and write a footer to indicate that serialization is done. A marshaller may choose to write nothing until this function is called, or print a summary, or anything else.
Implements RTT::Marshaller.
Definition at line 98 of file TableMarshaller.hpp.
o_stream & RTT::StreamProcessor< o_stream >::getStream | ( | ) | [inline, inherited] |
Get the current Stream.
Definition at line 81 of file StreamProcessor.hpp.
virtual void RTT::TableMarshaller< o_stream >::serialize | ( | const PropertyBag & | v | ) | [inline, virtual] |
Serialize the contents of a property bag with headers and footers.
Use this method on your 'root' PropertyBag, such that headers and footers are written.
v | The property bag to be serialized. |
Implements RTT::Marshaller.
Definition at line 87 of file TableMarshaller.hpp.
References RTT::PropertyBag::getProperties(), and RTT::TableMarshaller< o_stream >::serialize().
virtual void RTT::TableMarshaller< o_stream >::serialize | ( | PropertyBase * | v | ) | [inline, virtual] |
Serialize a property.
v | The property to be serialized. |
Implements RTT::Marshaller.
Definition at line 75 of file TableMarshaller.hpp.
References RTT::PropertyBase::getDataSource(), RTT::PropertyBase::getName(), and RTT::Property< T >::value().
Referenced by RTT::TableMarshaller< o_stream >::serialize().
void RTT::StreamProcessor< o_stream >::setStream | ( | o_stream & | _s | ) | [inline, inherited] |
Set a new Stream.
_s | The stream to be processed. |
Definition at line 72 of file StreamProcessor.hpp.