61 int main(
int argc,
char *argv[])
73 "Success if any of the libraries can be loaded\n" 74 "(does not short-circuit)" 101 for (
int argi = 1; argi <
args.
size(); ++argi)
115 const void* ptr = libs.
open(libName,
false);
135 InfoErr <<
"Already loaded " << libName <<
nl;
146 return (nbad == 0 || (testOr && ngood > 0)) ? 0 : 1;
static void noFunctionObjects(bool addWithOption=false)
Remove '-noFunctionObjects' option and ignore any occurrences.
static void addNote(const string ¬e)
Add extra notes for the usage information.
A class for handling file names.
static void noMandatoryArgs()
Flag command arguments as being optional (non-mandatory)
messageStream InfoErr
Information stream (stderr output on master, null elsewhere)
constexpr char nl
The newline '\n' character (0x0a)
InfoProxy< dlLibraryTable > info() const noexcept
Return info proxy, used to print library table information to a stream.
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
static void noParallel()
Remove the parallel options.
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
static void disable() noexcept
Disallow profiling - turns the InfoSwitch off.
static void removeOption(const word &optName)
Remove option from validOptions and from optionUsage.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
A class for handling words, derived from Foam::string.
Extract command arguments and options from the supplied argc and argv parameters. ...
label size() const noexcept
The number of arguments.
A table of dynamically loaded libraries.
static void addVerboseOption(const string &usage="", bool advanced=false)
Enable a 'verbose' bool option, with usage information.
dlLibraryTable & libs() const noexcept
Mutable access to the loaded dynamic libraries.
T get(const label index) const
Get a value from the argument at index.
static void addArgument(const string &argName, const string &usage="")
Append a (mandatory) argument to validArgs.
static void noBanner()
Disable emitting the banner information.
bool open(bool verbose=true)
Open named, but unopened libraries. These names will normally have been added with the append() metho...
Foam::argList args(argc, argv)
int verbose() const noexcept
Return the verbose flag.
bool found(const word &optName) const
Return true if the named option is found.