|
Ice 3.7 C++98 API Reference
|
Encapsulates an optional value, which may or may not be present. More...
#include <Optional.h>
Public Types | |
| typedef T | element_type |
Public Member Functions | |
| T & | get () |
| Obtains the current value. | |
| const T & | get () const |
| Obtains the current value. | |
| operator bool () const | |
| Determines whether this optional has a value. | |
| bool | operator! () const |
| Determines whether this optional has a value. | |
| T & | operator* () |
| Obtains the current value. | |
| const T & | operator* () const |
| Obtains the current value. | |
| T * | operator-> () |
| Obtains a pointer to the current value. | |
| const T * | operator-> () const |
| Obtains a pointer to the current value. | |
| Optional & | operator= (const Optional &r) |
| Resets this optional to be a copy of the given optional. | |
| template<typename Y> | |
| Optional & | operator= (const Optional< Y > &r) |
| Resets this optional to be a copy of the given optional. | |
| Optional & | operator= (IceUtilInternal::NoneType) |
| Resets this optional to have no value. | |
| template<typename Y> | |
| Optional & | operator= (Y p) |
| Resets this optional to have the given value. | |
| Optional () | |
| Constructs an empty optional with no value. | |
| Optional (const Optional &r) | |
| Constructs an optional as a copy of the given optional. | |
| template<typename Y> | |
| Optional (const Optional< Y > &r) | |
| Constructs an optional as a copy of the given optional. | |
| Optional (IceUtilInternal::NoneType) | |
| Constructs an empty optional with no value. | |
| template<typename Y> | |
| Optional (Y p) | |
| Constructs an optional with the given value. | |
| void | swap (Optional &other) |
| Exchanges the state of this optional with another one. | |
| T & | value () |
| Obtains the current value. | |
| const T & | value () const |
| Obtains the current value. | |
| ~Optional () | |
Encapsulates an optional value, which may or may not be present.
| typedef T IceUtil::Optional< T >::element_type |
|
inline |
Constructs an empty optional with no value.
|
inline |
Constructs an empty optional with no value.
|
inline |
Constructs an optional as a copy of the given optional.
| r | The source optional. |
Constructs an optional with the given value.
| p | The initial value. |
|
inline |
Constructs an optional as a copy of the given optional.
| r | The source optional. |
|
inline |
|
inline |
Obtains the current value.
| OptionalNotSetException | if this optional has no value. |
|
inline |
Obtains the current value.
| OptionalNotSetException | if this optional has no value. |
|
inline |
Determines whether this optional has a value.
|
inline |
Determines whether this optional has a value.
|
inline |
Obtains the current value.
| OptionalNotSetException | if this optional has no value. |
|
inline |
Obtains the current value.
| OptionalNotSetException | if this optional has no value. |
|
inline |
Obtains a pointer to the current value.
| OptionalNotSetException | if this optional has no value. |
|
inline |
Obtains a pointer to the current value.
| OptionalNotSetException | if this optional has no value. |
|
inline |
Resets this optional to be a copy of the given optional.
| r | The source optional. |
|
inline |
Resets this optional to be a copy of the given optional.
| r | The source optional. |
|
inline |
Resets this optional to have no value.
|
inline |
Resets this optional to have the given value.
| p | The new value. |
|
inline |
Exchanges the state of this optional with another one.
| other | The optional value with which to swap. |
|
inline |
Obtains the current value.
| OptionalNotSetException | if this optional has no value. |
|
inline |
Obtains the current value.
| OptionalNotSetException | if this optional has no value. |