summaryrefslogtreecommitdiffhomepage
path: root/opentrack/state.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-06-07 07:24:06 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-06-07 08:09:31 +0200
commit71856701c8bedad3d992cb63620e695df8727812 (patch)
treefd84ea540955df1510aa0cfd24b599008ad13219 /opentrack/state.hpp
parentaa2de50523257778474c9c2ec8da8edbcb31cd8b (diff)
plugin-support: make header-only, expose as public API
Issue: #151 Some global namespace macros are now prefixed with "OPENTRACK_" to avoid namespace clashes. This header is now safe to include in third-party projects.
Diffstat (limited to 'opentrack/state.hpp')
-rw-r--r--opentrack/state.hpp28
1 files changed, 1 insertions, 27 deletions
diff --git a/opentrack/state.hpp b/opentrack/state.hpp
index 2c37e5eb..a9f66241 100644
--- a/opentrack/state.hpp
+++ b/opentrack/state.hpp
@@ -1,36 +1,10 @@
#include <vector>
#include "opentrack/options.hpp"
using namespace options;
-#include "opentrack/plugin-support.h"
+#include "opentrack/plugin-support.hpp"
#include "opentrack/main-settings.hpp"
#include "opentrack/mappings.hpp"
-struct Modules {
- Modules() :
- module_list(dylib::enum_libraries()),
- filter_modules(filter(dylib::Filter)),
- tracker_modules(filter(dylib::Tracker)),
- protocol_modules(filter(dylib::Protocol))
- {}
- QList<mem<dylib>>& filters() { return filter_modules; }
- QList<mem<dylib>>& trackers() { return tracker_modules; }
- QList<mem<dylib>>& protocols() { return protocol_modules; }
-private:
- QList<mem<dylib>> module_list;
- QList<mem<dylib>> filter_modules;
- QList<mem<dylib>> tracker_modules;
- QList<mem<dylib>> protocol_modules;
-
- QList<mem<dylib>> filter(dylib::Type t)
- {
- QList<mem<dylib>> ret;
- for (auto x : module_list)
- if (x->type == t)
- ret.push_back(x);
- return ret;
- }
-};
-
struct Work;
struct State {