summaryrefslogtreecommitdiffhomepage
path: root/logic/selected-libraries.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-09-25 16:24:58 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-09-25 16:29:38 +0200
commiteca907d3c1240d04bbcfdf84a3a726353e56bc64 (patch)
treec7c35c7f3d5dd22b689be84287567e80aa57b46a /logic/selected-libraries.hpp
parent6932a00edd5074caf75b0d9624fc079775a44b1e (diff)
api, logic: support "extensions" for pose transform
Diffstat (limited to 'logic/selected-libraries.hpp')
-rw-r--r--logic/selected-libraries.hpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/logic/selected-libraries.hpp b/logic/selected-libraries.hpp
index 65e9733e..041c77e5 100644
--- a/logic/selected-libraries.hpp
+++ b/logic/selected-libraries.hpp
@@ -9,11 +9,29 @@
#pragma once
#include "api/plugin-support.hpp"
+#include "export.hpp"
+
+#include <array>
+#include <functional>
+
#include <QFrame>
-#include "export.hpp"
+// XXX todo remove camel case in identifier
+
+struct runtime_event_handler
+{
+ using ext_event_ordinal = IExtension::event_ordinal;
+ using ext = std::shared_ptr<IExtension>;
+
+ enum : unsigned { ext_max_events = 64 };
+ using ext_list = std::array<ext, ext_max_events>;
+
+ std::array<ext_list, ext_event_ordinal::event_count> extension_events;
+
+ void run_events(ext_event_ordinal k, Pose& pose);
+};
-struct OTR_LOGIC_EXPORT SelectedLibraries
+struct OTR_LOGIC_EXPORT SelectedLibraries : runtime_event_handler
{
using dylibptr = std::shared_ptr<dylib>;