RTT::SimpleMarshaller< o_stream > Class Template Reference

A simple marshaller which flattens your property bag into simple types. More...

#include <rtt/marsh/SimpleMarshaller.hpp>

Inheritance diagram for RTT::SimpleMarshaller< o_stream >:
RTT::Marshaller RTT::PropertyIntrospection RTT::PropertyBagVisitor

List of all members.

Public Member Functions

 SimpleMarshaller (output_stream &os)
virtual void flush ()
 Flush all buffers, write footers.
virtual void serialize (PropertyBase *p)
 Serialize a property.
virtual void serialize (const PropertyBag &v)
 Serialize the contents of a property bag with headers and footers.

Protected Member Functions

template<class T >
void introspect (Property< T > &v)
 Unknown types must decompose theirselves into the primitives.
void introspect_T (PropertyBase *t)
 The default handler to execute when an unknown type is being decomposed.

Detailed Description

template<typename o_stream>
class RTT::SimpleMarshaller< o_stream >

A simple marshaller which flattens your property bag into simple types.

The representation has the following structure:
typecode, name length, name, ':', value length, value, ';'

For example, to declare a string with contents "value":
Sktest:lvalue;
Except that the k and l would be replaced by byte values four and five.

The typecodes are:

The name length is a single byte and thus limits the length of names to 255 characters. (Zero means zero length.)

The name is an ASCII string representing the name of the property.

The value length is a single byte and thus limits the length of names to 255 characters. (Zero means zero length.)

Definition at line 83 of file SimpleMarshaller.hpp.


Member Function Documentation

template<typename o_stream >
virtual void RTT::SimpleMarshaller< 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 154 of file SimpleMarshaller.hpp.

template<class T >
void RTT::PropertyIntrospection::introspect ( Property< T > &  v  )  [inline, inherited]

Unknown types must decompose theirselves into the primitives.

See also:
TemplateTypeInfo

Definition at line 49 of file PropertyIntrospection.inl.

References RTT::PropertyIntrospection::introspect_T().

template<typename o_stream >
virtual void RTT::SimpleMarshaller< 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.

Parameters:
v The property bag to be serialized.

Implements RTT::Marshaller.

Definition at line 162 of file SimpleMarshaller.hpp.

References RTT::PropertyBag::identify().

template<typename o_stream >
virtual void RTT::SimpleMarshaller< o_stream >::serialize ( PropertyBase v  )  [inline, virtual]

Serialize a property.

Parameters:
v The property to be serialized.

Implements RTT::Marshaller.

Definition at line 157 of file SimpleMarshaller.hpp.

References RTT::PropertyBase::identify().


The documentation for this class was generated from the following file:
Generated on Thu Dec 23 13:22:43 2010 for Orocos Real-Time Toolkit by  doxygen 1.6.3