Loading...
Searching...
No Matches
Export.h File Reference

Provides ML_EXPORT for registering Malena types at startup. More...

Go to the source code of this file.

Namespaces

namespace  ml

Macros

#define ML_EXPORT(ClassName)
 Register a Malena type with the framework.

Detailed Description

Provides ML_EXPORT for registering Malena types at startup.

Definition in file Export.h.

Macro Definition Documentation

◆ ML_EXPORT

#define ML_EXPORT ( ClassName)
Value:
namespace ml::exports { \ \
inline struct _Register_##ClassName \
{ \
_Register_##ClassName() \
{ \
/* FireableHelper selects the correct specialization at */ \
/* compile time. new ClassName() only appears in the Fireable */ \
/* specialization — never type-checked for non-Fireable types. */ \
ml::exports::FireableHelper<ClassName>::doRegister(); \
} \
} _instance_##ClassName; \ \
}

Register a Malena type with the framework.

Fireable-only version. Plugin.h redefines this to also handle plugins. Uses FireableHelper to avoid type-checking new ClassName() for non-Fireable types — if constexpr alone is not sufficient in non-template contexts.

Parameters
ClassNameThe class to register. Must be fully defined.

Definition at line 38 of file Export.h.