cubos::core::reflection::InheritsTrait class

Provides inheritance relationship between types.

Public static functions

template<typename T>
static auto from() -> InheritsTrait
Adds an inheritance relationship to the type.

Constructors, destructors, conversion operators

InheritsTrait(const Type& type)
Constructs.

Public functions

template<typename T>
auto inherits() const -> bool
Checks if the type inherits from the specified parent type.
auto base() -> const Type&
Gets the base type of the inherited type.

Function documentation

template<typename T>
static InheritsTrait cubos::core::reflection::InheritsTrait::from()

Adds an inheritance relationship to the type.

Template parameters
T The parent type from which this type inherits.
Returns Trait.

template<typename T>
bool cubos::core::reflection::InheritsTrait::inherits() const

Checks if the type inherits from the specified parent type.

Template parameters
T The parent type to check for inheritance.
Returns Whether type inherits from the specified parent type, false otherwise.

const Type& cubos::core::reflection::InheritsTrait::base()

Gets the base type of the inherited type.

Returns Type.