Lugdunum  0.1.0
Module.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <ostream>
4 #include <unordered_map>
5 #include <vector>
7 
8 namespace lug {
9 namespace Graphics {
10 
11 #define LUG_GRAPHICS_MODULES(macro) \
12  macro(Core)
13 
14 struct Module {
15  enum class Type : uint8_t {
16  #define LUG_DEFINE_GRAPHICS_MODULE_ENUM(name) name
18  #undef LUG_DEFINE_GRAPHICS_MODULE_ENUM
19  };
20 
21  const char* const name;
22  const Type type;
23 };
24 
25 extern const std::unordered_map<Module::Type, Module> LUG_GRAPHICS_API modules;
26 
27 std::ostream& operator<<(std::ostream& ss, const Module& module);
28 std::ostream& operator<<(std::ostream& ss, const Module::Type& type);
29 
30 #include <lug/Graphics/Module.inl>
31 
32 } // Graphics
33 } // lug
#define LUG_GRAPHICS_API
Definition: Export.hpp:11
const std::unordered_map< Module::Type, Module > modules
Definition: Module.cpp:6
#define LUG_GRAPHICS_MODULES(macro)
Definition: Module.hpp:11
const Type type
Definition: Module.hpp:22
const char *const name
Definition: Module.hpp:21
std::ostream & operator<<(std::ostream &ss, const Module &module)