43#ifndef dlLibraryTable_H
44#define dlLibraryTable_H
58Ostream&
operator<<(Ostream&
os,
const InfoProxy<dlLibraryTable>& info);
69 static std::unique_ptr<dlLibraryTable> global_;
85 static bool functionHook
89 const std::string& funcName,
91 const std::string& context
97 void* openLibrary(
const fileName& libName,
bool verbose);
153 std::initializer_list<fileName> libNames,
161 const word& libsEntry,
171 const word& libsEntry,
199 const std::string& funcName,
200 const bool verbose =
false,
201 const std::string& context =
""
211 const std::string& funcName,
212 const bool verbose =
false,
213 const std::string& context =
""
253 bool open(
bool verbose =
true);
258 void*
open(
const fileName& libName,
bool verbose =
true);
268 std::initializer_list<fileName> libNames,
274 void close(
bool verbose =
true);
287 const word& libsEntry,
299 template<
class TablePtr>
303 const word& libsEntry,
304 const TablePtr& tablePtr,
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
A helper class for outputting values to Ostream.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A table of dynamically loaded libraries.
bool open(bool verbose=true)
void operator=(const dlLibraryTable &)=delete
No copy assignment.
const UList< void * > & pointers() const
Pointers to the libraries in use. Access with caution.
static bool unloadHook(void *handle, const std::string &funcName, const bool verbose=false, const std::string &context="")
label size() const
The number of libraries loaded by the table.
static dlLibraryTable & libs()
Table of global libraries.
void(* loaderType)(bool)
Global loader/unloader function type (C-linkage)
bool empty() const
True if there are no libraries loaded by the table.
List< fileName > loaded() const
Names of the libraries in use.
~dlLibraryTable()
Destructor. Closes all libraries loaded by the table.
bool append(const fileName &libName)
Add to the list of names, but do not yet open.
const UList< fileName > & names() const
Names of the libraries in use, or requested.
static bool loadHook(void *handle, const std::string &funcName, const bool verbose=false, const std::string &context="")
void * findLibrary(const fileName &libName)
Find the handle of the named library.
ClassName("dlLibraryTable")
Declare name of the class and its debug switch.
dlLibraryTable(dlLibraryTable &&)=default
Move construct.
static word fullname(word libName)
Library fullname, prefix with 'lib', suffix with '.so'.
void clear()
Clears the table, without attempting to close the libraries.
InfoProxy< dlLibraryTable > info() const
Return info proxy.
static word basename(const fileName &libPath)
Library basename without leading 'lib' or trailing '.so'.
dlLibraryTable(const dlLibraryTable &)=delete
No copy construct.
dlLibraryTable & operator=(dlLibraryTable &&)=default
Move assignment.
static int dlcloseOnTerminate
Use dlclose() when clearing the dlLibraryTable.
dlLibraryTable()=default
Default construct.
void close(bool verbose=true)
A class for handling file names.
A class for handling words, derived from Foam::string.
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
OBJstream os(runTime.globalPath()/outputName)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)