Go to the documentation of this file.
73 Ostream&
operator<<(Ostream&,
const dictionary&);
122 if (i == scopedName.npos)
128 return scopedName.substr(i + 1, scopedName.npos);
167 const bool patternMatch,
176 const bool patternMatch,
281 bool recursive=
false,
282 bool patternMatch =
true
323 bool recursive=
false,
324 bool patternMatch=
true
336 bool recursive=
false,
337 bool patternMatch=
true
349 bool recursive=
false,
350 bool patternMatch=
true
362 bool recursive=
false,
363 bool patternMatch=
true
393 const bool mustRead =
false
416 bool add(
entry*,
bool mergeEntry=
false);
421 void add(
const entry&,
bool mergeEntry=
false);
429 void add(
const keyType&,
const string&,
bool overwrite=
false);
437 void add(
const keyType&,
const scalar,
bool overwrite=
false);
445 bool mergeEntry=
false
451 void add(
const keyType&,
const T&,
bool overwrite=
false);
475 bool forceOverwrite=
false
542 dictionary
operator+(
const dictionary& dict1,
const dictionary& dict2);
547 dictionary
operator|(
const dictionary& dict1,
const dictionary& dict2);
A keyword and a list of tokens is an 'entry'.
const dictionary & parent_
Parent dictionary.
friend Istream & operator>>(Istream &, dictionary &)
Read dictionary from Istream.
static autoPtr< dictionary > New(Istream &)
Construct top-level dictionary on freestore from Istream.
const word dictName() const
Return the local dictionary name (final part of scoped name)
const entry & lookupEntry(const word &, bool recursive, bool patternMatch) const
Find and return an entry data stream if present otherwise error.
friend Ostream & operator<<(Ostream &, const dictionary &)
Write dictionary to Ostream.
A class for handling words, derived from string.
A class for handling file names.
Non-intrusive doubly-linked list.
ITstream & operator[](const word &) const
Find and return entry.
const fileName & name() const
Return the dictionary name.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
dictionary()
Construct top-level dictionary null.
void operator<<=(const dictionary &)
Unconditionally include entries from the given dictionary.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
bool remove(const word &)
Remove an entry specified by keyword.
void operator=(const dictionary &)
A simple container for copying or transferring objects of type <T>.
bool isDict(const word &) const
Check if entry is a sub-dictionary.
word name() const
Return file name (part beyond last /)
List< keyType > keys(bool patterns=false) const
Return the list of available keys or patterns.
bool changeKeyword(const keyType &oldKeyword, const keyType &newKeyword, bool forceOverwrite=false)
Change the keyword for an entry,.
A class for handling keywords in dictionaries.
bool substituteKeyword(const word &keyword)
Substitute the given keyword prepended by '$' with the.
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.
Intrusive doubly-linked list.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
HashTable< entry * > hashedEntries_
HashTable of the entries held on the DL-list for quick lookup.
Macro definitions for declaring ClassName(), NamespaceName(), etc.
virtual ~dictionary()
Destructor.
label startLineNumber() const
Return line number of first token in dictionary.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
label endLineNumber() const
Return line number of last token in dictionary.
const dictionary & parent() const
Return the parent dictionary.
bool merge(const dictionary &)
Merge entries from the given dictionary.
graph_traits< Graph >::vertices_size_type size_type
Ostream & operator<<(Ostream &, const edgeMesh &)
const dictionary & topDict() const
Return the top of the tree.
const entry * lookupScopedEntryPtr(const word &, bool recursive, bool patternMatch) const
Find and return an entry data stream pointer if present.
dictionaryName()
Construct dictionaryName null.
dictionaryName(const fileName &name)
Construct dictionaryName as copy of the given fileName.
A list of keyword definitions, which are a keyword followed by any number of values (e....
DLList< autoPtr< regExp > > patternRegexps_
Patterns as precompiled regular expressions.
DLList< entry * > patternEntries_
Entries of matching patterns.
fileName & name()
Return the dictionary name.
bool substituteScopedKeyword(const word &keyword)
Substitute the given scoped keyword prepended by '$' with the.
static bool writeOptionalEntries
If true write optional keywords and values.
An STL-conforming hash table.
HashSet< Key, Hash > operator|(const HashSet< Key, Hash > &hash1, const HashSet< Key, Hash > &hash2)
Combine entries from HashSets.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
void operator+=(const dictionary &)
Include entries from the given dictionary.
void operator|=(const dictionary &)
Conditionally include entries from the given dictionary.
const entry * lookupEntryPtr(const word &, bool recursive, bool patternMatch) const
Find and return an entry data stream pointer if present.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void transfer(dictionary &)
Transfer the contents of the argument and annul the argument.
autoPtr< dictionary > clone() const
Construct and return clone.
dictionary subOrEmptyDict(const word &, const bool mustRead=false) const
Find and return a sub-dictionary as a copy, or.
Istream & operator>>(Istream &, edgeMesh &)
bool read(Istream &)
Read dictionary from Istream.
tokenList tokens() const
Return the dictionary as a list of tokens.
wordList toc() const
Return the table of contents.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
SHA1Digest digest() const
Return the SHA1 digest of the dictionary contents.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
void clear()
Clear the dictionary.
tmp< fvMatrix< Type > > operator+(const fvMatrix< Type > &, const fvMatrix< Type > &)
Xfer< dictionary > xfer()
Transfer contents to the Xfer container.
bool findInPatterns(const bool patternMatch, const word &Keyword, DLList< entry * >::const_iterator &wcLink, DLList< autoPtr< regExp > >::const_iterator &reLink) const
Search patterns table for exact match or regular expression match.
const dictionary * subDictPtr(const word &) const
Find and return a sub-dictionary pointer if present.
bool add(entry *, bool mergeEntry=false)
Add a new entry.
T lookupOrAddDefault(const word &, const T &, bool recursive=false, bool patternMatch=true)
Find and return a T, if not found return the given.
void write(Ostream &, const bool subDict=true) const
Write dictionary, normally with sub-dictionary formatting.
void set(entry *)
Assign a new entry, overwrite any existing entry.