Logo Search packages:      
Sourcecode: ardour version File versions  Download package

Glib::Module::Module ( const std::string &  file_name,
ModuleFlags  flags = ModuleFlags(0) 
) [explicit]

Opens a module.

First of all it tries to open file_name as a module. If that fails and file_name has the ".la"-suffix (and is a libtool archive) it tries to open the corresponding module. If that fails and it doesn't have the proper module suffix for the platform (G_MODULE_SUFFIX), this suffix will be appended and the corresponding module will be opended. If that fails and file_name doesn't have the ".la"-suffix, this suffix is appended and it tries to open the corresponding module.

Use operator bool() to see whether the operation succeeded. For instance,

 Glib::Module module("plugins/helloworld");
 if(module)
 {
   void* func = 0;
   bool found = get_symbol("some_function", func);
 }

Parameters:
file_name The library filename to open
flags Flags to configure the load process

Definition at line 32 of file module.cc.

:
  gobject_ (g_module_open(file_name.c_str(), (GModuleFlags) flags))
{}


Generated by  Doxygen 1.6.0   Back to index