arduino-audio-driver
Public Member Functions | Protected Attributes | List of all members
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
 
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]

Optional ( )
inline

◆ Optional() [2/2]

Optional ( value)
inline

Member Function Documentation

◆ operator bool()

operator bool ( ) const
inline

◆ reset()

void reset ( )
inline

◆ value()

T& value ( )
inline

◆ valueOr()

T& valueOr ( alt)
inline

Member Data Documentation

◆ is_valid

bool is_valid = false
protected

◆ val

T val
protected

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