16 #ifndef SURGSIM_DATASTRUCTURES_OPTIONALVALUE_H 17 #define SURGSIM_DATASTRUCTURES_OPTIONALVALUE_H 23 namespace DataStructures
131 return !(*
this == rhs);
139 return !(*
this == rhs);
const T & operator*() const
Gets the value.
Definition: OptionalValue.h:89
Definition: CompoundShapeToGraphics.cpp:29
bool operator!=(const OptionalValue< T > &rhs) const
Inequality operator.
Definition: OptionalValue.h:129
void invalidate()
Mark this object as invalid.
Definition: OptionalValue.h:62
OptionalValue(const T &value)
Constructor that assigns a value.
Definition: OptionalValue.h:40
T m_value
Definition: OptionalValue.h:167
bool m_hasValue
Definition: OptionalValue.h:166
Container class that can indicate whether the object has been assigned a value.
Definition: OptionalValue.h:29
#define SURGSIM_ASSERT(condition)
Assert that condition is true.
Definition: Assert.h:77
OptionalValue()
Default Constructor, no value.
Definition: OptionalValue.h:34
bool operator!=(const T &rhs) const
Inequality operator.
Definition: OptionalValue.h:137
OptionalValue & operator=(const OptionalValue &rhs)
Assignment operator.
Definition: OptionalValue.h:145
OptionalValue(const OptionalValue &other)
Copy constructor.
Definition: OptionalValue.h:46
The header that provides the assertion API.
OptionalValue & operator=(const T &rhs)
Assignment operator from template type, after this hasValue() is true even if the right hand side was...
Definition: OptionalValue.h:159
bool operator==(const T &rhs) const
Equality operator.
Definition: OptionalValue.h:114
bool hasValue() const
Query if this object has been assigned a value.
Definition: OptionalValue.h:56
void setValue(const T &val)
Set the value of this object, and mark it as valid.
Definition: OptionalValue.h:69
bool operator==(const OptionalValue< T > &rhs) const
Equality operator.
Definition: OptionalValue.h:98
const T & getValue() const
Gets the value.
Definition: OptionalValue.h:78