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

#include <CPFMarshaller.hpp>

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

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)
 
- Public Member Functions inherited from RTT::marsh::MarshallInterface
virtual ~MarshallInterface ()
 
- Public Member Functions inherited from RTT::marsh::StreamProcessor< std::ostream >
std::ostream & getStream ()
 
void setStream (std::ostream &_s)
 
 StreamProcessor (std::ostream &_s)
 
 StreamProcessor (std::ostream *_s)
 

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< long long > &v)
 
virtual void introspect (Property< unsigned long long > &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
 

Additional Inherited Members

- Protected Member Functions inherited from RTT::base::PropertyIntrospection
void introspect_T (PropertyBase *p)
 
template<class T >
void introspect (Property< T > &v)
 
virtual ~PropertyIntrospection ()
 
- Protected Member Functions inherited from RTT::base::PropertyBagVisitor
bool introspectAndDecompose (PropertyBase *t)
 
virtual ~PropertyBagVisitor ()
 
- Protected Member Functions inherited from RTT::marsh::StreamProcessor< std::ostream >
std::ostream & getStream ()
 
void setStream (std::ostream &_s)
 
 StreamProcessor (std::ostream &_s)
 
 StreamProcessor (std::ostream *_s)
 
- Protected Attributes inherited from RTT::marsh::StreamProcessor< std::ostream >
std::ostream * s
 

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)
privatevirtual

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)
privatevirtual

introspect a property of type bool.

Parameters
vThe property to be introspected.

Implements RTT::base::PropertyIntrospection.

virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect ( Property< char > &  v)
privatevirtual

introspect a property of type char.

Parameters
vThe property to be introspected.

Implements RTT::base::PropertyIntrospection.

virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect ( Property< unsigned char > &  v)
privatevirtual
virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect ( Property< int > &  v)
privatevirtual

introspect a property of type int.

Parameters
vThe property to be introspected.

Implements RTT::base::PropertyIntrospection.

virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect ( Property< unsigned int > &  v)
privatevirtual

introspect a property of type unsigned int.

Parameters
vThe property to be introspected.

Implements RTT::base::PropertyIntrospection.

virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect ( Property< short > &  v)
privatevirtual
virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect ( Property< unsigned short > &  v)
privatevirtual
virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect ( Property< long long > &  v)
privatevirtual

introspect a property of type long long.

Parameters
vThe property to be introspected.

Implements RTT::base::PropertyIntrospection.

virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect ( Property< unsigned long long > &  v)
privatevirtual

introspect a property of type unsigned long long.

Parameters
vThe property to be introspected.

Implements RTT::base::PropertyIntrospection.

virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect ( Property< float > &  v)
privatevirtual
virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect ( Property< double > &  v)
privatevirtual

introspect a property of type double.

Parameters
vThe property to be introspected.

Implements RTT::base::PropertyIntrospection.

virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect ( Property< std::string > &  v)
privatevirtual

introspect a property of type string.

Parameters
vThe property to be introspected.

Implements RTT::base::PropertyIntrospection.

virtual void RTT::marsh::CPFMarshaller< std::ostream >::introspect ( Property< PropertyBag > &  p)
privatevirtual

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 Tue Jun 25 2019 19:33:45