#include <CPFMarshaller.hpp>
Public Member Functions | |
CPFMarshaller (std::ostream &os) | |
CPFMarshaller (const std::string &filename) | |
virtual void | flush () |
virtual void | serialize (base::PropertyBase *v) |
virtual void | serialize (const PropertyBag &v) |
Private Member Functions | |
template<class T > | |
void | doWrite (const Property< T > &v, const std::string &type) |
void | doWrite (const Property< std::string > &v, const std::string &type) |
void | doWrite (const Property< char > &v, const std::string &type) |
std::string | escape (std::string s) |
virtual void | introspect (base::PropertyBase *pb) |
virtual void | introspect (Property< bool > &v) |
virtual void | introspect (Property< char > &v) |
virtual void | introspect (Property< unsigned char > &v) |
virtual void | introspect (Property< int > &v) |
virtual void | introspect (Property< unsigned int > &v) |
virtual void | introspect (Property< short > &v) |
virtual void | introspect (Property< unsigned short > &v) |
virtual void | introspect (Property< float > &v) |
virtual void | introspect (Property< double > &v) |
virtual void | introspect (Property< std::string > &v) |
virtual void | introspect (Property< PropertyBag > &b) |
Private Attributes | |
std::string | indent |
std::fstream | mfile |
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.
void RTT::marsh::CPFMarshaller< std::ostream >::doWrite | ( | const Property< T > & | v, |
const std::string & | type | ||
) | [private] |
Write-out formatting of a property.
void RTT::marsh::CPFMarshaller< std::ostream >::doWrite | ( | const Property< std::string > & | v, |
const std::string & | type | ||
) | [private] |
Specialisation in case of a string. Escapes the string sequence and should check for UTF-8
void RTT::marsh::CPFMarshaller< std::ostream >::doWrite | ( | const Property< char > & | v, |
const std::string & | type | ||
) | [private] |
Specialisation in case of a char. Escapes the char and should check for UTF-8. A null character is translated into
std::string RTT::marsh::CPFMarshaller< std::ostream >::escape | ( | std::string | s | ) | [private] |
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.
virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect | ( | base::PropertyBase * | p | ) | [private, virtual] |
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.
Reimplemented from RTT::base::PropertyIntrospection.
virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect | ( | Property< bool > & | v | ) | [private, virtual] |
introspect a property of type bool.
v | The property to be introspectd. |
Implements RTT::base::PropertyIntrospection.
virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect | ( | Property< char > & | v | ) | [private, virtual] |
introspect a property of type char.
v | The property to be introspectd. |
Implements RTT::base::PropertyIntrospection.
virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect | ( | Property< unsigned char > & | v | ) | [private, virtual] |
virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect | ( | Property< int > & | v | ) | [private, virtual] |
introspect a property of type int.
v | The property to be introspectd. |
Implements RTT::base::PropertyIntrospection.
virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect | ( | Property< unsigned int > & | v | ) | [private, virtual] |
introspect a property of type unsigned int.
v | The property to be introspectd. |
Implements RTT::base::PropertyIntrospection.
virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect | ( | Property< short > & | v | ) | [private, virtual] |
virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect | ( | Property< unsigned short > & | v | ) | [private, virtual] |
virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect | ( | Property< float > & | v | ) | [private, virtual] |
virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect | ( | Property< double > & | v | ) | [private, virtual] |
introspect a property of type double.
v | The property to be introspectd. |
Implements RTT::base::PropertyIntrospection.
virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect | ( | Property< std::string > & | v | ) | [private, virtual] |
introspect a property of type string.
v | The property to be introspectd. |
Implements RTT::base::PropertyIntrospection.
virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect | ( | Property< PropertyBag > & | p | ) | [private, virtual] |
Callback for a Property which is a PropertyBag.
Implements RTT::base::PropertyBagVisitor.
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.
std::string RTT::marsh::CPFMarshaller< std::ostream >::indent [private] |
Definition at line 87 of file CPFMarshaller.hpp.
std::fstream RTT::marsh::CPFMarshaller< std::ostream >::mfile [private] |
Definition at line 67 of file CPFMarshaller.hpp.