Newer
Older
//----------------------------------------------------------------------
// Includes
//----------------------------------------------------------------------
#include "MantidKernel/DllOpen.h"
#include "MantidKernel/LibraryManager.h"
Russell Taylor
committed
{
namespace Kernel
// Get a reference to the logger
Logger& LibraryManager::log = Logger::get("LibraryManager");
LibraryManager::LibraryManager() : module(0)
LibraryManager::~LibraryManager()
{
//Close lib
if (module)
{
DllOpen::CloseDll(module);
module = 0;
}
/** Opens a DLL
* @param libName The name of the file to open (not including the lib/so/dll)
* @return True if DLL is opened or already open
*/
bool LibraryManager::OpenLibrary(const std::string& libName)
//Load dynamically loaded library
module = DllOpen::OpenDll(libName);
log.error("Could not open library: " + libName);
Russell Taylor
committed
} // namespace Kernel
} // namespace Mantid