cubos::core::reflection::NullableTrait class

Used to manipulate values of null-representable types.

Public types

using IsNull = memory::Function<bool(const void*) const >
Function pointer to check if a value represents null.
using SetToNull = memory::Function<void(void*) const >
Function pointer to set a value to its null representation.

Constructors, destructors, conversion operators

NullableTrait(IsNull isNull, SetToNull setToNull)
Constructs.

Public functions

auto isNull(const void* instance) const -> bool
Checks if the given value represents null.
void setToNull(void* instance) const
Sets a value to its null representation.

Function documentation

cubos::core::reflection::NullableTrait::NullableTrait(IsNull isNull, SetToNull setToNull)

Constructs.

Parameters
isNull IsNull.
setToNull SetToNull.

bool cubos::core::reflection::NullableTrait::isNull(const void* instance) const

Checks if the given value represents null.

Parameters
instance Instance.
Returns Whether the value represents null.

void cubos::core::reflection::NullableTrait::setToNull(void* instance) const

Sets a value to its null representation.

Parameters
instance Instance.