Orocos Real-Time Toolkit
2.9.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. 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 |
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.
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.
|
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.
|
inlineinherited |
Get the current Stream.
Definition at line 82 of file StreamProcessor.hpp.
|
inherited |
Unknown types must decompose theirselves into the primitives.
Definition at line 50 of file PropertyIntrospection.inl.
References RTT::base::PropertyIntrospection::introspect_T().
|
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().
|
protectedinherited |
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::marsh::PropertyBagIntrospector::introspect().
|
virtual |
Serialize a property.
v | The property to be serialized. |
Implements RTT::marsh::MarshallInterface.
|
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.
|
inlineinherited |
Set a new Stream.
_s | The stream to be processed. |
Definition at line 73 of file StreamProcessor.hpp.
|
protectedinherited |
Definition at line 88 of file StreamProcessor.hpp.