Orocos Real-Time Toolkit  2.9.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
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

Public Member Functions

 CPFMarshaller (std::ostream &os)
 Construct a CPFMarshaller from a stream. More...
 
 CPFMarshaller (const std::string &filename)
 Construct a CPFMarshaller from a file. More...
 
virtual void serialize (base::PropertyBase *v)
 Serialize a property. More...
 
virtual void serialize (const PropertyBag &v)
 Serialize the contents of a property bag with headers and footers. More...
 
virtual void flush ()
 Flush all buffers, write footers. More...
 
void setStream (std::ostream &_s)
 Set a new Stream. More...
 
std::ostream & getStream ()
 Get the current Stream. More...
 

Protected Member Functions

template<class T >
void introspect (Property< T > &v)
 Unknown types must decompose theirselves into the primitives. More...
 
void introspect_T (PropertyBase *p)
 This function is called for any Property unknown to the introspection interface. More...
 
bool introspectAndDecompose (PropertyBase *t)
 The default handler to execute when an unknown type is being decomposed. More...
 

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.

Constructor & Destructor Documentation

RTT::marsh::CPFMarshaller< std::ostream >::CPFMarshaller ( std::ostream &  os)

Construct a CPFMarshaller from a stream.

RTT::marsh::CPFMarshaller< std::ostream >::CPFMarshaller ( const std::string &  filename)

Construct a CPFMarshaller from a file.

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 ( )
inlineinherited

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)
protectedinherited

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.

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

bool RTT::PropertyBagVisitor::introspectAndDecompose ( PropertyBase t)
protectedinherited
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)
inlineinherited

Set a new Stream.

Parameters
_sThe stream to be processed.

Definition at line 73 of file StreamProcessor.hpp.

Member Data Documentation

std::ostream * RTT::marsh::StreamProcessor< std::ostream >::s
protectedinherited

Definition at line 88 of file StreamProcessor.hpp.


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