A type to hold a simple value but with an additional 'unset' state. More...
#include <TextFormat_as.h>
Public Member Functions | |
Optional () | |
Construct an Optional<T> with no value set. | |
Optional (const T &t) | |
Construct an Optional<T> with an initial value. | |
void | unset () |
Unset this value. | |
operator const void * () const | |
Relatively safe conversion to bool via void*. | |
const T * | operator-> () const |
Access to value using operator->(). | |
Optional< T > & | operator= (const T &t) |
Assign a T to this Optional<T>. | |
const T & | operator* () const |
Retrieve type only if set (converts to true). |
A type to hold a simple value but with an additional 'unset' state.
Most TextFormat values can be 'uninitialized', meaning they are not taken into account when applying formatting. These values return null in ActionScript.
gnash::Optional< T >::Optional | ( | ) | [inline] |
Construct an Optional<T> with no value set.
gnash::Optional< T >::Optional | ( | const T & | t | ) | [inline] |
Construct an Optional<T> with an initial value.
Implicit construction is allowed.
gnash::Optional< T >::operator const void * | ( | ) | const [inline] |
Relatively safe conversion to bool via void*.
const T& gnash::Optional< T >::operator* | ( | ) | const [inline] |
Retrieve type only if set (converts to true).
const T* gnash::Optional< T >::operator-> | ( | ) | const [inline] |
Access to value using operator->().
Optional<T>& gnash::Optional< T >::operator= | ( | const T & | t | ) | [inline] |
Assign a T to this Optional<T>.
void gnash::Optional< T >::unset | ( | ) | [inline] |
Unset this value.