template<typename T>
cubos::core::reflection::Reflect struct

Defines the reflection function for the given type T.

Template parameters
T Type to reflect.

By default, this function calls the static member function reflect of the type, which should return a pointer to an instance of Type.

To implement reflection for your type, you should either:

  • Define a static member function reflect with return type const Type& on your type.
  • Specialize this struct for your type.

The first option is preferred, as it is less verbose. However, when handling external types, to which member functions cannot be added, the second option is necessary.

Both options can and should be shortened by using the macros: