Public Member Functions | Private Member Functions | Private Attributes
RTT::marsh::CPFMarshaller< std::ostream > Class Template Reference

#include <CPFMarshaller.hpp>

Inheritance diagram for RTT::marsh::CPFMarshaller< std::ostream >:
Inheritance graph
[legend]

List of all members.

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

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

template<class T >
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.

Parameters:
vThe 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.

Parameters:
vThe 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.

Parameters:
vThe 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.

Parameters:
vThe 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.

Parameters:
vThe 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.

Parameters:
vThe 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.

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.


Member Data Documentation

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.


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


rtt
Author(s): RTT Developers
autogenerated on Fri Sep 9 2016 04:02:20