Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

shared_library class

Provides for automatic loading of named modules, and retrieval of functions in those modules:

shared_library m("my_module_name");
// Call a function that returns an int and takes a float parameter.
int result = m.get<int, float>("function_name")(5.0f);
m.close();

The get() function returns a function pointer that can be wrapped in Boost.Function objects or used by itself.

Reference: shared_library


PrevUpHomeNext