Go to the documentation of this file.
30 #ifndef __CLAW_DYNAMIC_LIBRARY_TRAITS_UNIX_HPP__
31 #define __CLAW_DYNAMIC_LIBRARY_TRAITS_UNIX_HPP__
58 handle h = dlopen( name.c_str(), RTLD_LAZY );
74 handle h = dlopen( NULL, RTLD_LAZY );
104 *(
void**)(&result) = dlsym( h, name.c_str() );
117 return dlsym( h, name.c_str() ) != NULL;
137 #endif // __CLAW_DYNAMIC_LIBRARY_TRAITS_UNIX_HPP__
void * handle
Type of the system handle to the library.
Unix interface for using dynamic libraries.
This is the main namespace.
static bool valid_handle(handle h)
Tell if an handle is a valid library handle.
static handle open(const std::string &name)
Open a library.
static T get_symbol(handle h, const std::string &name)
Get a symbol from a library.
static void close(handle h)
Close a library.
static bool have_symbol(handle h, const std::string &name)
Tell if a symbol is in the library.
A simple class to use as exception with string message.
A simple class to use as exception with string message.
dynamic_library_traits_unix dynamic_library_traits
The traits to access the dynamic libraries in Unix system.
static handle auto_open(const std::string &name)
Open the current program.