Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Mantid::Kernel::LibraryWrapper Class Reference

Class for wrapping a shared library. More...

#include <Kernel/LibraryWrapperr.h>

Public Member Functions

 LibraryWrapper ()=default
 
 LibraryWrapper (const LibraryWrapper &)=delete
 
 LibraryWrapper (LibraryWrapper &&src) noexcept
 Move constructor. More...
 
bool openLibrary (const std::string &filepath)
 Opens a DLL. More...
 
LibraryWrapperoperator= (const LibraryWrapper &)=delete
 
LibraryWrapperoperator= (LibraryWrapper &&rhs) noexcept
 Move assignment. More...
 
 ~LibraryWrapper ()
 Destructor. More...
 

Private Attributes

void * m_module = nullptr
 An untyped pointer to the loaded library. More...
 

Detailed Description

Class for wrapping a shared library.

Author
ISIS, STFC
Date
10/01/2008

Definition at line 23 of file LibraryWrapper.h.

Constructor & Destructor Documentation

◆ LibraryWrapper() [1/3]

Mantid::Kernel::LibraryWrapper::LibraryWrapper ( )
default

◆ LibraryWrapper() [2/3]

Mantid::Kernel::LibraryWrapper::LibraryWrapper ( const LibraryWrapper )
delete

◆ LibraryWrapper() [3/3]

Mantid::Kernel::LibraryWrapper::LibraryWrapper ( LibraryWrapper &&  src)
noexcept

Move constructor.

Parameters
srcConstructor from this temporary

Definition at line 16 of file LibraryWrapper.cpp.

◆ ~LibraryWrapper()

Mantid::Kernel::LibraryWrapper::~LibraryWrapper ( )

Destructor.

Definition at line 29 of file LibraryWrapper.cpp.

References Mantid::Kernel::DllOpen::closeDll(), and m_module.

Member Function Documentation

◆ openLibrary()

bool Mantid::Kernel::LibraryWrapper::openLibrary ( const std::string &  filepath)

Opens a DLL.

Parameters
filepath:: The filepath to the directory where the library is.
Returns
True if DLL is opened or already open

Definition at line 41 of file LibraryWrapper.cpp.

References m_module, and Mantid::Kernel::DllOpen::openDll().

Referenced by Mantid::Kernel::LibraryManagerImpl::openLibrary().

◆ operator=() [1/2]

LibraryWrapper & Mantid::Kernel::LibraryWrapper::operator= ( const LibraryWrapper )
delete

◆ operator=() [2/2]

LibraryWrapper & Mantid::Kernel::LibraryWrapper::operator= ( LibraryWrapper &&  rhs)
noexcept

Move assignment.

Parameters
rhsTemporary object as source of assignment

Definition at line 22 of file LibraryWrapper.cpp.

References rhs, and Mantid::Kernel::swap().

Member Data Documentation

◆ m_module

void* Mantid::Kernel::LibraryWrapper::m_module = nullptr
private

An untyped pointer to the loaded library.

This is created and deleted by this class.

Definition at line 42 of file LibraryWrapper.h.

Referenced by openLibrary(), and ~LibraryWrapper().


The documentation for this class was generated from the following files: