|
opensurgsim
|
Container class that can indicate whether the object has been assigned a value. More...
#include <OptionalValue.h>
Public Member Functions | |
| OptionalValue () | |
| Default Constructor, no value. | |
| OptionalValue (const T &value) | |
| Constructor that assigns a value. More... | |
| OptionalValue (const OptionalValue &other) | |
| Copy constructor. More... | |
| bool | hasValue () const |
| Query if this object has been assigned a value. More... | |
| void | invalidate () |
| Mark this object as invalid. | |
| void | setValue (const T &val) |
| Set the value of this object, and mark it as valid. More... | |
| const T & | getValue () const |
| Gets the value. More... | |
| const T & | operator* () const |
| Gets the value. More... | |
| bool | operator== (const OptionalValue< T > &rhs) const |
| Equality operator. More... | |
| bool | operator== (const T &rhs) const |
| Equality operator. More... | |
| bool | operator!= (const OptionalValue< T > &rhs) const |
| Inequality operator. More... | |
| bool | operator!= (const T &rhs) const |
| Inequality operator. More... | |
| OptionalValue & | operator= (const OptionalValue &rhs) |
| Assignment operator. More... | |
| OptionalValue & | operator= (const T &rhs) |
| Assignment operator from template type, after this hasValue() is true even if the right hand side was not initialized. More... | |
Container class that can indicate whether the object has been assigned a value.
| Class | of the value that this object contains |
|
inlineexplicit |
Constructor that assigns a value.
| value | The value that should be used. |
|
inline |
Copy constructor.
| other | The value used for copying. |
|
inline |
Gets the value.
| SurgSim::Framework::AssertionFailure | if the value was not set |
|
inline |
Query if this object has been assigned a value.
|
inline |
Inequality operator.
| rhs | the right hand side. |
|
inline |
Inequality operator.
| rhs | the right hand side. |
|
inline |
Gets the value.
| SurgSim::Framework::AssertionFailure | if the value was not set |
|
inline |
Assignment operator.
| rhs | The right hand side of the operator. |
|
inline |
Assignment operator from template type, after this hasValue() is true even if the right hand side was not initialized.
| rhs | the value to be assigned to this optional value |
|
inline |
Equality operator.
| rhs | The right hand side. |
|
inline |
Equality operator.
| rhs | The right hand side with the specific template type. |
|
inline |
Set the value of this object, and mark it as valid.
| val | The value of the object |
1.8.12