|
TouchCPLib
1.0.0
A touch-enabled GUI interface based on SDL and libTS. It provides a simple desktop-free UI for your embedded Raspberry projects.
|
A class that wraps a value that can be null. More...
#include <Optional.h>
Public Member Functions | |
| Optional () | |
| Construct an empty Optional object. More... | |
| Optional (const T &value) | |
| Construct an Optional object initialized with the given value. More... | |
| Optional (T &&value) | |
| Construct an Optional object initialized with the given value. More... | |
| bool | hasValue () const |
| Returns true if the optional object has a value. More... | |
| T & | get () |
| Gets the inner object. More... | |
| const T & | get () const |
| Gets the inner object. More... | |
| void | set (const T &value) |
| Replace the inner object. More... | |
| void | set (T &&value) |
| Replace the inner object. More... | |
| Optional< T > & | operator= (const Optional< T > &value) |
| Assignment operator with copy semantics. More... | |
| void | clear () |
| Removes the inner object, making the optional void. More... | |
A class that wraps a value that can be null.
| T | The type of the value to wrap |
Construct an Optional object initialized with the given value.
| value | The value that will be copied |
Construct an Optional object initialized with the given value.
| value | The value that will be moved |
|
inline |
Removes the inner object, making the optional void.
|
inline |
Gets the inner object.
| std::runtime_error | if the optional does not have an object |
|
inline |
Gets the inner object.
| std::runtime_error | if the optional does not have an object |
|
inline |
Returns true if the optional object has a value.
Assignment operator with copy semantics.
| value | The value to assign |
|
inline |
Replace the inner object.
| value | The object to be copied |
|
inline |
Replace the inner object.
| value | The object to be moved |