DDS-PSM-C++  1.0
ISO C++ API for OpenSplice DDS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Member Functions | List of all members
dds::core::optional< T, DELEGATE > Class Template Reference

#include <Optional.hpp>

Inheritance diagram for dds::core::optional< T, DELEGATE >:
Inheritance graph
[legend]

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-> ()
 
Valueoperator= (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_
 

Detailed Description

template<typename T, template< typename Q > class DELEGATE>
class dds::core::optional< T, DELEGATE >

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.

Constructor & Destructor Documentation

template<typename T , template< typename Q > class DELEGATE>
dds::core::optional< T, DELEGATE >::optional ( const T &  t)

Member Function Documentation

template<typename T , template< typename Q > class DELEGATE>
const T& dds::core::optional< T, DELEGATE >::get ( ) const

Get the attribute. An exception is thrown if the attribute is not set.

template<typename T , template< typename Q > class DELEGATE>
T& dds::core::optional< T, DELEGATE >::get ( )

Get the attribute. An exception is thrown if the attribute is not set.

template<typename T , template< typename Q > class DELEGATE>
bool dds::core::optional< T, DELEGATE >::is_set ( ) const

Returns true only if the attribute is set.

template<typename T , template< typename Q > class DELEGATE>
void dds::core::optional< T, DELEGATE >::reset ( )

Reset the attribute


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