This is the documentation for Enlighten.
class Geo Optional
template<typename Type>
class Geo::Optional
Class allowing a value object (integer, string, etc) to be optional, by storing a current value, default value and a boolean to state which is valid.
The template type 'Type' must be default-constructible.
Functions
Name | Description |
|---|---|
Returns the default value. | |
Returns true if the default value has been set. | |
Returns true if the value has been set. | |
Load this Geo::Optional<Type> from a Geo::IGeoStream. | |
Inequality operator. | |
Assignment operator. | |
Equality operator. | |
Constructor. Defaults to undefined. | |
Explicit construction from a value. | |
Copy constructor. | |
Constructor that allows you to set a default, but leave value undefined. | |
Save this Geo::Optional<Type> to a Geo::IGeoStream. | |
Set the default value. | |
Unsets the value, returning it to the default. | |
Unsets the default value. | |
Return the value, if set, otherwise the default. |
const Type& Geo::Optional< Type >::Default
public: const Type & Default() const
Returns the default value.
bool Geo::Optional< Type >::IsDefaultDefined
public: bool IsDefaultDefined() const
Returns true if the default value has been set.
bool Geo::Optional< Type >::IsDefined
public: bool IsDefined() const
Returns true if the value has been set.
bool Geo::Optional< Type >::Load
public: bool Load
(
Geo::IGeoStream & stream
)