Go to the documentation of this file.
50 open(
dict, libsEntry);
64 Info<<
"dlLibraryTable::~dlLibraryTable() : closing "
66 <<
" with handle " << uintptr_t(libPtrs_[i]) <<
endl;
82 if (functionLibName.size())
84 void* functionLibPtr =
dlOpen(functionLibName, verbose);
88 Info<<
"dlLibraryTable::open : opened " << functionLibName
89 <<
" resulting in handle " << uintptr_t(functionLibPtr) <<
endl;
97 <<
"could not load " << functionLibName
105 libPtrs_.append(functionLibPtr);
106 libNames_.append(functionLibName);
126 if (libNames_[i] == functionLibName)
137 Info<<
"dlLibraryTable::close : closing " << functionLibName
138 <<
" with handle " << uintptr_t(libPtrs_[index]) <<
endl;
141 bool ok =
dlClose(libPtrs_[index]);
143 libPtrs_[index] = NULL;
151 <<
"could not close " << functionLibName
169 if (libNames_[i] == functionLibName)
178 return libPtrs_[index];
187 const word& libsEntry
194 bool allOpened = !libNames.empty();
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
A class for handling words, derived from string.
A class for handling file names.
void * findLibrary(const fileName &name)
Find the handle of the named library.
#define forAll(list, i)
Loop across all elements in list.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool close(const fileName &name, const bool verbose=true)
Close the named library, optionally with warnings if problems occur.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
void * dlOpen(const fileName &lib, const bool check=true)
Open a shared library. Return handle to library. Print error message.
A list of keyword definitions, which are a keyword followed by any number of values (e....
#define forAllReverse(list, i)
Reverse loop across all elements in list.
static const fileName null
An empty fileName.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
bool open(const fileName &name, const bool verbose=true)
Open the named library, optionally with warnings if problems occur.
bool dlClose(void *)
Close a dlopened library using handle. Return true if successful.
dlLibraryTable()
Construct null.
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
~dlLibraryTable()
Destructor.