|
CBuild
C++ build system with scripts written in c++
|
Optional data type. More...
#include <optional.hpp>
Public Member Functions | |
| optional () | |
| Create new optional datatype. | |
| optional (T val) | |
| Create new optional datatype. | |
| void | set (T val) |
| Set value. | |
| void | clear () |
| Clear value. | |
| T | get () |
| Get value. | |
| bool | is () |
| If value is not null. | |
Private Attributes | |
| T | var |
| Intrnal variable. | |
| bool | null |
| Does values is saved. | |
Optional data type.
| T | -> Type of internal data |
Definition at line 32 of file optional.hpp.
|
inline |
Create new optional datatype.
Definition at line 47 of file optional.hpp.
|
inline |
Create new optional datatype.
| val | => T -> Value |
Definition at line 55 of file optional.hpp.
|
inline |
|
inline |
Get value.
| std::runtime_error | -> If type is null |
Definition at line 79 of file optional.hpp.
References lib::optional< T >::var.
|
inline |
If value is not null.
Definition at line 91 of file optional.hpp.
References lib::optional< T >::null.
|
inline |
|
private |
Does values is saved.
Definition at line 41 of file optional.hpp.
Referenced by lib::optional< T >::is().
|
private |
Intrnal variable.
Definition at line 37 of file optional.hpp.
Referenced by lib::optional< T >::get().