Go to the documentation of this file.
47 else if (dict1.size() != dict2.size())
67 const entry& entry1 = iter1();
68 const entry& entry2 = *entryPtr;
80 ok = (entry1 == entry2);
97 int main(
int argc,
char *argv[])
134 <<
"- disabling rewrite for this file" <<
nl;
143 bool changed =
false;
144 for (
label orig = 0; orig < names.
size()-1; ++orig)
154 for (
label check = orig+1; check < names.
size(); ++check)
167 names[orig] +=
"|" + names[check];
168 names[check].
clear();
178 if (names[nameI].empty())
180 solverDict.
remove(oldNames[nameI]);
181 Info<<
" #remove " << oldNames[nameI];
185 Info<<
" " << oldNames[nameI];
187 if (names[nameI] != oldNames[nameI])
190 keyType renamed(
"(" + names[nameI] +
")",
true);
194 Info<<
" -> " << renamed;
203 Info<<
"Backup to .orig" <<
nl
215 Info<<
"\nFile not rewritten" <<
endl;
225 return changed ? 0 : 1;
A keyword and a list of tokens is an 'entry'.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from string.
#define forAll(list, i)
Loop across all elements in list.
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
bool remove(const word &)
Remove an entry specified by keyword.
Extract command arguments and options from the supplied argc and argv parameters.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const fileName & instance() const
const fileName & rootPath() const
Return root path.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
fileName objectPath() const
Return complete path + object name.
bool changeKeyword(const keyType &oldKeyword, const keyType &newKeyword, bool forceOverwrite=false)
Change the keyword for an entry,.
const word dictName("particleTrackDict")
A class for handling keywords in dictionaries.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
virtual bool isDict() const
Return true if this entry is a dictionary.
const word & system() const
Return system name.
bool mvBak(const fileName &, const std::string &ext="bak")
Rename to a corresponding backup file.
bool checkDictionaryContent(const dictionary &dict1, const dictionary &dict2)
A list of keyword definitions, which are a keyword followed by any number of values (e....
virtual const dictionary & dict() const =0
Return dictionary if this entry is a dictionary.
static Stream & writeDivider(Stream &os)
Write the standard file section divider.
const entry * lookupEntryPtr(const word &, bool recursive, bool patternMatch) const
Find and return an entry data stream pointer if present.
int main(int argc, char *argv[])
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void clear()
Clear the list, i.e. set size to zero.
bool optionFound(const word &opt) const
Return true if the named option is found.
const fileName & caseName() const
Return case name (parallel run) or global case (serial run)
fvSolution solutionDict(runTime)
wordList toc() const
Return the table of contents.
void size(const label)
Override size to be inconsistent with allocated storage.
static void noParallel()
Remove the parallel options.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
Foam::argList args(argc, argv)
bool isPattern() const
Should be treated as a match rather than a literal string?