neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neolib::i_optional< T > Class Template Referenceabstract

#include <i_optional.hpp>

Inheritance diagram for neolib::i_optional< T >:
neolib::i_reference_counted

Public Types

typedef self_type abstract_type
 
typedef T value_type
 
typedef value_typepointer
 
typedef const value_typeconst_pointer
 
typedef value_typereference
 
typedef const value_typeconst_reference
 

Public Member Functions

virtual bool has_value () const noexcept=0
 
virtual operator bool () const noexcept=0
 
virtual reference value ()=0
 
virtual const_reference value () const =0
 
virtual const_reference value_or (const_reference aDefaultValue) const =0
 
virtual const_reference value_or (reference aDefaultValue) const =0
 
virtual reference value_or (reference aDefaultValue)=0
 
virtual reference operator* ()=0
 
virtual const_reference operator* () const =0
 
virtual pointer operator-> ()=0
 
virtual const_pointer operator-> () const =0
 
virtual void reset ()=0
 
virtual i_optional< T > & operator= (std::nullopt_t) noexcept=0
 
virtual i_optional< T > & operator= (const i_optional< T > &rhs)=0
 
virtual i_optional< T > & operator= (const T &value)=0
 
bool operator== (std::nullopt_t) const
 
bool operator!= (std::nullopt_t) const
 
bool operator== (const i_optional< T > &that) const
 
std::partial_ordering operator<=> (const i_optional< T > &that) const
 
- Public Member Functions inherited from neolib::i_reference_counted
virtual ~i_reference_counted ()=default
 
virtual void add_ref () const noexcept=0
 
virtual void release () const =0
 
virtual int32_t use_count () const noexcept=0
 
virtual const i_reference_countedrelease_and_take_ownership () const =0
 
virtual i_reference_countedrelease_and_take_ownership ()=0
 
virtual void pin () const noexcept=0
 
virtual void unpin () const =0
 
virtual i_ref_control_blockcontrol_block ()=0
 

Detailed Description

template<typename T>
class neolib::i_optional< T >

Definition at line 57 of file i_optional.hpp.

Member Typedef Documentation

◆ abstract_type

template<typename T >
typedef self_type neolib::i_optional< T >::abstract_type

Definition at line 62 of file i_optional.hpp.

◆ const_pointer

template<typename T >
typedef const value_type* neolib::i_optional< T >::const_pointer

Definition at line 65 of file i_optional.hpp.

◆ const_reference

template<typename T >
typedef const value_type& neolib::i_optional< T >::const_reference

Definition at line 67 of file i_optional.hpp.

◆ pointer

template<typename T >
typedef value_type* neolib::i_optional< T >::pointer

Definition at line 64 of file i_optional.hpp.

◆ reference

template<typename T >
typedef value_type& neolib::i_optional< T >::reference

Definition at line 66 of file i_optional.hpp.

◆ value_type

template<typename T >
typedef T neolib::i_optional< T >::value_type

Definition at line 63 of file i_optional.hpp.

Member Function Documentation

◆ has_value()

template<typename T >
virtual bool neolib::i_optional< T >::has_value ( ) const
pure virtualnoexcept

Implemented in neolib::optional< T >.

◆ operator bool()

template<typename T >
virtual neolib::i_optional< T >::operator bool ( ) const
explicitpure virtualnoexcept

Implemented in neolib::optional< T >.

◆ operator!=()

template<typename T >
bool neolib::i_optional< T >::operator!= ( std::nullopt_t  ) const
inline

Definition at line 95 of file i_optional.hpp.

◆ operator*() [1/2]

template<typename T >
virtual const_reference neolib::i_optional< T >::operator* ( ) const
pure virtual

Implemented in neolib::optional< T >.

◆ operator*() [2/2]

template<typename T >
virtual reference neolib::i_optional< T >::operator* ( )
pure virtual

Implemented in neolib::optional< T >.

◆ operator->() [1/2]

template<typename T >
virtual const_pointer neolib::i_optional< T >::operator-> ( ) const
pure virtual

Implemented in neolib::optional< T >.

◆ operator->() [2/2]

template<typename T >
virtual pointer neolib::i_optional< T >::operator-> ( )
pure virtual

Implemented in neolib::optional< T >.

◆ operator<=>()

template<typename T >
std::partial_ordering neolib::i_optional< T >::operator<=> ( const i_optional< T > &  that) const
inline

Definition at line 107 of file i_optional.hpp.

◆ operator=() [1/3]

template<typename T >
virtual i_optional< T > & neolib::i_optional< T >::operator= ( const i_optional< T > &  rhs)
pure virtual

◆ operator=() [2/3]

template<typename T >
virtual i_optional< T > & neolib::i_optional< T >::operator= ( const T value)
pure virtual

Implemented in neolib::optional< T >.

◆ operator=() [3/3]

template<typename T >
virtual i_optional< T > & neolib::i_optional< T >::operator= ( std::nullopt_t  )
pure virtualnoexcept

Implemented in neolib::optional< T >.

◆ operator==() [1/2]

template<typename T >
bool neolib::i_optional< T >::operator== ( const i_optional< T > &  that) const
inline

Definition at line 99 of file i_optional.hpp.

◆ operator==() [2/2]

template<typename T >
bool neolib::i_optional< T >::operator== ( std::nullopt_t  ) const
inline

Definition at line 91 of file i_optional.hpp.

◆ reset()

template<typename T >
virtual void neolib::i_optional< T >::reset ( )
pure virtual

Implemented in neolib::optional< T >.

◆ value() [1/2]

template<typename T >
virtual const_reference neolib::i_optional< T >::value ( ) const
pure virtual

Implemented in neolib::optional< T >.

◆ value() [2/2]

template<typename T >
virtual reference neolib::i_optional< T >::value ( )
pure virtual

Implemented in neolib::optional< T >.

◆ value_or() [1/3]

template<typename T >
virtual const_reference neolib::i_optional< T >::value_or ( const_reference  aDefaultValue) const
pure virtual

Implemented in neolib::optional< T >.

◆ value_or() [2/3]

template<typename T >
virtual const_reference neolib::i_optional< T >::value_or ( reference  aDefaultValue) const
pure virtual

Implemented in neolib::optional< T >.

◆ value_or() [3/3]

template<typename T >
virtual reference neolib::i_optional< T >::value_or ( reference  aDefaultValue)
pure virtual

Implemented in neolib::optional< T >.


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