40 bool current_program )
42 if ( current_program )
43 m_handle = dynamic_library_traits::auto_open( name );
45 m_handle = dynamic_library_traits::open( name );
47 if ( !dynamic_library_traits::valid_handle(m_handle) )
48 throw exception(
"Can't open library '" + name +
"'" );
57 dynamic_library_traits::close( m_handle );
67 return dynamic_library_traits::have_symbol( m_handle, name );
bool have_symbol(const std::string &name) const
Tell if the library has a symbol.
dynamic_library(const std::string &name, bool current_program=false)
Constructor.
A simple class to use as exception with string message.
A simple class to use as exception with string message.
A class to use dynamic libraries.
~dynamic_library()
Destructor (close the library).