arduino-audio-driver
Loading...
Searching...
No Matches
Optional< T > Class Template Reference

A simple optonal implementation. More...

#include <Optional.h>

Public Member Functions

 Optional ()
 Optional (T value)
 operator bool () const
void reset ()
T & value ()
T & valueOr (T alt)

Protected Attributes

bool is_valid = false
T val

Detailed Description

template<typename T>
class audio_driver_local::Optional< T >

A simple optonal implementation.

Author
Phil Schatzmann

Constructor & Destructor Documentation

◆ Optional() [1/2]

template<typename T>
Optional ( )
inline

◆ Optional() [2/2]

template<typename T>
Optional ( T value)
inline

Member Function Documentation

◆ operator bool()

template<typename T>
operator bool ( ) const
inline

◆ reset()

template<typename T>
void reset ( )
inline

◆ value()

template<typename T>
T & value ( )
inline

◆ valueOr()

template<typename T>
T & valueOr ( T alt)
inline

Member Data Documentation

◆ is_valid

template<typename T>
bool is_valid = false
protected

◆ val

template<typename T>
T val
protected

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