SensESP 3.0.1
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
sensesp::Nullable< T > Class Template Reference

Template class that supports a special invalid magic value for a type. More...

#include <sensesp/types/nullable.h>

Public Member Functions

 Nullable ()
 
 Nullable (T value)
 
Nullable< T > & operator= (T &value)
 
Nullable< T > & operator= (const Nullable< T > &other)
 
 operator T () const
 
bool is_valid () const
 
T * ptr ()
 
value () const
 

Static Public Member Functions

static T invalid ()
 

Detailed Description

template<typename T>
class sensesp::Nullable< T >

Template class that supports a special invalid magic value for a type.

The invalid value is always provided by the type's default constructor.

Definition at line 15 of file nullable.h.

Constructor & Destructor Documentation

◆ Nullable() [1/2]

template<typename T >
sensesp::Nullable< T >::Nullable ( )
inline

Definition at line 17 of file nullable.h.

◆ Nullable() [2/2]

template<typename T >
sensesp::Nullable< T >::Nullable ( T value)
inline

Definition at line 18 of file nullable.h.

Member Function Documentation

◆ invalid()

template<typename T >
static T sensesp::Nullable< T >::invalid ( )
inlinestatic

Definition at line 39 of file nullable.h.

Here is the caller graph for this function:

◆ is_valid()

template<typename T >
bool sensesp::Nullable< T >::is_valid ( ) const
inline

Definition at line 31 of file nullable.h.

Here is the caller graph for this function:

◆ operator T()

template<typename T >
sensesp::Nullable< T >::operator T ( ) const
inline

Definition at line 27 of file nullable.h.

◆ operator=() [1/2]

template<typename T >
Nullable< T > & sensesp::Nullable< T >::operator= ( const Nullable< T > & other)
inline

Definition at line 23 of file nullable.h.

◆ operator=() [2/2]

template<typename T >
Nullable< T > & sensesp::Nullable< T >::operator= ( T & value)
inline

Definition at line 19 of file nullable.h.

Here is the call graph for this function:

◆ ptr()

template<typename T >
T * sensesp::Nullable< T >::ptr ( )
inline

Definition at line 35 of file nullable.h.

◆ value()

template<typename T >
T sensesp::Nullable< T >::value ( ) const
inline

Definition at line 43 of file nullable.h.

Here is the caller graph for this function:

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