Orocos Real-Time Toolkit  2.6.0
Public Member Functions | Protected Member Functions | Protected Attributes
RTT::marsh::CPFMarshaller< std::ostream > Class Template Reference

A class for marshalling a property or propertybag into a component property description, following the CORBA 3 standard. More...

#include <rtt/marsh/CPFMarshaller.hpp>

Inheritance diagram for RTT::marsh::CPFMarshaller< std::ostream >:
RTT::marsh::MarshallInterface RTT::base::PropertyIntrospection RTT::marsh::StreamProcessor< std::ostream > RTT::base::PropertyBagVisitor

List of all members.

Public Member Functions

 CPFMarshaller (std::ostream &os)
 Construct a CPFMarshaller from a stream.
 CPFMarshaller (const std::string &filename)
 Construct a CPFMarshaller from a file.
virtual void serialize (base::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 (std::ostream &_s)
 Set a new Stream.
std::ostream & getStream ()
 Get the current Stream.

Protected Member Functions

template<class T >
void introspect (Property< T > &v)
 Unknown types must decompose theirselves into the primitives.
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

std::ostream * s

Detailed Description

template<>
class RTT::marsh::CPFMarshaller< std::ostream >

A class for marshalling a property or propertybag into a component property description, following the CORBA 3 standard.

See also:
CPFDemarshaller for reading the result back in.

Definition at line 62 of file CPFMarshaller.hpp.


Member Function Documentation

virtual void RTT::marsh::CPFMarshaller< std::ostream >::flush ( ) [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.

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

Get the current Stream.

Returns:
The current Stream.

Definition at line 82 of file StreamProcessor.hpp.

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::CPFMarshaller< std::ostream >::serialize ( base::PropertyBase v) [virtual]

Serialize a property.

Parameters:
vThe property to be serialized.

Implements RTT::marsh::MarshallInterface.

virtual void RTT::marsh::CPFMarshaller< std::ostream >::serialize ( const PropertyBag v) [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.

void RTT::marsh::StreamProcessor< std::ostream >::setStream ( std::ostream &  _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: