29 #ifndef __TERRALIB_CORE_LIB_LIBRARY_H__
30 #define __TERRALIB_CORE_LIB_LIBRARY_H__
33 #include "../Config.h"
39 #include <boost/noncopyable.hpp>
90 Library(
const std::string& slib_file_name,
const bool& delay_load =
false);
150 #if(TE_PLATFORM == TE_PLATFORMCODE_MSWINDOWS)
A class for handling shared libraries (DLLs, SO, DyLibs).
static std::string getSearchPath()
Returns the system lookup path.
const std::string & getFileName() const
Return the shared library file name as informed in the constructor.
static void resetSearchPath()
Comes back the application lookup path to the original state, before any add_search_dir has been call...
~Library()
The destructor automatically unloads from memory the shared library if it was not unloaded explicitly...
bool isLoaded() const
Return true if the shared library is loaded otherwise return false.
static std::string getNativeName(const std::string &name)
Given a shared library name without file extensions, prefixes and nor suffixes it will construct a li...
void load()
Load the shared library to memory.
static void addSearchDir(const std::string &dir_name)
Add the informed dir to the path used by the operational system to lookup for shared libraries.
Library(const std::string &slib_file_name, const bool &delay_load=false)
Load a new shared library.
void * getAddress(const char *symbol) const
Return the address where the given symbol is loaded into memory.
void unload()
Force the unload of the shared library from memory.