Btk
module.hpp
1 #if !defined(_BTK_MODULE_HPP_)
2 #define _BTK_MODULE_HPP_
3 #include <string_view>
4 #include "defs.hpp"
5 
6 #define BTK_MODULE_INIT() extern "C" void BtkModule_Init(Btk::Module& mod)
7 #define BTK_MODULE_QUIT() extern "C" void BtkModule_Quit(Btk::Module& mod)
8 
9 namespace Btk{
10  struct Module{
11  typedef void (*QuitFn)(Module &);
12  typedef void (*InitFn)(Module &);
13  InitFn init = nullptr;
14  QuitFn quit = nullptr;
15 
16  void *data = nullptr;//< Private data for Module
17  void *handle = nullptr;
18  std::string_view name;
19  void unload();
20  };
21  BTKAPI void LoadModule(std::string_view module_name);
22  BTKAPI bool HasModule(std::string_view module_name);
23 };
24 
25 
26 #endif // _BTK_MODULE_HPP_
This header include many useful containers.
Definition: async.hpp:7
Definition: module.hpp:10