Orocos Real-Time Toolkit
2.6.0
|
A class for marshalling a property or propertybag into a component property description, following the CORBA 3 standard. More...
#include <rtt/marsh/CPFMarshaller.hpp>
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 |
A class for marshalling a property or propertybag into a component property description, following the CORBA 3 standard.
Definition at line 62 of file CPFMarshaller.hpp.
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.
Definition at line 82 of file StreamProcessor.hpp.
void RTT::base::PropertyIntrospection::introspect | ( | Property< T > & | v | ) | [inherited] |
Unknown types must decompose theirselves into the primitives.
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] |
The default handler to execute when an unknown type is being decomposed.
Definition at line 49 of file PropertyBagVisitor.cpp.
References RTT::types::TypeInfo::buildProperty(), RTT::types::TypeInfo::decomposeType(), RTT::deletePropertyBag(), RTT::base::PropertyBase::getDataSource(), RTT::base::PropertyBase::getDescription(), RTT::base::PropertyBase::getName(), RTT::base::PropertyBase::getTypeInfo(), RTT::base::PropertyBagVisitor::introspect(), and RTT::types::propertyDecomposition().
Referenced by RTT::base::PropertyIntrospection::introspect_T().
virtual void RTT::marsh::CPFMarshaller< std::ostream >::serialize | ( | base::PropertyBase * | v | ) | [virtual] |
Serialize a property.
v | The 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.
v | The 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.
_s | The stream to be processed. |
Definition at line 73 of file StreamProcessor.hpp.