casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
asdmbinaries::Optional< Enum, EnumHelper > Class Template Reference

A class to embed optional information. More...

#include <SDMDataObject.h>

Public Member Functions

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

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 171 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 182 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
literalthe value of type Enum to embed in the Optional class.

Definition at line 193 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 213 of file SDMDataObject.h.

Referenced by asdmbinaries::Optional< SpectralResolutionTypeMod::SpectralResolutionType, CSpectralResolutionType >::Optional().

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 203 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: