ADTF
|
An optional template as long as the std::optional is not available here. More...
Public Types | |
typedef T | value_type |
defintion of the value type of this optional | |
Public Member Functions | |
Optional () | |
default CTOR | |
Optional (Optional &&)=default | |
move CTOR | |
Optional (const Optional &)=default | |
copy CTOR | |
Optional & | operator= (Optional &&)=default |
move assignment operator More... | |
Optional & | operator= (const Optional &)=default |
copy assignment operator More... | |
~Optional ()=default | |
DTOR. | |
Optional (const value_type &value) | |
special copy CTOR More... | |
Optional & | operator= (const value_type &value) |
copy assignment operator More... | |
Optional (value_type &&value) | |
move CTOR More... | |
Optional & | operator= (value_type &&value) |
move assignment operator More... | |
operator bool () const | |
validation status of the optional More... | |
operator value_type () const | |
conversion to the value type More... | |
value_type & | operator* () |
referenced access to the value More... | |
const value_type | operator* () const |
dereferenced access of the value More... | |
void | reset () |
invalidates the value | |
value_type | get () const |
return the value type as copy More... | |
bool | operator== (const Optional &other) const |
equality operator. More... | |
bool | operator!= (const Optional &other) const |
non equality operator. More... | |
Public Attributes | |
bool | _valid = false |
is valid or not | |
value_type | _value = {} |
the value if it is valid | |
An optional template as long as the std::optional is not available here.
T | the value type |
Definition at line 30 of file access_optional.h.
|
inline |
special copy CTOR
value | the value to copy |
Definition at line 72 of file access_optional.h.
|
inline |
|
inline |
return the value type as copy
Definition at line 164 of file access_optional.h.
References Optional< T >::_value.
|
inline |
validation status of the optional
Definition at line 116 of file access_optional.h.
References Optional< T >::_valid.
|
inline |
conversion to the value type
Definition at line 126 of file access_optional.h.
References Optional< T >::_value.
|
inline |
non equality operator.
Definition at line 192 of file access_optional.h.
References Optional< T >::operator==().
|
inline |
referenced access to the value
Definition at line 136 of file access_optional.h.
References Optional< T >::_value.
|
inline |
dereferenced access of the value
Definition at line 146 of file access_optional.h.
References Optional< T >::_value.
|
inline |
copy assignment operator
value | the value to copy |
Definition at line 81 of file access_optional.h.
References Optional< T >::_valid, and Optional< T >::_value.
|
inline |
move assignment operator
value | the value to move |
Definition at line 103 of file access_optional.h.
References Optional< T >::_valid, and Optional< T >::_value.
|
inline |
equality operator.
Definition at line 175 of file access_optional.h.
References Optional< T >::_valid, and Optional< T >::_value.
Referenced by Optional< T >::operator!=().