RefleX
Build DDS Applications in Modern C++ without IDL
|
A type-safe, exception-safe wrapper for DDS TypeCode. More...
#include <reflex_fwd.h>
Public Member Functions | |
SafeTypeCode (DDS_TypeCode *tc) | |
Construct an SafeTypeCode object that owns the TypeCode. More... | |
SafeTypeCode (const DDS_TypeCode *tc) | |
Construct an SafeTypeCode object that does not own the TypeCode. More... | |
SafeTypeCode (DDS_TypeCodeFactory *fact, DDS_TypeCode *tc) | |
Construct an SafeTypeCode object that owns the TypeCode. More... | |
SafeTypeCode (DDS_TypeCodeFactory *fact, const DDS_TypeCode *tc) | |
Construct an SafeTypeCode object that does not own the TypeCode. More... | |
SafeTypeCode (const SafeTypeCode &safetc) | |
Create a copy of the argument SafeTypeCode. More... | |
SafeTypeCode & | operator= (const SafeTypeCode &rhs) |
Create a copy of the argument SafeTypeCode. More... | |
SafeTypeCode (SafeTypeCode &&src) | |
Moves the ownership of the TypeCode from src to a newly created SafeTypeCode object. The src typecode is set to NULL. More... | |
SafeTypeCode & | operator= (SafeTypeCode &&src) |
Moves the ownership of the TypeCode from src to this object. Deletes the existing TypeCode if owned. The src typecode is set to NULL. More... | |
~SafeTypeCode () | |
Deletes the underlying TypeCode if the object was was constructed using a non-const TypeCode. More... | |
DDS_TypeCode * | get () |
Get the underlying TypeCode. More... | |
const DDS_TypeCode * | get () const |
Get the underlying TypeCode. More... | |
DDS_TypeCode * | release () |
Release the ownership of the underlying TypeCode. The SafeTypeCode object remains usable. More... | |
void | swap (SafeTypeCode &stc) throw () |
Swap the contents of two SafeTypeCode objects. Never throws. More... | |
A type-safe, exception-safe wrapper for DDS TypeCode.
The SafeTypeCode may or may not own the underlying TypeCode object. It distinguishes between owned vs. not-owned via const-ness of the argument TypeCode. const TypeCode objects are not owned whereas non-const TypeCode objects are owned by the SafeTypeCode instance. Note that TypeCode for all fundamental types are const and therefore SafeTypeCode does not assume ownership of them.
Copying SafeTypeCode object may make a deep copy depending upon whether the argument TypeCode was const or not.
|
inlineexplicit |
Construct an SafeTypeCode object that owns the TypeCode.
Use default TypeCodeFactory. I.e., DDS_TypeCodeFactory::get_instance()
|
inlineexplicit |
Construct an SafeTypeCode object that does not own the TypeCode.
Use default TypeCodeFactory. I.e., DDS_TypeCodeFactory::get_instance()
|
inline |
Construct an SafeTypeCode object that owns the TypeCode.
|
inline |
Construct an SafeTypeCode object that does not own the TypeCode.
|
inline |
Create a copy of the argument SafeTypeCode.
The copy is shallow if the argument SafeTypeCode was constructed using a const TypeCode. Makes a deep copy otherwise.
|
inline |
Moves the ownership of the TypeCode from src to a newly created SafeTypeCode object. The src typecode is set to NULL.
|
inline |
Deletes the underlying TypeCode if the object was was constructed using a non-const TypeCode.
|
inline |
Get the underlying TypeCode.
|
inline |
Get the underlying TypeCode.
|
inline |
Create a copy of the argument SafeTypeCode.
The copy is shallow if the argument SafeTypeCode was constructed using a const TypeCode. Makes a deep copy otherwise.
|
inline |
Moves the ownership of the TypeCode from src to this object. Deletes the existing TypeCode if owned. The src typecode is set to NULL.
|
inline |
Release the ownership of the underlying TypeCode. The SafeTypeCode object remains usable.
|
inline |
Swap the contents of two SafeTypeCode objects. Never throws.