30#include <casacore/casa/aips.h>
100 DynLib(
const std::string& library,
const std::string& prefix = std::string(),
101 const std::string& funcName = std::string(),
bool closeOnDestruction =
True);
105 DynLib(
const std::string& library,
const std::string& prefix,
const std::string& version,
106 const std::string& funcName,
bool closeOnDestruction =
True);
112 DynLib(
const std::string& library,
Bool closeOnDestruction,
const std::string& prefix =
"lib",
114 const std::string& suffix =
".dylib");
116 const std::string& suffix =
".so");
151 void attach(
const std::string&
name,
const std::string& prefix,
const std::string& version,
152 const std::string& funcName);
157 std::string
tryOpen(
const std::string&
name,
const std::string& libdir,
const std::string& prefix,
158 const std::string& version);
168 const std::string& version);
void open(const std::string &name)
Open (load) the dynamic library.
void * getFunc(const std::string &funcName)
Get a pointer to a function in the dynamic library.
DynLib(const std::string &library, const std::string &prefix, const std::string &version, const std::string &funcName, bool closeOnDestruction=True)
The same as above, but it is tried with and without the given version (in that order).
DynLib(const std::string &library, Bool closeOnDestruction, const std::string &prefix="lib", const std::string &suffix=".so")
Load the dynamic library with the given name, prefix, and suffix.
void * getHandle() const
Get the dynamic library handle.
void close()
Close (unload) the dynamic library (if opened).
std::string tryCasacorePath(const std::string &library, const std::string &prefix, const std::string &version)
Try if the library can be opened using CASACORE_LDPATH.
std::string tryOpen(const std::string &name, const std::string &libdir, const std::string &prefix, const std::string &version)
Try to open the library with some prefixes, suffixes and versions If successful, itsHandle is filled ...
void attach(const std::string &name, const std::string &prefix, const std::string &version, const std::string &funcName)
Try to open the library with some prefixes, suffixes and versions and to execute the initialization f...
DynLib(const std::string &library, const std::string &prefix=std::string(), const std::string &funcName=std::string(), bool closeOnDestruction=True)
Load the dynamic library.
const std::string & getError() const
Get the possible error.
~DynLib()
Close the dynamic library if told so in the constructor.
For temporary backward namespace compatibility, use casa as alias for casacore.
String name() const
Return the name of the field.
bool Bool
Define the standard types used by Casacore.