dispatcher: uses type_id_v rather than a family

This commit is contained in:
Michele Caini
2019-12-12 18:38:28 +01:00
parent f5ced7fe39
commit d1cdeb4a2d
6 changed files with 80 additions and 19 deletions

View File

@@ -0,0 +1,18 @@
#include <cr.h>
#include <entt/signal/dispatcher.hpp>
#include "types.h"
CR_EXPORT int cr_main(cr_plugin *ctx, cr_op operation) {
switch (operation) {
case CR_STEP:
static_cast<entt::dispatcher *>(ctx->userdata)->trigger<message>(42);
break;
case CR_LOAD:
case CR_UNLOAD:
case CR_CLOSE:
// nothing to do here, this is only a test.
break;
}
return 0;
}