asdmbinaries::Optional< Enum, EnumHelper > Class Template Reference
[Material related to optional values.]

A class to embed optional information. More...

#include <SDMDataObject.h>

List of all members.

Public Member Functions

 Optional ()
 The empty constructor.
 Optional (Enum literal)
 The full constructor.
bool present () const
 Test of presence.
Enum literal () const
 Returns the optional value.

Private Attributes

bool present_
Enum literal_

Detailed Description

template<class Enum, class EnumHelper>
class asdmbinaries::Optional< Enum, EnumHelper >

A class to embed optional information.

Definition at line 193 of file SDMDataObject.h.


Constructor & Destructor Documentation

template<class Enum, class EnumHelper>
asdmbinaries::Optional< Enum, EnumHelper >::Optional (  )  [inline]

The empty constructor.

To be used whenever an optional value has to be declared as absent.

Definition at line 204 of file SDMDataObject.h.

template<class Enum, class EnumHelper>
asdmbinaries::Optional< Enum, EnumHelper >::Optional ( Enum  literal  )  [inline]

The full constructor.

To be used whenever an optional value has to be declared as present.

Parameters:
literal the value of type Enum to embed in the Optional class.

Definition at line 215 of file SDMDataObject.h.


Member Function Documentation

template<class Enum, class EnumHelper>
Enum asdmbinaries::Optional< Enum, EnumHelper >::literal (  )  const [inline]

Returns the optional value.

Returns:
an Enum
Note:
the returned value is meaningful if and only if present() == true !

Definition at line 235 of file SDMDataObject.h.

template<class Enum, class EnumHelper>
bool asdmbinaries::Optional< Enum, EnumHelper >::present (  )  const [inline]

Test of presence.

Returns:
true (resp. false) if this represents a present (resp. false) optional value.

Definition at line 225 of file SDMDataObject.h.


Member Data Documentation

template<class Enum, class EnumHelper>
Enum asdmbinaries::Optional< Enum, EnumHelper >::literal_ [private]
template<class Enum, class EnumHelper>
bool asdmbinaries::Optional< Enum, EnumHelper >::present_ [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1