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::AutoDynamicData Class Reference

Automatically manages the memory of a DynamicData instance. More...

#include <auto_dd.h>

Inheritance diagram for reflex::AutoDynamicData:
reflex::SafeDynamicData< T >

Public Member Functions

 AutoDynamicData (DDSDynamicDataTypeSupport *typeSupport)
 Create an initialized but unpopulated DynamicData instance from the given type-support. More...
 
 AutoDynamicData (const AutoDynamicData &)
 Create a deep copy. More...
 
AutoDynamicDataoperator= (const AutoDynamicData &src)
 Deep copy of the contents of src in to this. More...
 
 ~AutoDynamicData ()
 Destructor. More...
 
 AutoDynamicData (AutoDynamicData &&src)
 Moves the ownership of DynamicData from src to a newly created AutoDynamicData object. More...
 
AutoDynamicDataoperator= (AutoDynamicData &&src)
 Moves the ownership of DynamicData from src to this. More...
 
void swap (AutoDynamicData &) throw ()
 Swap two AutoDynamicData objects. Does not throw. More...
 
DDS_DynamicData * get ()
 Return the underlying DynamicData instance. More...
 
const DDS_DynamicData * get () const
 Return the underlying DynamicData instance. More...
 

Detailed Description

Automatically manages the memory of a DynamicData instance.

AutoDynamicData behaves like a value-type and therefore copying an AutoDynamicData instance makes a deep copy of the underlying DDS_DynamicData instance. AutoDynamicData is exception-safe but not type-safe. For type-safety, see reflex::SafeDynamicData.

AutoDynamiData may or may not contain meaningful data. It always contains a properly initialized (not necessarily populated) DynamicData instance.

Constructor & Destructor Documentation

REFLEX_INLINE reflex::AutoDynamicData::AutoDynamicData ( DDSDynamicDataTypeSupport *  typeSupport)

Create an initialized but unpopulated DynamicData instance from the given type-support.

The typeSupport object is not owned by AutoDynamicData.

REFLEX_INLINE reflex::AutoDynamicData::AutoDynamicData ( const AutoDynamicData sddi)

Create a deep copy.

REFLEX_INLINE reflex::AutoDynamicData::~AutoDynamicData ( )

Destructor.

REFLEX_INLINE reflex::AutoDynamicData::AutoDynamicData ( AutoDynamicData &&  src)

Moves the ownership of DynamicData from src to a newly created AutoDynamicData object.

The src object no longer owns the DynamicData instance.

Member Function Documentation

REFLEX_INLINE DDS_DynamicData * reflex::AutoDynamicData::get ( )

Return the underlying DynamicData instance.

REFLEX_INLINE const DDS_DynamicData * reflex::AutoDynamicData::get ( ) const

Return the underlying DynamicData instance.

REFLEX_INLINE AutoDynamicData & reflex::AutoDynamicData::operator= ( const AutoDynamicData src)

Deep copy of the contents of src in to this.

REFLEX_INLINE AutoDynamicData & reflex::AutoDynamicData::operator= ( AutoDynamicData &&  src)

Moves the ownership of DynamicData from src to this.

Deletes the existing DynamicData instance in this.

REFLEX_INLINE void reflex::AutoDynamicData::swap ( AutoDynamicData other)
throw (
)

Swap two AutoDynamicData objects. Does not throw.


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