|
@ -180,8 +180,14 @@ class CLASS : public Jupiter::GenericCommand { \ |
|
|
|
|
|
|
|
|
/** Instantiates a generic command. */ |
|
|
/** Instantiates a generic command. */ |
|
|
#define GENERIC_COMMAND_INIT(CLASS) \ |
|
|
#define GENERIC_COMMAND_INIT(CLASS) \ |
|
|
CLASS CLASS :: instance = CLASS (); \ |
|
|
class CLASS ## _Init : public CLASS { \ |
|
|
CLASS & CLASS ## _instance = CLASS :: instance; |
|
|
public: \ |
|
|
|
|
|
CLASS ## _Init() { \ |
|
|
|
|
|
for (size_t index = 0; index != Jupiter::plugins->size(); ++index) \ |
|
|
|
|
|
Jupiter::plugins->get(index)->OnGenericCommandAdd(*this); \ |
|
|
|
|
|
} }; \ |
|
|
|
|
|
CLASS ## _Init CLASS ## _instance = CLASS ## _Init (); \ |
|
|
|
|
|
CLASS & CLASS :: instance = CLASS ## _instance; |
|
|
|
|
|
|
|
|
/** Re-enable warnings */ |
|
|
/** Re-enable warnings */ |
|
|
#if defined _MSC_VER |
|
|
#if defined _MSC_VER |
|
|