RTT::types::TypeMarshaller Class Reference

#include <TypeMarshaller.hpp>

Inheritance diagram for RTT::types::TypeMarshaller:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void * createCookie () const
virtual void * createCookie () const
virtual void deleteCookie (void *cookie) const
virtual void deleteCookie (void *cookie) const
virtual std::pair< void const
*, int > 
fillBlob (base::DataSourceBase::shared_ptr source, void *blob, int size, void *cookie=0) const =0
virtual std::pair< void const
*, int > 
fillBlob (base::DataSourceBase::shared_ptr source, void *blob, int size, void *cookie=0) const =0
virtual unsigned int getSampleSize (base::DataSourceBase::shared_ptr sample, void *cookie=0) const =0
virtual unsigned int getSampleSize (base::DataSourceBase::shared_ptr sample, void *cookie=0) const =0
virtual bool updateFromBlob (const void *blob, int size, base::DataSourceBase::shared_ptr target, void *cookie=0) const =0
virtual bool updateFromBlob (const void *blob, int size, base::DataSourceBase::shared_ptr target, void *cookie=0) const =0

Detailed Description

Objects implementing this interface have the capability to convert data sources to and from a binary representation.

Definition at line 61 of file install/include/rtt/types/TypeMarshaller.hpp.


Member Function Documentation

virtual void* RTT::types::TypeMarshaller::createCookie (  )  const [inline, virtual]

Overload in subclasses for marshallers that need to allocate some internal data. The protocol will call deleteCookie(void*) accordingly

Reimplemented in orogen_transports::MQTypelibMarshaller< T >.

Definition at line 68 of file rtt/types/TypeMarshaller.hpp.

virtual void* RTT::types::TypeMarshaller::createCookie (  )  const [inline, virtual]

Overload in subclasses for marshallers that need to allocate some internal data. The protocol will call deleteCookie(void*) accordingly

Reimplemented in orogen_transports::MQTypelibMarshaller< T >.

Definition at line 68 of file install/include/rtt/types/TypeMarshaller.hpp.

virtual void RTT::types::TypeMarshaller::deleteCookie ( void *  cookie  )  const [inline, virtual]

Called to delete a cookie created with createCookie

Reimplemented in orogen_transports::MQTypelibMarshaller< T >.

Definition at line 70 of file rtt/types/TypeMarshaller.hpp.

virtual void RTT::types::TypeMarshaller::deleteCookie ( void *  cookie  )  const [inline, virtual]

Called to delete a cookie created with createCookie

Reimplemented in orogen_transports::MQTypelibMarshaller< T >.

Definition at line 70 of file install/include/rtt/types/TypeMarshaller.hpp.

virtual std::pair<void const*,int> RTT::types::TypeMarshaller::fillBlob ( base::DataSourceBase::shared_ptr  source,
void *  blob,
int  size,
void *  cookie = 0 
) const [pure virtual]

Create an transportable object for a protocol which contains the value of source. This must be a real-time function which does not allocate memory

Parameters:
source The data to be read
blob Suggested target memory area to write to. In case the type marshaller does not need this, it will return an alternative as a first element in the returned std::pair.
size The size of the memory area pointed by blob
Returns:
Returns (0,0) if the filling failed, otherwise, points to the filled memory area and the effectively written size. The returned pointer may differ from blob, in case blob was not used. The returned size must be lower or equal than size

Implemented in RTT::mqueue::MQSerializationProtocol< T >, RTT::mqueue::MQTemplateProtocol< T >, orogen_transports::MQTypelibMarshaller< T >, RTT::mqueue::MQSerializationProtocol< T >, and RTT::mqueue::MQTemplateProtocol< T >.

virtual std::pair<void const*,int> RTT::types::TypeMarshaller::fillBlob ( base::DataSourceBase::shared_ptr  source,
void *  blob,
int  size,
void *  cookie = 0 
) const [pure virtual]

Create an transportable object for a protocol which contains the value of source. This must be a real-time function which does not allocate memory

Parameters:
source The data to be read
blob Suggested target memory area to write to. In case the type marshaller does not need this, it will return an alternative as a first element in the returned std::pair.
size The size of the memory area pointed by blob
Returns:
Returns (0,0) if the filling failed, otherwise, points to the filled memory area and the effectively written size. The returned pointer may differ from blob, in case blob was not used. The returned size must be lower or equal than size

Implemented in RTT::mqueue::MQSerializationProtocol< T >, RTT::mqueue::MQTemplateProtocol< T >, orogen_transports::MQTypelibMarshaller< T >, RTT::mqueue::MQSerializationProtocol< T >, and RTT::mqueue::MQTemplateProtocol< T >.

virtual unsigned int RTT::types::TypeMarshaller::getSampleSize ( base::DataSourceBase::shared_ptr  sample,
void *  cookie = 0 
) const [pure virtual]
virtual unsigned int RTT::types::TypeMarshaller::getSampleSize ( base::DataSourceBase::shared_ptr  sample,
void *  cookie = 0 
) const [pure virtual]
virtual bool RTT::types::TypeMarshaller::updateFromBlob ( const void *  blob,
int  size,
base::DataSourceBase::shared_ptr  target,
void *  cookie = 0 
) const [pure virtual]

Update target with the contents of blob which is an object of a protocol. The given data source is guaranteed to be an AssignableDataSource

Implemented in RTT::mqueue::MQSerializationProtocol< T >, RTT::mqueue::MQTemplateProtocol< T >, orogen_transports::MQTypelibMarshaller< T >, RTT::mqueue::MQSerializationProtocol< T >, and RTT::mqueue::MQTemplateProtocol< T >.

virtual bool RTT::types::TypeMarshaller::updateFromBlob ( const void *  blob,
int  size,
base::DataSourceBase::shared_ptr  target,
void *  cookie = 0 
) const [pure virtual]

Update target with the contents of blob which is an object of a protocol. The given data source is guaranteed to be an AssignableDataSource

Implemented in RTT::mqueue::MQSerializationProtocol< T >, RTT::mqueue::MQTemplateProtocol< T >, orogen_transports::MQTypelibMarshaller< T >, RTT::mqueue::MQSerializationProtocol< T >, and RTT::mqueue::MQTemplateProtocol< T >.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


rtt
Author(s): RTT Developers
autogenerated on Fri Jan 11 09:50:19 2013