aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/mapper/MapperRegistry.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/ui/mapper/MapperRegistry.hpp')
-rw-r--r--include/cru/ui/mapper/MapperRegistry.hpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/cru/ui/mapper/MapperRegistry.hpp b/include/cru/ui/mapper/MapperRegistry.hpp
new file mode 100644
index 00000000..a170440d
--- /dev/null
+++ b/include/cru/ui/mapper/MapperRegistry.hpp
@@ -0,0 +1,26 @@
+#pragma once
+
+#include "Mapper.hpp"
+
+#include <memory>
+#include <vector>
+
+namespace cru::ui::mapper {
+class CRU_UI_API MapperRegistry {
+ public:
+ MapperRegistry();
+
+ CRU_DELETE_COPY(MapperRegistry)
+ CRU_DELETE_MOVE(MapperRegistry)
+
+ ~MapperRegistry();
+
+ const std::vector<MapperBase*>& GetAllMappers() const { return mapper_list_; }
+
+ void RegisterMapper(MapperBase* mapper);
+ void UnregisterMapper(MapperBase* mapper);
+
+ private:
+ std::vector<MapperBase*> mapper_list_;
+};
+} // namespace cru::ui::mapper