75 Ostream&
operator<<(Ostream&,
const dictionary&);
105 name_(move(
name.name_))
126 const word scopedName = name_.
name();
130 if (i == scopedName.npos)
136 return scopedName.substr(i + 1, scopedName.npos);
150 name_ = move(
name.name_);
173 mutable const Istream* filePtr_;
197 const entry* lookupScopedSubEntryPtr
207 const bool patternMatch,
216 const bool patternMatch,
231 template<
class ... Entries,
size_t ... Indices>
234 const std::tuple<const Entries& ...>&,
235 const std::integer_sequence<size_t, Indices ...>&
239 template<
class ... Entries>
240 void set(
const std::tuple<const Entries& ...>&);
268 template<
class ... Entries>
269 static std::tuple<
const Entries& ...>
entries(
const Entries& ...);
307 template<
class ... Entries>
308 dictionary(
const std::tuple<const Entries& ...>&);
311 template<
class ... Entries>
315 const std::tuple<const Entries& ...>&
319 template<
class ... Entries>
324 const std::tuple<const Entries& ...>&
328 template<
class ... Entries>
332 const std::tuple<const Entries& ...>&
357 return this == &
null;
392 bool recursive=
false,
393 bool patternMatch=
true
456 bool recursive=
false,
457 bool patternMatch=
true
468 bool recursive=
false,
469 bool patternMatch=
true
479 bool recursive=
false,
480 bool patternMatch=
true
487 template<
class T,
class DefaultUnits>
492 bool recursive=
false,
493 bool patternMatch=
true
505 bool recursive=
false,
506 bool patternMatch=
true
515 template<
class T,
class DefaultUnits>
520 bool recursive=
false,
521 bool patternMatch=
true
533 template<
class T,
class DefaultUnits>
554 template<
class T,
class DefaultUnits>
582 bool recursive=
false,
583 bool patternMatch=
true
591 template<
class T,
class DefaultUnits>
597 bool recursive=
false,
598 bool patternMatch=
true
622 bool recursive=
false,
623 bool patternMatch=
true
665 const bool mustRead =
false
714 bool add(
entry*,
bool mergeEntry=
false);
719 void add(
const entry&,
bool mergeEntry=
false);
743 bool mergeEntry=
false
755 void set(
const entry&);
761 template<
class ... Entries>
762 void set(
const keyType&,
const std::tuple<const Entries& ...>&);
769 template<
class ... Entries>
770 void set(
const entry&
e,
const Entries& ...);
773 template<
class T,
class ... Entries>
774 void set(
const keyType&,
const T&,
const Entries& ...);
788 bool forceOverwrite=
false
810 virtual bool global()
const;
884 virtual bool global()
const
969 const word& configName,
971 const word& configFilesDir,
980 const label lineNumber
990 const label lineNumber
1013 const word& configType,
1017 const word& configFilesDir,
1026 template<
class EntryType>
1030 template<
class EntryType,
class DefaultUnits>
1034 const word& entryName,
1035 const DefaultUnits& defaultUnits,
1036 const EntryType& value
1041 template<
class EntryType>
1045 const word& entryName,
1046 const EntryType& value1,
1047 const EntryType& value2
1052 template<
class EntryType,
class DefaultUnits>
1056 const word& entryName,
1057 const DefaultUnits& defaultUnits,
1058 const EntryType& value1,
1059 const EntryType& value2
Non-intrusive doubly-linked list.
Intrusive doubly-linked list.
graph_traits< Graph >::vertices_size_type size_type
An STL-conforming hash table.
Template class for intrusive linked lists.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An STL-conforming const_iterator.
An STL-conforming iterator.
Template class for non-intrusive linked lists.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A 2-tuple for storing two objects of different types.
A 3-tuple for storing three objects of different types.
An STL-conforming const_iterator.
An STL-conforming iterator.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
const word dictName() const
Return the local dictionary name (final part of scoped name)
void operator=(const dictionaryName &name)
dictionaryName()
Construct dictionaryName null.
const fileName & name() const
Return the dictionary name.
includedDictionary(const fileName &fName, const dictionary &parentDict)
Construct an included dictionary for the given parent.
virtual ~includedDictionary()
Destructor.
virtual bool global() const
Return true if the dictionary global,.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
T lookupOrDefault(const word &, const T &) const
Find and return a T, if not found return the given default.
const dictionary & topDict() const
Return the top of the tree.
ITstream & operator[](const word &) const
Find and return entry.
dictionary()
Construct top-level dictionary null.
autoPtr< dictionary > clone() const
Construct and return clone.
virtual bool global() const
Return true if the dictionary global,.
void operator<<=(const dictionary &)
Unconditionally include entries from the given dictionary.
void transfer(dictionary &)
Transfer the contents of the argument and annul the argument.
bool read(Istream &, const bool keepHeader=false)
Read dictionary from Istream, optionally keeping the header.
const dictionary & subDictBackwardsCompatible(const wordList &) const
Find and return a sub-dictionary, trying a list of keywords in.
const entry * lookupEntryPtr(const word &, bool recursive, bool patternMatch) const
Find and return an entry data stream pointer if present.
const dictionary & subOrEmptyDict(const word &, const bool mustRead=false) const
Find and return a sub-dictionary.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
bool changeKeyword(const keyType &oldKeyword, const keyType &newKeyword, bool forceOverwrite=false)
Change the keyword for an entry,.
const dictionary & typeDict(const word &typeName) const
Find and return a type sub-dictionary.
T lookupOrAddDefault(const word &, const T &)
Find and return a T, if not found return the given.
tokenList tokens() const
Return the dictionary as a list of tokens.
const fileName & currentName() const
Return the dictionary name, or the name of the file if the.
bool substituteKeyword(const word &keyword)
Substitute the given keyword prepended by '$' with the.
void write(Ostream &, const bool subDict=true) const
Write dictionary, normally with sub-dictionary formatting.
const entry & lookupEntry(const word &, bool recursive, bool patternMatch) const
Find and return an entry data stream if present otherwise error.
List< keyType > keys(bool patterns=false) const
Return the list of available keys or patterns.
T lookupOrDefaultBackwardsCompatible(const wordList &, const T &) const
Find and return a T, trying a list of keywords in sequence,.
void operator+=(const dictionary &)
Include entries from the given dictionary.
const dictionary & optionalSubDict(const word &) const
Find and return a sub-dictionary if found.
const entry * lookupScopedEntryPtr(const word &, bool recursive, bool patternMatch) const
Find and return an entry data stream pointer if present,.
word topDictKeyword() const
Return the scoped keyword with which this dictionary can be.
bool remove(const word &)
Remove an entry specified by keyword.
bool isDict(const word &) const
Check if entry is a sub-dictionary.
const dictionary & parent() const
Return the parent dictionary.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
const entry & lookupEntryBackwardsCompatible(const wordList &, bool recursive, bool patternMatch) const
Find and return an entry data stream if present, trying a list.
virtual label endLineNumber() const
Return line number of last token in dictionary.
wordList sortedToc() const
Return the sorted table of contents.
const dictionary & typeOrEmptyDict(const word &typeName) const
Find and return a type sub-dictionary.
friend Istream & operator>>(Istream &, dictionary &)
Read dictionary from Istream.
const entry * lookupEntryPtrBackwardsCompatible(const wordList &, bool recursive, bool patternMatch) const
Find and return an entry data stream if present, trying a list.
bool isNull() const
Return whether this dictionary is null.
void operator|=(const dictionary &)
Conditionally include entries from the given dictionary.
bool add(entry *, bool mergeEntry=false)
Add a new entry.
void clear()
Clear the dictionary.
virtual ~dictionary()
Destructor.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
ITstream & lookupBackwardsCompatible(const wordList &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream, trying a list of keywords.
const dictionary * subDictPtr(const word &) const
Find and return a sub-dictionary pointer if present.
void operator=(const dictionary &)
wordList toc() const
Return the table of contents.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
const T & lookupCompoundScoped(const word &keyword, bool recursive, bool patternMatch) const
Find return the reference to the compound T,.
const dictionary & scopedDict(const word &) const
Find and return a sub-dictionary by scoped lookup.
virtual label startLineNumber() const
Return line number of first token in dictionary.
friend Ostream & operator<<(Ostream &, const dictionary &)
Write dictionary to Ostream.
static autoPtr< dictionary > New(Istream &)
Construct top-level dictionary on freestore from Istream.
bool merge(const dictionary &)
Merge entries from the given dictionary.
static std::tuple< const Entries &... > entries(const Entries &...)
Construct an entries tuple from which to make a dictionary.
const dictionary & optionalTypeDict(const word &typeName) const
Find and return an optional type sub-dictionary.
SHA1Digest digest() const
Return the SHA1 digest of the dictionary contents.
T lookupScoped(const word &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
A keyword and a list of tokens is an 'entry'.
A class for handling file names.
word name() const
Return file name (part beyond last /)
A class for handling keywords in dictionaries.
static const string null
An empty string.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
A class for handling words, derived from string.
static const word null
An empty word.
Macro definitions for declaring ClassName(), NamespaceName(), etc.
Include the header files for all the primitive types that Fields are instantiated for.
fileName findConfigFile(const word &configName, const fileName &configFilesPath, const word &configFilesDir, const word ®ion=word::null)
Search for configuration file for given region.
Istream & operator>>(Istream &, pointEdgeDist &)
void writeEntryIfDifferent(Ostream &os, const word &entryName, const EntryType &value1, const EntryType &value2)
Helper function to write the keyword and entry only if the.
void dictArgList(const Tuple2< string, label > &argString, word &configName, List< Tuple2< wordRe, label >> &args, List< Tuple3< word, string, label >> &namedArgs)
Parse dictionary substitution argument list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
wordList listAllConfigFiles(const fileName &configFilesPath)
Return the list of configuration files in.
tmp< DimensionedField< typename typeOfSum< Type1, Type2 >::type, GeoMesh, Field > > operator+(const DimensionedField< Type1, GeoMesh, PrimitiveField1 > &df1, const DimensionedField< Type2, GeoMesh, PrimitiveField2 > &df2)
const fvMesh & region(const dictionary &dict)
Cast the give dictionary to the corresponding region fvMesh.
Pair< word > dictAndKeyword(const word &scopedName)
Extracts dict name and keyword.
void addArgEntry(dictionary &dict, const word &keyword, const string &value, const label lineNumber)
Add the keyword value pair to dict.
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)
void T(GeometricField< Type, GeoMesh, PrimitiveField1 > &gf, const GeometricField< Type, GeoMesh, PrimitiveField2 > &gf1)
void writeEntry(Ostream &os, const word &key, const DimensionedFieldFunction< DimensionedFieldType > &f)
HashSet< Key, Hash > operator|(const HashSet< Key, Hash > &hash1, const HashSet< Key, Hash > &hash2)
Combine entries from HashSets.
string expandArg(const string &arg, dictionary &dict, const label lineNumber)
Expand arg within the dict context and return.
bool readConfigFile(const word &configType, const Tuple2< string, label > &argString, dictionary &parentDict, const fileName &configFilesPath, const word &configFilesDir, const word ®ion=word::null, const string &command=string::null)
Read the specified configuration file.
Foam::argList args(argc, argv)