Multilevel Deduplication Engine (MDE)
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
mde::OptionalRef< T > Class Template Reference

Describes an optional reference of some type T. The value may either be present or absent. More...

#include <mde_common.hpp>

Public Member Functions

 OptionalRef (const T &value)
 
bool is_present () const
 Informs if the value is present.
 
const T & get ()
 Gets the underlying value. Throws an exception if it is absent.
 

Static Public Member Functions

static OptionalRef absent ()
 Explicitly creates an absent value.
 

Detailed Description

template<typename T>
class mde::OptionalRef< T >

Describes an optional reference of some type T. The value may either be present or absent.

Template Parameters
TThe type.

Definition at line 128 of file mde_common.hpp.

Constructor & Destructor Documentation

◆ OptionalRef()

template<typename T >
mde::OptionalRef< T >::OptionalRef ( const T &  value)
inline

Definition at line 133 of file mde_common.hpp.

Member Function Documentation

◆ absent()

template<typename T >
static OptionalRef mde::OptionalRef< T >::absent ( )
inlinestatic

Explicitly creates an absent value.

Definition at line 136 of file mde_common.hpp.

◆ get()

template<typename T >
const T & mde::OptionalRef< T >::get ( )
inline

Gets the underlying value. Throws an exception if it is absent.

Definition at line 146 of file mde_common.hpp.

◆ is_present()

template<typename T >
bool mde::OptionalRef< T >::is_present ( ) const
inline

Informs if the value is present.

Definition at line 141 of file mde_common.hpp.


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