DDS-PSM-C++ 1.0 ISO C++ API for OpenSplice DDS |
#include <Optional.hpp>
Public Member Functions | |
optional (const T &t) | |
const T & | get () const |
T & | get () |
bool | is_set () const |
void | reset () |
Public Member Functions inherited from dds::core::Value< DELEGATE< T > > | |
Value (const ARG &arg) | |
Value (const ARG1 &arg1, const ARG2 &arg2) | |
Value (const ARG1 &arg1, const ARG2 &arg2, const ARG3 &arg3) | |
Value (const ARG1 &arg1, const ARG2 &arg2, const ARG3 &arg3, const ARG4 &arg4) | |
Value (const ARG1 &arg1, const ARG2 &arg2, const ARG3 &arg3, const ARG4 &arg4, const ARG5 &arg5) | |
Value (const ARG1 &arg1, const ARG2 &arg2, const ARG3 &arg3, const ARG4 &arg4, const ARG5 &arg5, const ARG6 &arg6) | |
~Value () | |
const DELEGATE< T > & | delegate () const |
DELEGATE< T > & | delegate () |
operator const DELEGATE< T > & () const | |
operator DELEGATE< T > & () | |
bool | operator!= (const Value &other) const |
const DELEGATE< T > * | operator-> () const |
DELEGATE< T > * | operator-> () |
Value & | operator= (const Value &other) |
bool | operator== (const Value &other) const |
Additional Inherited Members | |
Protected Member Functions inherited from dds::core::Value< DELEGATE< T > > | |
Value () | |
Value (const Value &p) | |
Protected Attributes inherited from dds::core::Value< DELEGATE< T > > | |
DELEGATE< T > | d_ |
The optional class is used to wrap attributes annotated with the annotation. This class provides a simple and safe way of accessing, setting and resetting the stored attribute.
Definition at line 31 of file Optional.hpp.
dds::core::optional< T, DELEGATE >::optional | ( | const T & | t | ) |
const T& dds::core::optional< T, DELEGATE >::get | ( | ) | const |
Get the attribute. An exception is thrown if the attribute is not set.
T& dds::core::optional< T, DELEGATE >::get | ( | ) |
Get the attribute. An exception is thrown if the attribute is not set.
bool dds::core::optional< T, DELEGATE >::is_set | ( | ) | const |
Returns true only if the attribute is set.
void dds::core::optional< T, DELEGATE >::reset | ( | ) |
Reset the attribute