cisst-saw
|
#include <cmnGenericObjectProxy.h>
Public Types | |
typedef cmnGenericObjectProxy < _elementType > | ThisType |
typedef _elementType | value_type |
Public Member Functions | |
cmnGenericObjectProxy (void) | |
cmnGenericObjectProxy (const value_type &data) | |
~cmnGenericObjectProxy (void) | |
ThisType & | operator= (value_type data) |
void | SerializeRaw (std::ostream &outputStream) const |
void | DeSerializeRaw (std::istream &inputStream) |
virtual void | ToStream (std::ostream &outputStream) const |
virtual void | ToStreamRaw (std::ostream &outputStream, const char CMN_UNUSED(delimiter)= ' ', bool headerOnly=false, const std::string &headerPrefix="") const |
virtual bool | FromStreamRaw (std::istream &inputStream, const char CMN_UNUSED(delimiter)= ' ') |
operator value_type & (void) | |
operator const value_type & (void) const | |
![]() | |
virtual | ~cmnGenericObject (void) |
virtual const cmnClassServicesBase * | Services (void) const =0 |
bool | ReconstructFrom (const cmnGenericObject &other) |
std::string | ToString (void) const |
virtual void | ToStreamRaw (std::ostream &outputStream, const char delimiter= ' ', bool headerOnly=false, const std::string &headerPrefix="") const |
virtual bool | FromStreamRaw (std::istream &inputStream, const char delimiter= ' ') |
virtual cmnLogger::StreamBufType * | GetLogMultiplexer (void) const |
virtual size_t | ScalarNumber (void) const |
virtual bool | ScalarNumberIsFixed (void) const |
virtual double | Scalar (const size_t CMN_UNUSED(index)) const throw (std::out_of_range) |
virtual std::string | ScalarDescription (const size_t CMN_UNUSED(index), const std::string &CMN_UNUSED(userDescription)) const |
Public Attributes | |
value_type | Data |
Proxy class used to create a simple cmnGenericObject, i.e. data object with a registered type, dynamic creation, serialization and de-serialization. The proxy object contains one data member of the actual type provided as a template parameter.
For example, to create a cmnGenericObject from an existing type, one would have to specialize cmnGenericObjectProxy as follows in the header file:
It is also required to instantiate the associated services in the compiled code (.cpp) file with:
_elementType | The actual type for which we want to provide a proxy object. |
typedef cmnGenericObjectProxy<_elementType> cmnGenericObjectProxy< _elementType >::ThisType |
typedef _elementType cmnGenericObjectProxy< _elementType >::value_type |
|
inline |
Default constructor. The data member is initialized using its default constructor.
|
inline |
Conversion constructor. This allows to construct the proxy object using an object of the actual type.
|
inline |
|
inlinevirtual |
DeSerialization. Relies on the specialization, if any, of cmnDeSerializeRaw.
Reimplemented from cmnGenericObject.
|
inlinevirtual |
From stream raw data.
|
inline |
|
inline |
Cast operator. This allows to assign to an object of the actual type without explicitly referencing the public data member "Data".
|
inline |
Conversion assignment. This allows to assign from an object of the actual type without explicitly referencing the public data member "Data".
|
inlinevirtual |
Serialization. Relies on the specialization, if any, of cmnSerializeRaw.
Reimplemented from cmnGenericObject.
|
inlinevirtual |
To stream method. Uses the default << operator as defined for the actual type.
Reimplemented from cmnGenericObject.
|
inlinevirtual |
To stream raw data.
value_type cmnGenericObjectProxy< _elementType >::Data |