Marshalls a PropertyBag to a non standard XML format. More...
#include <rtt/marsh/XMLMarshaller.hpp>
Public Types | |
typedef o_stream | output_stream |
typedef o_stream | OutputStream |
Public Member Functions | |
XMLMarshaller (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. | |
void | setStream (o_stream &_s) |
Set a new Stream. | |
o_stream & | getStream () |
Get the current Stream. | |
Protected Member Functions | |
virtual void | introspect (PropertyBase *pb) |
Callback for a Property which is not a PropertyBag. | |
virtual void | introspect (Property< bool > &v) |
introspect a property of type bool. | |
virtual void | introspect (Property< char > &v) |
introspect a property of type char. | |
virtual void | introspect (Property< int > &v) |
introspect a property of type int. | |
virtual void | introspect (Property< unsigned int > &v) |
introspect a property of type unsigned int. | |
virtual void | introspect (Property< double > &v) |
introspect a property of type double. | |
virtual void | introspect (Property< std::string > &v) |
introspect a property of type string. | |
virtual void | introspect (Property< PropertyBag > &v) |
Callback for a Property which is a PropertyBag. | |
virtual void | introspect (const PropertyBag &v, std::string name) |
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. | |
Protected Attributes | |
o_stream * | s |
Marshalls a PropertyBag to a non standard XML format.
Definition at line 53 of file XMLMarshaller.hpp.
virtual void RTT::XMLMarshaller< 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 129 of file XMLMarshaller.hpp.
o_stream & RTT::StreamProcessor< o_stream >::getStream | ( | ) | [inline, inherited] |
Get the current Stream.
Definition at line 81 of file StreamProcessor.hpp.
void RTT::PropertyIntrospection::introspect | ( | Property< T > & | v | ) | [inline, inherited] |
Unknown types must decompose theirselves into the primitives.
Definition at line 49 of file PropertyIntrospection.inl.
References RTT::PropertyIntrospection::introspect_T().
virtual void RTT::XMLMarshaller< o_stream >::introspect | ( | Property< std::string > & | v | ) | [inline, protected, virtual] |
introspect a property of type string.
v | The property to be introspectd. |
Implements RTT::PropertyIntrospection.
Definition at line 97 of file XMLMarshaller.hpp.
References RTT::Property< T >::get(), RTT::PropertyBase::getDescription(), and RTT::PropertyBase::getName().
virtual void RTT::XMLMarshaller< o_stream >::introspect | ( | Property< double > & | v | ) | [inline, protected, virtual] |
introspect a property of type double.
v | The property to be introspectd. |
Implements RTT::PropertyIntrospection.
Definition at line 91 of file XMLMarshaller.hpp.
References RTT::Property< T >::get(), RTT::PropertyBase::getDescription(), and RTT::PropertyBase::getName().
virtual void RTT::XMLMarshaller< o_stream >::introspect | ( | Property< unsigned int > & | v | ) | [inline, protected, virtual] |
introspect a property of type unsigned int.
v | The property to be introspectd. |
Implements RTT::PropertyIntrospection.
Definition at line 84 of file XMLMarshaller.hpp.
References RTT::Property< T >::get(), RTT::PropertyBase::getDescription(), and RTT::PropertyBase::getName().
virtual void RTT::XMLMarshaller< o_stream >::introspect | ( | Property< int > & | v | ) | [inline, protected, virtual] |
introspect a property of type int.
v | The property to be introspectd. |
Implements RTT::PropertyIntrospection.
Definition at line 77 of file XMLMarshaller.hpp.
References RTT::Property< T >::get(), RTT::PropertyBase::getDescription(), and RTT::PropertyBase::getName().
virtual void RTT::XMLMarshaller< o_stream >::introspect | ( | Property< char > & | v | ) | [inline, protected, virtual] |
introspect a property of type char.
v | The property to be introspectd. |
Implements RTT::PropertyIntrospection.
Definition at line 71 of file XMLMarshaller.hpp.
References RTT::Property< T >::get(), RTT::PropertyBase::getDescription(), and RTT::PropertyBase::getName().
virtual void RTT::XMLMarshaller< o_stream >::introspect | ( | Property< bool > & | v | ) | [inline, protected, virtual] |
introspect a property of type bool.
v | The property to be introspectd. |
Implements RTT::PropertyIntrospection.
Definition at line 64 of file XMLMarshaller.hpp.
References RTT::Property< T >::get(), RTT::PropertyBase::getDescription(), and RTT::PropertyBase::getName().
virtual void RTT::XMLMarshaller< 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 135 of file XMLMarshaller.hpp.
References RTT::PropertyBag::getProperties().
virtual void RTT::XMLMarshaller< o_stream >::serialize | ( | PropertyBase * | v | ) | [inline, virtual] |
Serialize a property.
v | The property to be serialized. |
Implements RTT::Marshaller.
Definition at line 131 of file XMLMarshaller.hpp.
References RTT::PropertyBase::identify().
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.