RTT::XMLMarshaller< o_stream > Class Template Reference

Marshalls a PropertyBag to a non standard XML format. More...

#include <rtt/marsh/XMLMarshaller.hpp>

Inheritance diagram for RTT::XMLMarshaller< o_stream >:
RTT::Marshaller RTT::PropertyIntrospection RTT::StreamProcessor< o_stream > RTT::PropertyBagVisitor

List of all members.

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

Detailed Description

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

Marshalls a PropertyBag to a non standard XML format.

Warning:
: No Orocos class exists yet which can read the XML data back in.

Definition at line 53 of file XMLMarshaller.hpp.


Member Function Documentation

template<typename o_stream >
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.

Returns:
The current Stream.

Definition at line 81 of file StreamProcessor.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::XMLMarshaller< o_stream >::introspect ( Property< std::string > &  v  )  [inline, protected, virtual]

introspect a property of type string.

Parameters:
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().

template<typename o_stream >
virtual void RTT::XMLMarshaller< o_stream >::introspect ( Property< double > &  v  )  [inline, protected, virtual]

introspect a property of type double.

Parameters:
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().

template<typename o_stream >
virtual void RTT::XMLMarshaller< o_stream >::introspect ( Property< unsigned int > &  v  )  [inline, protected, virtual]

introspect a property of type unsigned int.

Parameters:
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().

template<typename o_stream >
virtual void RTT::XMLMarshaller< o_stream >::introspect ( Property< int > &  v  )  [inline, protected, virtual]

introspect a property of type int.

Parameters:
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().

template<typename o_stream >
virtual void RTT::XMLMarshaller< o_stream >::introspect ( Property< char > &  v  )  [inline, protected, virtual]

introspect a property of type char.

Parameters:
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().

template<typename o_stream >
virtual void RTT::XMLMarshaller< o_stream >::introspect ( Property< bool > &  v  )  [inline, protected, virtual]

introspect a property of type bool.

Parameters:
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().

template<typename o_stream >
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.

Parameters:
v The property bag to be serialized.

Implements RTT::Marshaller.

Definition at line 135 of file XMLMarshaller.hpp.

References RTT::PropertyBag::getProperties().

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

Serialize a property.

Parameters:
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.

Parameters:
_s The stream to be processed.

Definition at line 72 of file StreamProcessor.hpp.


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