GLIM
Loading...
Searching...
No Matches
extension_module.hpp
1#pragma once
2
3#include <memory>
4
5namespace glim {
6
11public:
13 virtual ~ExtensionModule() {}
14
18 virtual bool needs_wait() const { return false; }
19
23 virtual bool ok() const { return true; }
24
28 virtual void at_exit(const std::string& dump_path) {}
29
35 static std::shared_ptr<ExtensionModule> load_module(const std::string& so_name);
36
41 static void export_classes(const std::string& so_name);
42};
43
44} // namespace glim
Extension module to be dynamically loaded via dynamic linking.
Definition extension_module.hpp:10
virtual bool needs_wait() const
Check if the module is behind the main mapping process.
Definition extension_module.hpp:18
virtual void at_exit(const std::string &dump_path)
Called when the system is quitting.
Definition extension_module.hpp:28
static void export_classes(const std::string &so_name)
Export classes (factors) from a dynamic library.
static std::shared_ptr< ExtensionModule > load_module(const std::string &so_name)
Load an extension module from a dynamic library.
virtual bool ok() const
Check if the module is alive. (If it returns false, the system will be shutdown)
Definition extension_module.hpp:23