30#include <casacore/casa/aips.h>
103 const std::string& prefix=std::string(),
104 const std::string& funcName=std::string(),
105 bool closeOnDestruction=
True);
110 const std::string& prefix,
111 const std::string& version,
112 const std::string& funcName,
113 bool closeOnDestruction=
True);
120 Bool closeOnDestruction,
121 const std::string& prefix=
"lib",
123 const std::string& suffix=
".dylib");
125 const std::string& suffix=
".so");
163 const std::string& prefix,
164 const std::string& version,
165 const std::string& funcName);
171 const std::string& libdir,
172 const std::string& prefix,
173 const std::string& version);
176 void open (
const std::string& name);
183 const std::string& prefix,
184 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.
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.