Orocos Real-Time Toolkit  2.9.0
Public Member Functions | List of all members
RTT::marsh::PropertyMarshaller Class Reference

A class for writing a property or propertybag into file. More...

#include <rtt/marsh/PropertyMarshaller.hpp>

Inheritance diagram for RTT::marsh::PropertyMarshaller:
RTT::marsh::MarshallInterface

Public Member Functions

 PropertyMarshaller (const std::string &filename)
 Construct a PropertyMarshaller which writes to a file. More...
 
 ~PropertyMarshaller ()
 
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...
 

Detailed Description

A class for writing a property or propertybag into file.

The file format used by Orocos is the 'Component Property Format'.

See also
PropertyDemarshaller for reading the result back in.

Definition at line 53 of file PropertyMarshaller.hpp.

Constructor & Destructor Documentation

RTT::PropertyMarshaller::PropertyMarshaller ( const std::string &  filename)

Construct a PropertyMarshaller which writes to a file.

Parameters
filename

Definition at line 51 of file PropertyMarshaller.cpp.

References RTT::Error.

RTT::PropertyMarshaller::~PropertyMarshaller ( )

Definition at line 62 of file PropertyMarshaller.cpp.

Member Function Documentation

void RTT::PropertyMarshaller::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.

Definition at line 81 of file PropertyMarshaller.cpp.

References RTT::marsh::MarshallInterface::flush().

void RTT::PropertyMarshaller::serialize ( base::PropertyBase v)
virtual

Serialize a property.

Parameters
vThe property to be serialized.

Implements RTT::marsh::MarshallInterface.

Definition at line 67 of file PropertyMarshaller.cpp.

References RTT::marsh::MarshallInterface::serialize().

void RTT::PropertyMarshaller::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.

Definition at line 74 of file PropertyMarshaller.cpp.

References RTT::marsh::MarshallInterface::serialize().


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