#include <SPL/Runtime/Type/Optional.h>

Inheritance diagram for SPL::optional< T >:
Inheritance graph
node
[legend]

Member Typedef Documentation

◆ value_type

template<class T >

Constructor & Destructor Documentation

◆ optional() [1/4]

template<class T >

◆ optional() [2/4]

template<class T >

◆ optional() [3/4]

template<class T >

◆ optional() [4/4]

template<class T >

◆ ~optional()

template<class T >

Member Function Documentation

◆ isPresent()

template<class T >

Returns true if the optional is set to non-null, false if it is null

Returns
true if the optional is set to non-null, false if it is null

Implements SPL::Optional.

◆ setPresentWithDefaultValue()

template<class T >

Sets the underlying value of the optional to be a default initialized value of the underlying type T. Once this is done, isPresent() will return true unless the optional is later reset to null.

Implements SPL::Optional.

◆ value() [1/2]

template<class T >

◆ value() [2/2]

template<class T >

◆ getSerializedSize()

template<class T >

Get the size in bytes when serialized

Returns
size in bytes when serialized

Implements SPL::Optional.

◆ operator=()

template<class T >

◆ createValue()

template<class T >

Create a new value of the value type. The returned value handle is a wrapper for an object allocated on the heap. As a result, the caller is responsible for cleaning up the memory by calling ValueHandle::deleteValue()

Returns
value handle for the new element

Implements SPL::Optional.

◆ clone()

template<class T >

Returns a cloned copy of this Optional

Returns
a cloned copy of this Optional

Implements SPL::Optional.

◆ getValue() [1/2]

template<class T >

If the optional isPresent(), return a handle the underlying value of type T wrapped by the optional. Otherwise a runtime exception occurs.

Returns
a handle to the underlying value wrapped by the optional

Implements SPL::Optional.

◆ getValue() [2/2]

template<class T >

If the optional isPresent(), return a const handle the underlying value of type T wrapped by the optional. Otherwise a runtime exception occurs.

Returns
a const handle to the underlying value wrapped by the optional

Implements SPL::Optional.

◆ getValueMetaType()

template<class T >
Returns
the metatype corresponding to the underlying value of type T

Implements SPL::Optional.

◆ swapWith()

template<class T >

Swaps the null-ness or wrapped value (if not null) of another Optional with this Optional's state, using intermediate copies as necessary.

Implements SPL::Optional.

◆ assignFrom()

template<class T >

Assigns the null-ness or wrapped value (if not null) of another Optional to this Optional's state. This will perform copying of any underlying value to preserve value semantics.

Implements SPL::Optional.

◆ equals()

template<class T >

Returns true if the type and either the null-ness or wrapped value (if not null) of the given Optional is the same as this optional. If the types of the Optionals do not match, a runtime exception occurs.

Returns
true if the type and either the null-ness or wrapped value (if not null) of the given Optional is the same as this optional. If the types of the Optionals do not match, a runtime exception occurs.

Implements SPL::Optional.

◆ setValue()

template<class T >

Sets the underlying value of the optional to be the same value as the one wrapped by the given const value handle. This performs a copy of the value pointed to by the handle so as to preserve value semantics.

Implements SPL::Optional.

◆ operator==()

template<class T >

◆ operator!=()

template<class T >

◆ clear() [1/2]

template<class T >

Reset to null.

Implements SPL::Optional.

◆ serialize() [1/2]

template<class T >

Serialize (character)

Parameters

Implements SPL::Optional.

◆ deserialize() [1/2]

template<class T >

Deserialize (character)

Parameters

Implements SPL::Optional.

◆ serialize() [2/2]

template<class T >
template<class BufferType >

Serialize (binary)

Parameters

◆ deserialize() [2/2]

template<class T >
template<class BufferType >

Deserialize (binary)

Parameters

◆ deserializeWithNanAndInfs()

template<class T >

Deserialize with Inf and Nan (character)

Parameters

◆ hashCode()

template<class T >

Get hash code

Returns
hash code

Implements SPL::Optional.

◆ clear() [2/2]

template<>

Reset this optional to null.

Implements SPL::Optional.


The documentation for this class was generated from the following file: