RefleX
Build DDS Applications in Modern C++ without IDL
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
Public Member Functions | List of all members
reflex::TypeManager< T > Class Template Reference

Manage type-specific context, such as typecode, type-support, and dynamic data properties. More...

#include <type_manager.h>

Public Member Functions

 TypeManager (const DDS_DynamicDataTypeProperty_t &props=DDS_DynamicDataTypeProperty_t())
 Create a type manager that uses the argument properties to create all the DynamicData objects. More...
 
 TypeManager (DDSDynamicDataTypeSupport *support)
 Create a type manager that uses the argument DynamicDataTypeSupport to create all the DynamicData objects. More...
 
SafeDynamicData< T > create_dynamicdata (const T &src) const
 
create_instance (const SafeDynamicData< T > &src) const
 
DDS_DynamicDataTypeProperty_t & get_properties ()
 
SafeTypeCode< T > & get_safe_typecode ()
 
DDS_TypeCode * get_typecode ()
 
DDSDynamicDataTypeSupport * get_type_support ()
 
const
DDS_DynamicDataTypeProperty_t & 
get_properties () const
 
const SafeTypeCode< T > & get_safe_typecode () const
 
const DDS_TypeCode * get_typecode () const
 
const DDSDynamicDataTypeSupport * get_type_support () const
 

Detailed Description

template<class T>
class reflex::TypeManager< T >

Manage type-specific context, such as typecode, type-support, and dynamic data properties.

This class manages the type related context necessary to create dynamic data objects from a user-defined type. It is a container of the typecode, type-support for type T. It also encapsulates the DynamicDataType properties used to create dynamic data objects. Instances of the TypeManager class are immutable.

Constructor & Destructor Documentation

template<class T >
reflex::TypeManager< T >::TypeManager ( const DDS_DynamicDataTypeProperty_t &  props = DDS_DynamicDataTypeProperty_t())
inlineexplicit

Create a type manager that uses the argument properties to create all the DynamicData objects.

Parameters
propsProperties that govern DynamicData objects
template<class T >
reflex::TypeManager< T >::TypeManager ( DDSDynamicDataTypeSupport *  support)
inline

Create a type manager that uses the argument DynamicDataTypeSupport to create all the DynamicData objects.

Parameters
supportAn instance of DynamicDataTypeSupport.

Member Function Documentation

template<class T >
SafeDynamicData<T> reflex::TypeManager< T >::create_dynamicdata ( const T &  src) const
inline

Creates a type-safe, exception-safe instance of SafeDynamicData from a source object. This function combines reflex::make_typecode and reflex::write_dynamicdata into one.

Parameters
srcThe source object of type T
Returns
Type-safe, exception-safe instance of SafeDynamicData
See Also
reflex::make_typecode
reflex::write_dynamicdata
Precondition
Type T must be adapted using the RTI_ADAPT_STURCT macro.
template<class T >
T reflex::TypeManager< T >::create_instance ( const SafeDynamicData< T > &  src) const
inline

Creates a instance of T from a SafeDynamicData object.

Parameters
srcThe source SafeDynamicData object
Returns
An instance of type T
See Also
reflex::read_dynamicdata
Precondition
Type T must be default constructible and adapted using the RTI_ADAPT_STURCT macro.
template<class T >
DDS_DynamicDataTypeProperty_t& reflex::TypeManager< T >::get_properties ( )
inline

Return the underlying DynamicData properties.

template<class T >
const DDS_DynamicDataTypeProperty_t& reflex::TypeManager< T >::get_properties ( ) const
inline

Return the underlying DynamicData properties.

template<class T >
SafeTypeCode<T>& reflex::TypeManager< T >::get_safe_typecode ( )
inline

Return the underlying SafeTypeCode object.

template<class T >
const SafeTypeCode<T>& reflex::TypeManager< T >::get_safe_typecode ( ) const
inline

Return the underlying SafeTypeCode object.

template<class T >
DDSDynamicDataTypeSupport* reflex::TypeManager< T >::get_type_support ( )
inline

Return the underlying DynamicDataTypeSupport.

template<class T >
const DDSDynamicDataTypeSupport* reflex::TypeManager< T >::get_type_support ( ) const
inline

Return the underlying DynamicDataTypeSupport.

template<class T >
DDS_TypeCode* reflex::TypeManager< T >::get_typecode ( )
inline

Return the underlying TypeCode object.

template<class T >
const DDS_TypeCode* reflex::TypeManager< T >::get_typecode ( ) const
inline

Return the underlying TypeCode object.


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