Orocos Real-Time Toolkit  2.5.0
Public Member Functions | Protected Member Functions | Protected Attributes
RTT::marsh::XMLRPCMarshaller< output_stream > Class Template Reference

Outputs a Property or PropertyBag into a text stream in the XML-RPC format. More...

#include <rtt/marsh/XMLRPCMarshaller.hpp>

Inheritance diagram for RTT::marsh::XMLRPCMarshaller< output_stream >:
RTT::marsh::MarshallInterface RTT::base::PropertyIntrospection RTT::marsh::StreamProcessor< output_stream > RTT::base::PropertyBagVisitor

List of all members.

Public Member Functions

 XMLRPCMarshaller (output_stream &os)
virtual void serialize (const Property< bool > &v)
virtual void serialize (const Property< char > &v)
virtual void serialize (const Property< int > &v)
virtual void serialize (const Property< double > &v)
virtual void serialize (const Property< std::string > &v)
virtual void serialize (const PropertyBag &v)
 Serialize the contents of a property bag with headers and footers.
virtual void serialize (const Property< PropertyBag > &b)
virtual void introspect (const Property< bool > &v)
virtual void introspect (const Property< char > &v)
virtual void introspect (const Property< int > &v)
virtual void introspect (const Property< double > &v)
virtual void introspect (const Property< std::string > &v)
virtual void introspect (const Property< PropertyBag > &v)
virtual void flush ()
 Flush all buffers, write footers.
virtual void serialize (base::PropertyBase *v)=0
 Serialize a property.
virtual void introspect (Property< bool > &v)=0
 introspect a property of type bool.
virtual void introspect (Property< char > &v)=0
 introspect a property of type char.
virtual void introspect (Property< int > &v)=0
 introspect a property of type int.
virtual void introspect (Property< unsigned int > &v)=0
 introspect a property of type unsigned int.
virtual void introspect (Property< double > &v)=0
 introspect a property of type double.
virtual void introspect (Property< std::string > &v)=0
 introspect a property of type string.
template<class T >
void introspect (Property< T > &v)
 Unknown types must decompose theirselves into the primitives.
virtual void introspect (Property< PropertyBag > &p)=0
 Callback for a Property which is a PropertyBag.
void setStream (output_stream &_s)
 Set a new Stream.
output_stream & getStream ()
 Get the current Stream.

Protected Member Functions

virtual void introspect (PropertyBase *p)
 Fall-back function of the last resort when the type is not decomposable and not known to the introspection interface.
void introspect_T (PropertyBase *p)
 This function is called for any Property unknown to the introspection interface.
bool introspectAndDecompose (PropertyBase *t)
 The default handler to execute when an unknown type is being decomposed.

Protected Attributes

output_stream * s

Detailed Description

template<typename output_stream>
class RTT::marsh::XMLRPCMarshaller< output_stream >

Outputs a Property or PropertyBag into a text stream in the XML-RPC format.

Definition at line 61 of file XMLRPCMarshaller.hpp.


Member Function Documentation

template<typename output_stream >
virtual void RTT::marsh::XMLRPCMarshaller< output_stream >::flush ( ) [inline, virtual]

Flush all buffers, write footers.

Instructs the MarshallInterface 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::marsh::MarshallInterface.

Definition at line 161 of file XMLRPCMarshaller.hpp.

output_stream & RTT::marsh::StreamProcessor< output_stream >::getStream ( ) [inline, inherited]

Get the current Stream.

Returns:
The current Stream.

Definition at line 82 of file StreamProcessor.hpp.

void RTT::PropertyIntrospection::introspect ( PropertyBase p) [protected, virtual, inherited]

Fall-back function of the last resort when the type is not decomposable and not known to the introspection interface.

Called by introspect_T and does nothing by default. You can put code inhere to handle unknown types.

Implements RTT::base::PropertyBagVisitor.

Definition at line 58 of file Property.cpp.

Referenced by RTT::extras::decomposeProperty(), RTT::Property< T >::identify(), and RTT::base::PropertyIntrospection::introspect_T().

virtual void RTT::base::PropertyIntrospection::introspect ( Property< bool > &  v) [pure virtual, inherited]

introspect a property of type bool.

Parameters:
vThe property to be introspectd.
virtual void RTT::base::PropertyIntrospection::introspect ( Property< char > &  v) [pure virtual, inherited]

introspect a property of type char.

Parameters:
vThe property to be introspectd.
virtual void RTT::base::PropertyIntrospection::introspect ( Property< int > &  v) [pure virtual, inherited]

introspect a property of type int.

Parameters:
vThe property to be introspectd.
virtual void RTT::base::PropertyIntrospection::introspect ( Property< unsigned int > &  v) [pure virtual, inherited]

introspect a property of type unsigned int.

Parameters:
vThe property to be introspectd.
virtual void RTT::base::PropertyIntrospection::introspect ( Property< double > &  v) [pure virtual, inherited]

introspect a property of type double.

Parameters:
vThe property to be introspectd.
virtual void RTT::base::PropertyIntrospection::introspect ( Property< std::string > &  v) [pure virtual, inherited]

introspect a property of type string.

Parameters:
vThe property to be introspectd.
template<class T >
void RTT::base::PropertyIntrospection::introspect ( Property< T > &  v) [inherited]

Unknown types must decompose theirselves into the primitives.

See also:
types::TemplateTypeInfo

Definition at line 50 of file PropertyIntrospection.inl.

References RTT::base::PropertyIntrospection::introspect_T().

void RTT::PropertyIntrospection::introspect_T ( PropertyBase p) [protected, inherited]

This function is called for any Property unknown to the introspection interface.

It will basically call the generic decomposition function, and if that fails, pass p to introspect() where the subclass has a last chance to handle it.

Definition at line 63 of file Property.cpp.

References RTT::base::PropertyIntrospection::introspect(), and RTT::base::PropertyBagVisitor::introspectAndDecompose().

Referenced by RTT::base::PropertyIntrospection::introspect().

bool RTT::PropertyBagVisitor::introspectAndDecompose ( PropertyBase t) [protected, inherited]
virtual void RTT::marsh::MarshallInterface::serialize ( base::PropertyBase v) [pure virtual, inherited]

Serialize a property.

Parameters:
vThe property to be serialized.

Implemented in RTT::marsh::CPFMarshaller< std::ostream >, and RTT::marsh::PropertyMarshaller.

Referenced by RTT::marsh::PropertyMarshaller::serialize().

template<typename output_stream >
virtual void RTT::marsh::XMLRPCMarshaller< output_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:
vThe property bag to be serialized.

Implements RTT::marsh::MarshallInterface.

Definition at line 100 of file XMLRPCMarshaller.hpp.

References RTT::PropertyBag::getProperties().

void RTT::marsh::StreamProcessor< output_stream >::setStream ( output_stream &  _s) [inline, inherited]

Set a new Stream.

Parameters:
_sThe stream to be processed.

Definition at line 73 of file StreamProcessor.hpp.


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