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__ static bool valid_handle(handle h)
Tell if an handle is a valid library handle.
static handle auto_open(const std::string &name)
Open the current program.
dynamic_library_traits_unix dynamic_library_traits
The traits to access the dynamic libraries in Unix system.
static void close(handle h)
Close a library.
A simple class to use as exception with string message.
void * handle
Type of the system handle to the library.
A simple class to use as exception with string message.
static bool have_symbol(handle h, const std::string &name)
Tell if a symbol is in the library.
static T get_symbol(handle h, const std::string &name)
Get a symbol from a library.
This is the main namespace.
Unix interface for using dynamic libraries.
static handle open(const std::string &name)
Open a library.