61int main(
int argc,
char *argv[])
63 argList::addNote(
"Test if given libraries can be loaded");
67 argList::noParallel();
68 argList::removeOption(
"case");
69 argList::removeOption(
"noFunctionObjects");
70 argList::addBoolOption
73 "Success if any of the libraries can be loaded\n"
74 "(does not short-circuit)"
76 argList::addBoolOption
81 argList::addVerboseOption
83 "Additional verbosity"
86 argList::addArgument(
"lib...");
87 argList::noMandatoryArgs();
104 for (
int argi = 1; argi <
args.
size(); ++argi)
118 const void* ptr = libs.
open(libName,
false);
138 InfoErr <<
"Already loaded " << libName <<
nl;
149 return (nbad == 0 || (testOr && ngood > 0)) ? 0 : 1;
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
Extract command arguments and options from the supplied argc and argv parameters.
T get(const label index) const
Get a value from the argument at index.
int verbose() const noexcept
Return the verbose flag.
label size() const noexcept
The number of arguments.
bool found(const word &optName) const
Return true if the named option is found.
dlLibraryTable & libs() const noexcept
Mutable access to the loaded dynamic libraries.
A table of dynamically loaded libraries.
bool open(bool verbose=true)
InfoProxy< dlLibraryTable > info() const
Return info proxy.
A class for handling file names.
A class for handling words, derived from Foam::string.
messageStream InfoErr
Information stream (stderr output on master, null elsewhere)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
constexpr char nl
The newline '\n' character (0x0a)
Foam::argList args(argc, argv)