RefleX
Build DDS Applications in Modern C++ without IDL
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
Namespaces | Classes | Functions
reflex Namespace Reference

The top-level namespace for all the RefleX APIs. More...

Namespaces

 codegen
 RefleX macros in adapt_macros.h expand static information of user-defined types to this namespace.
 
 match
 Contains types to adapt types of members of structured type to an existing TypeCode.
 
 meta
 Includes C++ compile-time meta-programming facilities.
 
 pub
 Contains generic data publisher for adapted types.
 
 sub
 Contains generic data subscriber for adapted types.
 
 type_traits
 Contains customizable type traits for user-defined types.
 

Classes

class  AutoDynamicData
 Automatically manages the memory of a DynamicData instance. More...
 
class  SafeDynamicData
 Typesafe, exception-safe, poulated DynamicData. More...
 
class  SafeTypeCode
 A type-safe, exception-safe wrapper for DDS TypeCode. More...
 
class  TypeManager
 Manage type-specific context, such as typecode, type-support, and dynamic data properties. More...
 

Functions

template<class T >
void write_dynamicdata (DDS_DynamicData &dest, const T &src)
 Copies source data into the destination DDS_DynamicData instance. More...
 
template<class T >
void write_dynamicdata (AutoDynamicData &dest, const T &src)
 Copies source data into the destination DDS_DynamicData instance. More...
 
template<class T >
SafeTypeCode< T > make_typecode (const char *name=0)
 Creates a TypeCode for structured type T. More...
 
template<class T >
void read_dynamicdata (T &dest, const DDS_DynamicData &src)
 Extracts data out from the source DDS_DynamicData instance and copies into the destination object of type T. More...
 
template<class T >
void read_dynamicdata (T &dest, const AutoDynamicData &src)
 Extracts data out from the AutoDynamicData instance and copies into the destinatin object of type T. More...
 
void swap (AutoDynamicData &lhs, AutoDynamicData &rhs) throw ()
 Swap the contents of two AutoDynamicData instances. Never throws. More...
 
template<class T >
void swap (SafeDynamicData< T > &lhs, SafeDynamicData< T > &rhs) throw ()
 Swap the contents of two SafeDynamicData objects. Never throws. More...
 
template<class T >
void swap (SafeTypeCode< T > &lhs, SafeTypeCode< T > &rhs) throw ()
 Swap the contents of two SafeTypeCode objects. Never throws. More...
 

Detailed Description

The top-level namespace for all the RefleX APIs.

Function Documentation

template<class T >
SafeTypeCode< T > reflex::make_typecode ( const char *  name = 0)

Creates a TypeCode for structured type T.

Parameters
nameOptional name for the top-level struct type. If none is provided, the unqualified name of type T is used.
Returns
The TypeCode for type T wrapped in a SafeTypeCode object.
Precondition
Type T must be adapted using the RTI_ADAPT_STURCT macro.
template<class T >
void reflex::read_dynamicdata ( T &  dest,
const DDS_DynamicData &  src 
)

Extracts data out from the source DDS_DynamicData instance and copies into the destination object of type T.

Parameters
srcThe source DDS_DynamicData.
destThe destination object of type T.
See Also
reflex::write_dynamicdata
Precondition
Type T must be adapted using the RTI_ADAPT_STURCT macro.
template<class T >
void reflex::read_dynamicdata ( T &  dest,
const AutoDynamicData &  src 
)

Extracts data out from the AutoDynamicData instance and copies into the destinatin object of type T.

Parameters
srcThe source DDS_DynamicData.
destThe destination object of type T.
See Also
reflex::write_dynamicdata
Precondition
Type T must be adapted using the RTI_ADAPT_STURCT macro.
template<class T >
void reflex::swap ( SafeDynamicData< T > &  lhs,
SafeDynamicData< T > &  rhs 
)
throw (
)

Swap the contents of two SafeDynamicData objects. Never throws.

template<class T >
void reflex::swap ( SafeTypeCode< T > &  lhs,
SafeTypeCode< T > &  rhs 
)
throw (
)

Swap the contents of two SafeTypeCode objects. Never throws.

REFLEX_INLINE void reflex::swap ( AutoDynamicData &  lhs,
AutoDynamicData &  rhs 
)
throw (
)

Swap the contents of two AutoDynamicData instances. Never throws.

Swap contents. Never throws.

template<class T >
void reflex::write_dynamicdata ( DDS_DynamicData &  dest,
const T &  src 
)

Copies source data into the destination DDS_DynamicData instance.

Parameters
srcThe source object
destThe DDS_DynamicData instance that will be populated
Returns
Nothing
See Also
reflex::make_typecode
Precondition
The TypeCode for the DDS_DynamicData instance must be generated by reflex::make_typecode.
template<class T >
void reflex::write_dynamicdata ( AutoDynamicData &  dest,
const T &  src 
)

Copies source data into the destination DDS_DynamicData instance.

Parameters
srcThe source object
destThe instance that will be populated
Returns
Nothing
Precondition
The TypeCode for the underlying DDS_DynamicData instance must be generated by reflex::make_typecode.