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_;
187 const entry* lookupScopedSubEntryPtr
197 const bool patternMatch,
206 const bool patternMatch,
213 void assertNoConvertUnits
215 const char* typeName,
223 T readTypeAndConvertUnits
244 template<
class ... Entries,
size_t ... Indices>
247 const std::tuple<const Entries& ...>&,
248 const std::integer_sequence<size_t, Indices ...>&
252 template<
class ... Entries>
253 void set(
const std::tuple<const Entries& ...>&);
284 template<
class ... Entries>
285 static std::tuple<
const Entries& ...>
entries(
const Entries& ...);
323 template<
class ... Entries>
324 dictionary(
const std::tuple<const Entries& ...>&);
327 template<
class ... Entries>
331 const std::tuple<const Entries& ...>&
335 template<
class ... Entries>
340 const std::tuple<const Entries& ...>&
344 template<
class ... Entries>
348 const std::tuple<const Entries& ...>&
373 return this == &
null;
404 bool recursive=
false,
405 bool patternMatch=
true
468 bool recursive=
false,
469 bool patternMatch=
true
480 bool recursive=
false,
481 bool patternMatch=
true
491 bool recursive=
false,
492 bool patternMatch=
true
504 bool recursive=
false,
505 bool patternMatch=
true
517 bool recursive=
false,
518 bool patternMatch=
true
532 bool recursive=
false,
533 bool patternMatch=
true
605 bool recursive=
false,
606 bool patternMatch=
true
620 bool recursive=
false,
621 bool patternMatch=
true
645 bool recursive=
false,
646 bool patternMatch=
true
688 const bool mustRead =
false
724 bool add(
entry*,
bool mergeEntry=
false);
729 void add(
const entry&,
bool mergeEntry=
false);
753 bool mergeEntry=
false
765 void set(
const entry&);
775 template<
class ... Entries>
776 void set(
const entry&
e,
const Entries& ...);
779 template<
class T,
class ... Entries>
780 void set(
const keyType&,
const T&,
const Entries& ...);
794 bool forceOverwrite=
false
816 virtual bool global()
const;
890 virtual bool global()
const
900 #define DECLARE_SPECIALISED_READ_TYPE(T, nullArg) \
903 T Foam::dictionary::readType \
905 const word& keyword, \
906 const unitConversion& defaultUnits, \
911 T Foam::dictionary::readType \
913 const word& keyword, \
917 #define DECLARE_SPECIALISED_READ_PAIR_TYPE(T, nullArg) \
918 DECLARE_SPECIALISED_READ_TYPE(Pair<T>, nullArg)
920 #define DECLARE_SPECIALISED_READ_LIST_TYPE(T, nullArg) \
921 DECLARE_SPECIALISED_READ_TYPE(List<T>, nullArg)
927 #undef DECLARE_SPECIALISED_READ_TYPE
928 #undef DECLARE_SPECIALISED_READ_PAIR_TYPE
929 #undef DECLARE_SPECIALISED_READ_LIST_TYPE
1010 const word& configName,
1012 const word& configFilesDir,
1021 const label lineNumber
1029 const word& keyword,
1030 const string& value,
1031 const label lineNumber
1054 const word& configType,
1058 const word& configFilesDir,
1066 template<
class EntryType>
1070 template<
class EntryType>
1074 const word& entryName,
1076 const EntryType& value
1081 template<
class EntryType>
1085 const word& entryName,
1086 const EntryType& value1,
1087 const EntryType& value2
1092 template<
class EntryType>
1096 const word& entryName,
1098 const EntryType& value1,
1099 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.
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,.
static int writeOptionalEntries
If true write optional keywords and values.
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,.
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.
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.
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.
T lookupOrDefault(const word &, const T &, const bool writeDefault=writeOptionalEntries > 0) const
Find and return a T, if not found return the given default.
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.
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.
Unit conversion structure. Contains the associated dimensions and the multiplier with which to conver...
A class for handling words, derived from string.
static const word null
An empty word.
Macro definitions for declaring ClassName(), NamespaceName(), etc.
#define DECLARE_SPECIALISED_READ_LIST_TYPE(T, nullArg)
#define DECLARE_SPECIALISED_READ_PAIR_TYPE(T, nullArg)
#define DECLARE_SPECIALISED_READ_TYPE(T, nullArg)
Specialise readType for types for which unit conversions can be performed.
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.
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.
void T(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1)
wordList listAllConfigFiles(const fileName &configFilesPath)
Return the list of configuration files in.
bool readConfigFile(const word &configType, const Tuple2< string, label > &argString, dictionary &parentDict, const fileName &configFilesPath, const word &configFilesDir, const word ®ion=word::null)
Read the specified configuration file.
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.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
Istream & operator>>(Istream &, pistonPointEdgeData &)
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)
FOR_ALL_FIELD_TYPES(makeFieldSourceTypedef)
tmp< fvMatrix< Type > > operator+(const fvMatrix< Type > &, const fvMatrix< Type > &)
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.
Foam::argList args(argc, argv)