class Geo Optional

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

Name

Description

Default()

Returns the default value.

IsDefaultDefined()

Returns true if the default value has been set.

IsDefined()

Returns true if the value has been set.

Load(Geo::IGeoStream &)

Load this Geo::Optional<Type> from a Geo::IGeoStream.

operator!=(const Optional &)

Inequality operator.

operator=(const Type &)

Assignment operator.

operator==(const Optional &)

Equality operator.

Optional()

Constructor. Defaults to undefined.

Optional(const Type &)

Explicit construction from a value.

Optional(const Optional &)

Copy constructor.

Optional(void *, const Type &)

Constructor that allows you to set a default, but leave value undefined.

Save(Geo::IGeoStream &)

Save this Geo::Optional<Type> to a Geo::IGeoStream.

SetDefault(const Type &)

Set the default value.

Undefine()

Unsets the value, returning it to the default.

UndefineDefault()

Unsets the default value.

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
)