libcrn  3.9.5
A document image processing library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
crn::Option< T > Class Template Reference

A class to store an optional value. More...

#include <CRNOption.h>

Public Member Functions

constexpr Option () noexcept
 Default constructor. More...
 
 Option (const T &value)
 Constructor from value. More...
 
 Option (const Option &o)
 Copy constructor. More...
 
 Option (Option &&o) noexcept
 
Optionoperator= (const Option &o)
 Copy operator. More...
 
Optionoperator= (Option &&o) noexcept
 
 ~Option ()
 Destructor. More...
 
 operator bool () const noexcept
 Is the option set? More...
 
T & Get () noexcept
 Value access (undefined behaviour if the value is not set) More...
 
const T & Get () const noexcept
 Value access (undefined behaviour if the value is not set) More...
 
T & operator* () noexcept
 Value access (undefined behaviour if the value is not set) More...
 
const T & operator* () const noexcept
 Value access (undefined behaviour if the value is not set) More...
 
T * operator-> () noexcept
 Method access (undefined behaviour if the value is not set) More...
 
const T * operator-> () const noexcept
 Method access (undefined behaviour if the value is not set) More...
 

Detailed Description

template<typename T>
class crn::Option< T >

A class to store an optional value.

A class to store an optional value

Definition at line 33 of file CRNOption.h.

Constructor & Destructor Documentation

template<typename T>
constexpr crn::Option< T >::Option ( )
inlinenoexcept

Default constructor.

Definition at line 37 of file CRNOption.h.

template<typename T>
crn::Option< T >::Option ( const T &  value)
inline

Constructor from value.

Definition at line 39 of file CRNOption.h.

template<typename T>
crn::Option< T >::Option ( const Option< T > &  o)
inline

Copy constructor.

Definition at line 41 of file CRNOption.h.

template<typename T>
crn::Option< T >::Option ( Option< T > &&  o)
inlinenoexcept

Definition at line 46 of file CRNOption.h.

template<typename T>
crn::Option< T >::~Option ( )
inline

Destructor.

Definition at line 61 of file CRNOption.h.

Member Function Documentation

template<typename T>
T& crn::Option< T >::Get ( )
inlinenoexcept

Value access (undefined behaviour if the value is not set)

Definition at line 65 of file CRNOption.h.

template<typename T>
const T& crn::Option< T >::Get ( ) const
inlinenoexcept

Value access (undefined behaviour if the value is not set)

Definition at line 67 of file CRNOption.h.

template<typename T>
crn::Option< T >::operator bool ( ) const
inlinenoexcept

Is the option set?

Definition at line 63 of file CRNOption.h.

template<typename T>
T& crn::Option< T >::operator* ( )
inlinenoexcept

Value access (undefined behaviour if the value is not set)

Definition at line 69 of file CRNOption.h.

template<typename T>
const T& crn::Option< T >::operator* ( ) const
inlinenoexcept

Value access (undefined behaviour if the value is not set)

Definition at line 71 of file CRNOption.h.

template<typename T>
T* crn::Option< T >::operator-> ( )
inlinenoexcept

Method access (undefined behaviour if the value is not set)

Definition at line 73 of file CRNOption.h.

template<typename T>
const T* crn::Option< T >::operator-> ( ) const
inlinenoexcept

Method access (undefined behaviour if the value is not set)

Definition at line 75 of file CRNOption.h.

template<typename T>
Option& crn::Option< T >::operator= ( const Option< T > &  o)
inline

Copy operator.

Definition at line 48 of file CRNOption.h.

template<typename T>
Option& crn::Option< T >::operator= ( Option< T > &&  o)
inlinenoexcept

Definition at line 59 of file CRNOption.h.


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