37 #ifndef H_OGF_BASIC_MODULES_MODMGR_H
38 #define H_OGF_BASIC_MODULES_MODMGR_H
77 typedef void (*function_ptr)();
116 bool load_module(
const std::string& module_name,
bool quiet =
false) ;
130 const std::string& module_name,
Module* module
160 const std::string& name, std::string& value
173 const std::string& name,
const std::string& value
223 std::vector<ModuleTerminateFunc> to_terminate_ ;
224 std::vector<void*> module_handles_ ;
225 std::map<std::string, Module_var> modules_ ;
Manages dynamically loadable modules.
bool load_module(const std::string &module_name, bool quiet=false)
Loads a dynamic module.
Module * resolve_module(const std::string &module_name)
Retreives a Module object by name.
ModuleManager()
Forbids construction by client code.
bool bind_module(const std::string &module_name, Module *module)
Declares a Module object to the ModuleManager.
static ModuleManager * instance()
Gets a pointer to the ModuleManager instance.
~ModuleManager()
Forbids destruction by client code.
void do_terminate_modules()
Terminates all the modules registered in the system.
static void append_dynamic_libraries_path(const std::string &path)
Adds a path where dynamic libraries can be loaded.
virtual bool set_local_value(const std::string &name, const std::string &value)
overloads Environment::set_local_value()
static void initialize()
Initializes the ModuleManager system.
static void terminate()
Terminates the ModuleManager system.
static void * resolve_symbol(const std::string &name)
Finds a pointer to a symbol by its name.
virtual bool get_local_value(const std::string &name, std::string &value) const
overloads Environment::get_local_value()
static void terminate_dynamic_modules()
Terminates the dynamic modules.
bool unbind_module(const std::string &module_name)
Removes a Module object from the ModuleManager.
static function_ptr resolve_function(const std::string &name)
Finds a pointer to a function by its name.
Represents information associated with a module (i.e. a plugin).
Provides a mechanism to store global variables, retrieve them by their names and attach observers to ...
void(* ModuleInitFunc)()
Function pointer to a module initialization function.
void(* ModuleTerminateFunc)()
Function pointer to a module termination function.
Class to represent information about a Graphite/// module (i.e. a plugin).
Global Graphite namespace.
Definitions common to all include files in the basic library.