How to declare the reflection for a template cpp class
Posted: 01 Apr 2021, 09:45
Hi Noesis,
So supposing I have a template class like this:
How should I fill in for say class type in this macro?
and
These are what I have tried but just no success:
I'm not sure it is even allowed though.
Thanks.
So supposing I have a template class like this:
Code: Select all
static constexpr const char sControlTypeName[] = "CustomControlType";
template <class Type, const char* Param = sControlTypeName>
class FCustomControl : public Noesis::UserControl
{};Code: Select all
FCustomControl<float, sControlTypeName>Code: Select all
NS_DECLARE_REFLECTION(<?>, UserControl)Code: Select all
NS_IMPLEMENT_REFLECTION(<?>, "CustomControl")Code: Select all
NS_DECLARE_REFLECTION(FCustomControl, UserControl)
NS_IMPLEMENT_REFLECTION(FCustomControl<float, sControlTypeName>, "CustomControl"){}Thanks.