diff options
| author | crupest <crupest@outlook.com> | 2022-01-17 22:55:09 +0800 | 
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2022-01-17 22:55:09 +0800 | 
| commit | 67dd012c0f49898f1734c46d3bb264f59d056a8e (patch) | |
| tree | 780dc9c50868a8e7b89e68b463a60745fce72ae9 /include/cru/ui/mapper/MapperRegistry.hpp | |
| parent | 81f7d5faaaf79149070a901a4f299aee70c46379 (diff) | |
| download | cru-67dd012c0f49898f1734c46d3bb264f59d056a8e.tar.gz cru-67dd012c0f49898f1734c46d3bb264f59d056a8e.tar.bz2 cru-67dd012c0f49898f1734c46d3bb264f59d056a8e.zip  | |
...
Diffstat (limited to 'include/cru/ui/mapper/MapperRegistry.hpp')
| -rw-r--r-- | include/cru/ui/mapper/MapperRegistry.hpp | 26 | 
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  | 
