F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
TestUtils::Option< T, noValue > Class Template Reference

An optional value. More...

#include <TestUtils/Option.hpp>

Public Member Functions

 Option (T value)
 
 Option ()
 
bool hasValue () const
 
void set (T value)
 
void clear ()
 
T get () const
 
T getOrElse (T value) const
 

Static Public Member Functions

static Option< T > some (T value)
 
static constexpr Option< T > none ()
 

Detailed Description

template<typename T, T noValue = T()>
class TestUtils::Option< T, noValue >

An optional value.

Definition at line 20 of file Option.hpp.

Constructor & Destructor Documentation

◆ Option() [1/2]

template<typename T , T noValue = T()>
TestUtils::Option< T, noValue >::Option ( T  value)
inlineexplicit

Definition at line 25 of file Option.hpp.

◆ Option() [2/2]

template<typename T , T noValue = T()>
TestUtils::Option< T, noValue >::Option ( )
inline

Definition at line 26 of file Option.hpp.

Member Function Documentation

◆ clear()

template<typename T , T noValue = T()>
void TestUtils::Option< T, noValue >::clear ( )
inline

Definition at line 38 of file Option.hpp.

◆ get()

template<typename T , T noValue = T()>
T TestUtils::Option< T, noValue >::get ( ) const
inline

Definition at line 39 of file Option.hpp.

◆ getOrElse()

template<typename T , T noValue = T()>
T TestUtils::Option< T, noValue >::getOrElse ( T  value) const
inline

Definition at line 43 of file Option.hpp.

◆ hasValue()

template<typename T , T noValue = T()>
bool TestUtils::Option< T, noValue >::hasValue ( ) const
inline

Definition at line 33 of file Option.hpp.

◆ none()

template<typename T , T noValue = T()>
static constexpr Option< T > TestUtils::Option< T, noValue >::none ( )
inlinestaticconstexpr

Definition at line 30 of file Option.hpp.

◆ set()

template<typename T , T noValue = T()>
void TestUtils::Option< T, noValue >::set ( T  value)
inline

Definition at line 34 of file Option.hpp.

◆ some()

template<typename T , T noValue = T()>
static Option< T > TestUtils::Option< T, noValue >::some ( T  value)
inlinestatic

Definition at line 29 of file Option.hpp.


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