There are a few issues:
- error would only throw exceptions if not parallel
- if we change this we also need to make sure the functionObjectList
construction is synchronised
- bounding box overlap was not returning the correct status so the code
to avoid the issue of 'badly formed bounding box' was not triggered.
- actually prevent this type of thing:
Switch sw;
sw = "none";
without relinquishing automatic conversion to/from bool.
Nonetheless, make construct from string explicit.
- Added some minor optimization for the lookup of the switch names.
- the tokenType was being send via write(char), which includes
isspace filtering. If the tokenType enumeration coincides
with a whitespace character, it would be suppressed.
Now add character directly to the buffer.
STYLE: some additional minor private methods to help refactoring
- readStringFromBuffer, writeStringToBuffer for common string
operation.
- this reduces the number of functions and allows lazy loading of
completion options, which makes it easy to quickly add any other
OpenFOAM application in completion.
The generic '_of_complete_' function handles (bash) completion for
any OpenFOAM application. On the first call for any particular
application, it retrieves the available options from the application
help output and adds this information to its environmental cache for
subsequent use.
- Tcsh completion uses the same function via a bash wrapper.
But since its wrapper is transient, the on-the-fly generation would
be less efficient. For this case, a pre-generated completion_cache
can be used, which is generated with
bin/tools/foamCreateCompletionCache
- handles the case where we are currently completing something that
does not appear to be an option. For example,
foamDictionary -expanded someD[TAB]
should complete the filename, not present more options.
- The logic for switching input-mode was previously completely
encapsulated within the #inputMode directive, but without any
programming equivalent. Furthermore, the encapsulation in inputMode
made the logic less clear in other places.
Exposing the inputMode as an enum with direct access from entry
simplifies things a fair bit.
- eliminate one level of else/if nesting in entryIO.C for clearer logic
- for dictionary function entries, simply use
addNamedToMemberFunctionSelectionTable() and avoid defining a type()
as a static. For most function entries the information is only used
to get a name for the selection table lookup anyhow.
- although this has been supported for many years, the tutorials
continued to use "convertToMeters" entry, which is specific to blockMesh.
The "scale" is more consistent with other dictionaries.
ENH:
- ignore "scale 0;" (treat as no scaling) for blockMeshDict,
consistent with use elsewhere.
- currently no cleanup of completions when deactivating an OpenFOAM
tcsh environment
- tab completion with directories adds a space after the slash, which
makes navigation a bit annoying.
- useful operations for other string representations of fileName types.
The return type is in general a std::string with any narrowing
being done by the caller on the return value.
- consolidate word::validated() into word::validate() and also allow
as short form for string::validate<word>(). Also less confusing than
having similarly named methods that essentially do the same thing.
- more consistent const access when iterating over strings
- add valid(char) for keyType and wordRe