#include <Optional.h>
Public Member Functions | |
| Optional () | |
| Optional (const T &val) | |
| Optional (const Optional< T > &opt) | |
| Optional & | operator= (const Optional< T > &opt) |
| Optional & | operator= (const T &val) |
| ~Optional () | |
| operator bool () const | |
| T & | operator* () |
| const T & | operator* () const |
| T & | value () |
| const T & | value () const |
| void | reset () |
Protected Member Functions | |
| void * | storage () |
| const void * | storage () const |
| T & | get () |
| const T & | get () const |
| void | destruct () |
| void | construct (const T &data) |
Protected Attributes | |
| char | data_ [sizeof(T)] |
| bool | init_ |
Definition at line 31 of file Optional.h.
|
inline |
Uninitialized instance.
Definition at line 35 of file Optional.h.
|
inline |
Constructs the optional object.
Definition at line 41 of file Optional.h.
Initializes the contained value by copying the contained value of other, but only if other is engaged. other is still in engaged state if it was in engaged state before the call.
Definition at line 52 of file Optional.h.
|
inline |
If engaged, destroys the contained value.
Definition at line 109 of file Optional.h.
|
inlineprotected |
Definition at line 185 of file Optional.h.
|
inlineprotected |
Definition at line 176 of file Optional.h.
|
inlineprotected |
Definition at line 166 of file Optional.h.
|
inlineprotected |
Definition at line 171 of file Optional.h.
|
inline |
Checks whether the object is in engaged state.
Definition at line 115 of file Optional.h.
|
inline |
Returns a reference to the contained value.
Definition at line 121 of file Optional.h.
|
inline |
Returns a const reference to the contained value.
Definition at line 127 of file Optional.h.
Assigns contents.
Definition at line 62 of file Optional.h.
|
inline |
Assigns contents.
Definition at line 88 of file Optional.h.
|
inline |
Reset stored value and set state to Uninitialized.
Definition at line 145 of file Optional.h.
|
inlineprotected |
Definition at line 153 of file Optional.h.
|
inlineprotected |
Definition at line 158 of file Optional.h.
|
inline |
A reference to the contained value.
Definition at line 133 of file Optional.h.
|
inline |
A const reference to the contained value.
Definition at line 139 of file Optional.h.
|
protected |
Definition at line 193 of file Optional.h.
|
protected |
Definition at line 194 of file Optional.h.