From 195767619e7a7aeeeb33b13420538f687bef0104 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 3 Feb 2019 12:06:50 +0100 Subject: opentrack: move module list to base class --- logic/state.hpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'logic/state.hpp') diff --git a/logic/state.hpp b/logic/state.hpp index c400df18..abce1daf 100644 --- a/logic/state.hpp +++ b/logic/state.hpp @@ -14,19 +14,27 @@ #include "mappings.hpp" #include "extensions.hpp" #include "work.hpp" -#include +#include "export.hpp" + +#include #include -struct State +struct OTR_LOGIC_EXPORT State { - explicit State(const QString& library_path) : - modules(library_path), - ev(modules.extensions()), - pose(s.all_axis_opts) - {} + using dylib_ptr = Modules::dylib_ptr; + using dylib_list = Modules::dylib_list; + + explicit State(const QString& library_path); + static std::tuple module_by_name(const QString& name, dylib_list& list); + + dylib_ptr current_tracker(); + dylib_ptr current_protocol(); + dylib_ptr current_filter(); + Modules modules; event_handler ev; main_settings s; + module_settings m; Mappings pose; std::shared_ptr work; }; -- cgit v1.2.3