dictionary Class Reference

A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries. More...

Inheritance diagram for dictionary:
Collaboration diagram for dictionary:

Classes

class  includedDictionary
 

Public Member Functions

 TypeName ("dictionary")
 
 dictionary ()
 Construct top-level dictionary null. More...
 
 dictionary (const fileName &name)
 Construct top-level empty dictionary with given name. More...
 
 dictionary (const fileName &name, const dictionary &parentDict)
 Construct an empty sub-dictionary with given name and parent. More...
 
 dictionary (const fileName &name, const dictionary &parentDict, Istream &)
 Construct given the name, parent dictionary and Istream,. More...
 
 dictionary (Istream &, const bool keepHeader=false)
 Construct top-level dictionary from Istream,. More...
 
 dictionary (const dictionary &parentDict, const dictionary &)
 Construct as copy given the parent dictionary. More...
 
 dictionary (const dictionary &)
 Construct top-level dictionary as copy. More...
 
 dictionary (const dictionary *)
 Construct top-level dictionary as copy from pointer to dictionary. More...
 
template<class ... Entries>
 dictionary (const std::tuple< const Entries &... > &)
 Construct top-level dictionary with given entries. More...
 
template<class ... Entries>
 dictionary (const fileName &name, const std::tuple< const Entries &... > &)
 Construct top-level dictionary with given name and entries. More...
 
template<class ... Entries>
 dictionary (const fileName &name, const dictionary &parentDict, const std::tuple< const Entries &... > &)
 Construct dictionary with given name, parent and entries. More...
 
template<class ... Entries>
 dictionary (const dictionary &dict, const std::tuple< const Entries &... > &)
 Construct dictionary as copy and add a list of entries. More...
 
autoPtr< dictionaryclone () const
 Construct and return clone. More...
 
virtual ~dictionary ()
 Destructor. More...
 
const dictionaryparent () const
 Return the parent dictionary. More...
 
bool isNull () const
 Return whether this dictionary is null. More...
 
const dictionarytopDict () const
 Return the top of the tree. More...
 
word topDictKeyword () const
 Return the scoped keyword with which this dictionary can be. More...
 
const fileNamecurrentName () const
 Return the dictionary name, or the name of the file if the. More...
 
virtual label startLineNumber () const
 Return line number of first token in dictionary. More...
 
virtual label endLineNumber () const
 Return line number of last token in dictionary. More...
 
SHA1Digest digest () const
 Return the SHA1 digest of the dictionary contents. More...
 
tokenList tokens () const
 Return the dictionary as a list of tokens. More...
 
bool found (const word &, bool recursive=false, bool patternMatch=true) const
 Search dictionary for given keyword. More...
 
const entrylookupEntryPtr (const word &, bool recursive, bool patternMatch) const
 Find and return an entry data stream pointer if present. More...
 
entrylookupEntryPtr (const word &, bool recursive, bool patternMatch)
 Find and return an entry data stream pointer for manipulation. More...
 
const entrylookupEntryPtrBackwardsCompatible (const wordList &, bool recursive, bool patternMatch) const
 Find and return an entry data stream if present, trying a list. More...
 
const entrylookupEntry (const word &, bool recursive, bool patternMatch) const
 Find and return an entry data stream if present otherwise error. More...
 
const entrylookupEntryBackwardsCompatible (const wordList &, bool recursive, bool patternMatch) const
 Find and return an entry data stream if present, trying a list. More...
 
ITstreamlookup (const word &, bool recursive=false, bool patternMatch=true) const
 Find and return an entry data stream. More...
 
ITstreamlookupBackwardsCompatible (const wordList &, bool recursive=false, bool patternMatch=true) const
 Find and return an entry data stream, trying a list of keywords. More...
 
template<class T >
T lookup (const word &, bool recursive=false, bool patternMatch=true) const
 Find and return a T, if not found throw a fatal error. More...
 
template<class T , class DefaultUnits >
T lookup (const word &, const DefaultUnits &, bool recursive=false, bool patternMatch=true) const
 Find and return a T, with dimension checking and unit. More...
 
template<class T >
T lookupBackwardsCompatible (const wordList &, bool recursive=false, bool patternMatch=true) const
 Find and return a T, trying a list of keywords in sequence,. More...
 
template<class T , class DefaultUnits >
T lookupBackwardsCompatible (const wordList &, const DefaultUnits &, bool recursive=false, bool patternMatch=true) const
 Find and return a T, with dimension checking and unit. More...
 
template<class T >
T lookupOrDefault (const word &, const T &) const
 Find and return a T, if not found return the given default. More...
 
template<class T , class DefaultUnits >
T lookupOrDefault (const word &, const DefaultUnits &, const T &) const
 Find and return a T with dimension checking and unit. More...
 
template<class T >
T lookupOrDefaultBackwardsCompatible (const wordList &, const T &) const
 Find and return a T, trying a list of keywords in sequence,. More...
 
template<class T , class DefaultUnits >
T lookupOrDefaultBackwardsCompatible (const wordList &, const DefaultUnits &, const T &) const
 Find and return a T, with dimension checking and unit. More...
 
template<class T >
T lookupOrAddDefault (const word &, const T &)
 Find and return a T, if not found return the given. More...
 
template<class T >
bool readIfPresent (const word &, T &, bool recursive=false, bool patternMatch=true) const
 Find an entry if present, and assign to T. More...
 
template<class T , class DefaultUnits >
bool readIfPresent (const word &, const DefaultUnits &, T &, bool recursive=false, bool patternMatch=true) const
 Find an entry if present, and assign to T, with dimension. More...
 
const entrylookupScopedEntryPtr (const word &, bool recursive, bool patternMatch) const
 Find and return an entry data stream pointer if present,. More...
 
template<class T >
T lookupScoped (const word &, bool recursive=false, bool patternMatch=true) const
 Find and return a T,. More...
 
template<class T >
const TlookupCompoundScoped (const word &keyword, bool recursive, bool patternMatch) const
 Find return the reference to the compound T,. More...
 
bool isDict (const word &) const
 Check if entry is a sub-dictionary. More...
 
const dictionarysubDictPtr (const word &) const
 Find and return a sub-dictionary pointer if present. More...
 
dictionarysubDictPtr (const word &)
 Find and return a sub-dictionary pointer if present. More...
 
const dictionarysubDict (const word &) const
 Find and return a sub-dictionary. More...
 
dictionarysubDict (const word &)
 Find and return a sub-dictionary for manipulation. More...
 
const dictionarysubDictBackwardsCompatible (const wordList &) const
 Find and return a sub-dictionary, trying a list of keywords in. More...
 
const dictionarysubOrEmptyDict (const word &, const bool mustRead=false) const
 Find and return a sub-dictionary. More...
 
const dictionaryoptionalSubDict (const word &) const
 Find and return a sub-dictionary if found. More...
 
const dictionarytypeDict (const word &typeName) const
 Find and return a type sub-dictionary. More...
 
const dictionarytypeOrEmptyDict (const word &typeName) const
 Find and return a type sub-dictionary. More...
 
const dictionaryoptionalTypeDict (const word &typeName) const
 Find and return an optional type sub-dictionary. More...
 
const dictionaryscopedDict (const word &) const
 Find and return a sub-dictionary by scoped lookup. More...
 
dictionaryscopedDict (const word &)
 Find and return a sub-dictionary by scoped lookup. More...
 
wordList toc () const
 Return the table of contents. More...
 
wordList sortedToc () const
 Return the sorted table of contents. More...
 
List< keyTypekeys (bool patterns=false) const
 Return the list of available keys or patterns. More...
 
bool substituteKeyword (const word &keyword)
 Substitute the given keyword prepended by '$' with the. More...
 
bool add (entry *, bool mergeEntry=false)
 Add a new entry. More...
 
void add (const entry &, bool mergeEntry=false)
 Add an entry. More...
 
void add (const keyType &, const word &, bool overwrite=false)
 Add a word entry. More...
 
void add (const keyType &, const string &, bool overwrite=false)
 Add a string entry. More...
 
void add (const keyType &, const label, bool overwrite=false)
 Add a label entry. More...
 
void add (const keyType &, const scalar, bool overwrite=false)
 Add a scalar entry. More...
 
void add (const keyType &, const dictionary &, bool mergeEntry=false)
 Add a dictionary entry. More...
 
template<class T >
void add (const keyType &, const T &, bool overwrite=false)
 Add a T entry. More...
 
void set (entry *)
 Assign a new entry, overwrite any existing entry. More...
 
void set (const entry &)
 Assign a new entry, overwrite any existing entry. More...
 
void set (const keyType &, const dictionary &)
 Assign a dictionary entry, overwrite any existing entry. More...
 
template<class ... Entries>
void set (const keyType &, const std::tuple< const Entries &... > &)
 Assign a dictionary entry, overwrite any existing entry. More...
 
template<class T >
void set (const keyType &, const T &)
 Assign a T entry, overwrite any existing entry. More...
 
template<class ... Entries>
void set (const entry &e, const Entries &...)
 Assign multiple entries, overwriting any existing entries. More...
 
template<class T , class ... Entries>
void set (const keyType &, const T &, const Entries &...)
 Assign multiple T entries, overwriting any existing entries. More...
 
bool remove (const word &)
 Remove an entry specified by keyword. More...
 
void remove (const wordList &)
 Remove entries specified by keywords. More...
 
bool changeKeyword (const keyType &oldKeyword, const keyType &newKeyword, bool forceOverwrite=false)
 Change the keyword for an entry,. More...
 
bool merge (const dictionary &)
 Merge entries from the given dictionary. More...
 
void clear ()
 Clear the dictionary. More...
 
void transfer (dictionary &)
 Transfer the contents of the argument and annul the argument. More...
 
bool read (Istream &, const bool keepHeader=false)
 Read dictionary from Istream, optionally keeping the header. More...
 
virtual bool global () const
 Return true if the dictionary global,. More...
 
void write (Ostream &, const bool subDict=true) const
 Write dictionary, normally with sub-dictionary formatting. More...
 
ITstreamoperator[] (const word &) const
 Find and return entry. More...
 
void operator= (const dictionary &)
 
void operator+= (const dictionary &)
 Include entries from the given dictionary. More...
 
void operator|= (const dictionary &)
 Conditionally include entries from the given dictionary. More...
 
void operator<<= (const dictionary &)
 Unconditionally include entries from the given dictionary. More...
 
template<class ... Entries>
std::tuple< const Entries &... > entries (const Entries &... entries)
 
template<class ... Entries>
void set (const entry &e, const Entries &... entries)
 
template<class T , class ... Entries>
void set (const keyType &k, const T &t, const Entries &... entries)
 
- Public Member Functions inherited from dictionaryName
 dictionaryName ()
 Construct dictionaryName null. More...
 
 dictionaryName (const fileName &name)
 Construct dictionaryName as copy of the given fileName. More...
 
 dictionaryName (dictionaryName &&name)
 Move constructor. More...
 
const fileNamename () const
 Return the dictionary name. More...
 
fileNamename ()
 Return the dictionary name. More...
 
const word dictName () const
 Return the local dictionary name (final part of scoped name) More...
 
void operator= (const dictionaryName &name)
 
void operator= (dictionaryName &&name)
 
- Public Member Functions inherited from ILList< LListBase, T >
 ILList ()
 Null construct. More...
 
 ILList (T *a)
 Construct given initial T. More...
 
 ILList (Istream &)
 Construct from Istream. More...
 
 ILList (const ILList< LListBase, T > &)
 Copy constructor. More...
 
 ILList (ILList< LListBase, T > &&)
 Move constructor. More...
 
template<class CloneArg >
 ILList (const ILList< LListBase, T > &lst, const CloneArg &cloneArg)
 Copy constructor with additional argument for clone. More...
 
template<class INew >
 ILList (Istream &, const INew &)
 Construct from Istream using given Istream constructor class. More...
 
 ~ILList ()
 Destructor. More...
 
bool eraseHead ()
 Remove the head element specified from the list and delete it. More...
 
bool erase (T *p)
 Remove the specified element from the list and delete it. More...
 
void clear ()
 Clear the contents of the list. More...
 
void transfer (ILList< LListBase, T > &)
 Transfer the contents of the argument into this List. More...
 
void operator= (const ILList< LListBase, T > &)
 Assignment operator. More...
 
void operator= (ILList< LListBase, T > &&)
 Move assignment operator. More...
 
- Public Member Functions inherited from UILList< LListBase, T >
 UILList ()
 Null construct. More...
 
 UILList (T *a)
 Construct given initial T. More...
 
 UILList (const UILList< LListBase, T > &)
 Copy constructor. More...
 
 UILList (UILList< LListBase, T > &&)
 Move constructor. More...
 
Tfirst ()
 Return the first entry. More...
 
const Tfirst () const
 Return the first entry. More...
 
Tlast ()
 Return the last entry. More...
 
const Tlast () const
 Return the last entry. More...
 
TremoveHead ()
 Remove and return head. More...
 
Tremove (T *p)
 Remove and return element. More...
 
Tremove (iterator &it)
 Remove and return specified by iterator. More...
 
void operator= (const UILList< LListBase, T > &)
 Assignment operator. More...
 
void operator= (UILList< LListBase, T > &&)
 Move assignment operator. More...
 
iterator begin ()
 
const iteratorend ()
 
const_iterator cbegin () const
 
const const_iteratorcend () const
 
const_iterator begin () const
 
const const_iteratorend () const
 
const_reverse_iterator crbegin () const
 
const const_reverse_iteratorcrend () const
 
const_reverse_iterator rbegin () const
 
const const_reverse_iteratorrend () const
 
bool operator== (const UILList< LListBase, T > &) const
 Equality operation on ULists of the same type. More...
 
bool operator!= (const UILList< LListBase, T > &) const
 The opposite of the equality operation. Takes linear time. More...
 

Static Public Member Functions

template<class ... Entries>
static std::tuple< const Entries &... > entries (const Entries &...)
 Construct an entries tuple from which to make a dictionary. More...
 
static autoPtr< dictionaryNew (Istream &)
 Construct top-level dictionary on freestore from Istream. More...
 

Static Public Attributes

static const dictionary null
 Null dictionary. More...
 

Friends

class entry
 Declare friendship with the entry class for IO. More...
 
Istreamoperator>> (Istream &, dictionary &)
 Read dictionary from Istream. More...
 
Ostreamoperator<< (Ostream &, const dictionary &)
 Write dictionary to Ostream. More...
 

Additional Inherited Members

- Public Types inherited from UILList< LListBase, T >
typedef T value_type
 Type of values the DLList contains. More...
 
typedef Treference
 Type that can be used for storing into DLList::value_type. More...
 
typedef const Tconst_reference
 Type that can be used for storing into constant. More...
 
typedef label size_type
 The type that can represent the size of a DLList. More...
 
typedef LListBase::iterator LListBase_iterator
 
typedef LListBase::const_iterator LListBase_const_iterator
 

Detailed Description

A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.

The keywords can represent patterns which are matched using Posix regular expressions. The general order for searching is as follows:

  • exact match
  • pattern match (in reverse order)
  • optional recursion into the enclosing (parent) dictionaries

The dictionary class is the base class for IOdictionary. It also serves as a bootstrap dictionary for the objectRegistry data dictionaries since, unlike the IOdictionary class, it does not use an objectRegistry itself to work.

Source files

Definition at line 158 of file dictionary.H.

Constructor & Destructor Documentation

◆ dictionary() [1/12]

Construct top-level dictionary null.

Definition at line 255 of file dictionary.C.

Referenced by dictionary::New(), and Foam::readConfigFile().

Here is the caller graph for this function:

◆ dictionary() [2/12]

dictionary ( const fileName name)

Construct top-level empty dictionary with given name.

Definition at line 262 of file dictionary.C.

◆ dictionary() [3/12]

dictionary ( const fileName name,
const dictionary parentDict 
)

Construct an empty sub-dictionary with given name and parent.

Definition at line 270 of file dictionary.C.

◆ dictionary() [4/12]

dictionary ( const fileName name,
const dictionary parentDict,
Istream is 
)

Construct given the name, parent dictionary and Istream,.

reading entries until lastEntry or EOF

Definition at line 40 of file dictionaryIO.C.

References dictionary::read().

Here is the call graph for this function:

◆ dictionary() [5/12]

dictionary ( Istream is,
const bool  keepHeader = false 
)

Construct top-level dictionary from Istream,.

reading entries until EOF, optionally keeping the header

Definition at line 55 of file dictionaryIO.C.

References inputModeEntry::clear(), and dictionary::read().

Here is the call graph for this function:

◆ dictionary() [6/12]

dictionary ( const dictionary parentDict,
const dictionary dict 
)

Construct as copy given the parent dictionary.

Definition at line 282 of file dictionary.C.

References forAllIter.

◆ dictionary() [7/12]

dictionary ( const dictionary dict)

Construct top-level dictionary as copy.

Definition at line 309 of file dictionary.C.

◆ dictionary() [8/12]

dictionary ( const dictionary dictPtr)

Construct top-level dictionary as copy from pointer to dictionary.

A null pointer is treated like an empty dictionary.

Definition at line 315 of file dictionary.C.

References dictionary::operator=().

Here is the call graph for this function:

◆ dictionary() [9/12]

dictionary ( const std::tuple< const Entries &... > &  entries)

Construct top-level dictionary with given entries.

Definition at line 69 of file dictionaryTemplates.C.

References dictionary::entries().

Here is the call graph for this function:

◆ dictionary() [10/12]

dictionary ( const fileName name,
const std::tuple< const Entries &... > &  entries 
)

Construct top-level dictionary with given name and entries.

Definition at line 78 of file dictionaryTemplates.C.

References dictionary::entries().

Here is the call graph for this function:

◆ dictionary() [11/12]

dictionary ( const fileName name,
const dictionary parentDict,
const std::tuple< const Entries &... > &  entries 
)

Construct dictionary with given name, parent and entries.

Definition at line 91 of file dictionaryTemplates.C.

References dictionary::entries().

Here is the call graph for this function:

◆ dictionary() [12/12]

dictionary ( const dictionary dict,
const std::tuple< const Entries &... > &  entries 
)

Construct dictionary as copy and add a list of entries.

Definition at line 105 of file dictionaryTemplates.C.

References dictionary::entries().

Here is the call graph for this function:

◆ ~dictionary()

~dictionary ( )
virtual

Destructor.

Definition at line 335 of file dictionary.C.

Member Function Documentation

◆ TypeName()

TypeName ( "dictionary"  )

◆ entries() [1/2]

static std::tuple<const Entries& ...> entries ( const Entries &  ...)
static

◆ clone()

Foam::autoPtr< Foam::dictionary > clone ( ) const

Construct and return clone.

Definition at line 327 of file dictionary.C.

Referenced by Foam::preservePatchTypes(), and refinementSurfaces::refinementSurfaces().

Here is the caller graph for this function:

◆ New()

Foam::autoPtr< Foam::dictionary > New ( Istream is)
static

Construct top-level dictionary on freestore from Istream.

Definition at line 97 of file dictionaryIO.C.

References dictionary::dictionary().

Here is the call graph for this function:

◆ parent()

const dictionary& parent ( ) const
inline

Return the parent dictionary.

Definition at line 348 of file dictionary.H.

Referenced by dictionary::write().

Here is the caller graph for this function:

◆ isNull()

bool isNull ( ) const
inline

Return whether this dictionary is null.

Definition at line 354 of file dictionary.H.

Referenced by ParticleForce< CloudType >::ParticleForce().

Here is the caller graph for this function:

◆ topDict()

const Foam::dictionary & topDict ( ) const

Return the top of the tree.

Definition at line 341 of file dictionary.C.

References IOobject::name(), and p.

Here is the call graph for this function:

◆ topDictKeyword()

Foam::word topDictKeyword ( ) const

Return the scoped keyword with which this dictionary can be.

accessed from the top dictionary in the tree

Definition at line 356 of file dictionary.C.

References IOobject::name(), word::null, and p.

Here is the call graph for this function:

◆ currentName()

const Foam::fileName & currentName ( ) const

Return the dictionary name, or the name of the file if the.

dictionary is currently reading

Definition at line 376 of file dictionary.C.

References fileName::name(), and Foam::name().

Here is the call graph for this function:

◆ startLineNumber()

Foam::label startLineNumber ( ) const
virtual

Return line number of first token in dictionary.

Reimplemented in dictionaryEntry.

Definition at line 401 of file dictionary.C.

References Foam::first().

Referenced by codedBase::updateLibrary().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ endLineNumber()

Foam::label endLineNumber ( ) const
virtual

Return line number of last token in dictionary.

Reimplemented in dictionaryEntry.

Definition at line 414 of file dictionary.C.

Referenced by zoneGenerator::New(), and messageStream::operator()().

Here is the caller graph for this function:

◆ digest()

Foam::SHA1Digest digest ( ) const

Return the SHA1 digest of the dictionary contents.

Definition at line 434 of file dictionary.C.

References OSHA1stream::digest(), and forAllConstIter.

Here is the call graph for this function:

◆ tokens()

Foam::tokenList tokens ( ) const

Return the dictionary as a list of tokens.

Definition at line 448 of file dictionary.C.

References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), IOstream::bad(), Istream::eof(), token::good(), ISstream::read(), OStringStream::str(), and Foam::vtkWriteOps::write().

Here is the call graph for this function:

◆ found()

bool found ( const word keyword,
bool  recursive = false,
bool  patternMatch = true 
) const

Search dictionary for given keyword.

If recursive, search parent dictionaries If patternMatch, use regular expressions

Definition at line 467 of file dictionary.C.

References dictionary::null.

Referenced by sixDoFRigidBodyMotion::addConstraints(), sixDoFRigidBodyMotion::addRestraints(), BlendedInterfacialModel< ModelType >::BlendedInterfacialModel(), Foam::blendingDict(), boundBox::boundBox(), BreakupModel< CloudType >::BreakupModel(), constTransport< Thermo >::constTransport(), decompositionMethod::decompositionMethod(), singleRegionSolutionControl::dict(), directions::directions(), Zonal< DimensionedFieldType >::evaluate(), includeEntry::execute(), functionObjectList::functionObjectList(), functions::functions(), genericFvPatchField< Type >::genericFvPatchField(), subModelBase::getBaseProperty(), subModelBase::getModelProperty(), heatTransferSystem::heatTransferSystem(), layerParameters::layerParameters(), Foam::listSwitches(), LocalInteraction< CloudType >::LocalInteraction(), basicThermo::lookupCstrIter(), NamedEnum< Enum, nEnum >::lookupOrDefault(), multiRigidBody::multiRigidBody(), laminarModel< BasicMomentumTransportModel >::New(), liquidProperties::New(), solidProperties::New(), packingDispersionModel::New(), LagrangianPatchField< Type >::New(), setWriter::New(), fvMeshTopoChanger::New(), dlLibraryTable::open(), axesRotation::operator=(), parcelThermo::parcelThermo(), parMetis::parMetis(), polyBoundaryMesh::patchSet(), phaseSystem::phaseSystem(), Foam::preservePatchTypes(), processorFvPatchField< Type >::processorFvPatchField(), multiphaseVoFSolver::read(), twoPhaseSolver::read(), tolerances::read(), MaxwellStefan< BasicThermophysicalTransportModel >::read(), timeControl::read(), phaseSystem::alphaControl::read(), generatedCellZone::read(), BirdCarreau::read(), CrossPowerLaw::read(), Time::readDict(), liquidProperties::readIfPresent(), refinementRegions::refinementRegions(), refinementSurfaces::refinementSurfaces(), massTransfer::rho(), rigidBodyDisplacement::rigidBodyDisplacement(), rigidBodyModel::rigidBodyModel(), scalarTransport::scalarTransport(), kEpsilonLopesdaCosta< BasicMomentumTransportModel >::setCdAv(), Time::setControls(), subModelBase::setModelProperty(), kEpsilonLopesdaCosta< BasicMomentumTransportModel >::setPorosityCoefficient(), incompressibleFluid::setRDeltaT(), Time::setTime(), sixDoFRigidBodyMotion::sixDoFRigidBodyMotion(), mappedInternalPatchBase::specified(), mappedPatchBaseBase::specified(), ensightSurfaceWriter::surfaceWriter(), Time::Time(), twoPhaseVoFSolver::twoPhaseVoFSolver(), uMulticomponentbInhomogeneous::uMulticomponentbInhomogeneous(), and IOobject::writeHeader().

Here is the caller graph for this function:

◆ lookupEntryPtr() [1/2]

const Foam::entry * lookupEntryPtr ( const word keyword,
bool  recursive,
bool  patternMatch 
) const

Find and return an entry data stream pointer if present.

otherwise return nullptr. If recursive, search parent dictionaries. If patternMatch, use regular expressions

Definition at line 506 of file dictionary.C.

References dictionary::null.

Referenced by Foam::mergeDictionaries(), entry::New(), dynamicCode::read(), dimensioned< Type >::readIfPresent(), unitSet::readIfPresent(), dimensioned< Type >::readOrDefault(), refinementRegions::refinementRegions(), refinementSurfaces::refinementSurfaces(), dictionary::substituteKeyword(), and Foam::debug::switchSet().

Here is the caller graph for this function:

◆ lookupEntryPtr() [2/2]

Foam::entry * lookupEntryPtr ( const word keyword,
bool  recursive,
bool  patternMatch 
)

Find and return an entry data stream pointer for manipulation.

if present otherwise return nullptr. If recursive, search parent dictionaries. If patternMatch, use regular expressions.

Definition at line 545 of file dictionary.C.

References dictionary::null.

◆ lookupEntryPtrBackwardsCompatible()

const Foam::entry * lookupEntryPtrBackwardsCompatible ( const wordList keywords,
bool  recursive,
bool  patternMatch 
) const

Find and return an entry data stream if present, trying a list.

of keywords in sequence, otherwise return nullptr. If recursive, search parent dictionaries. If patternMatch, use regular expressions

Definition at line 589 of file dictionary.C.

References Foam::endl(), forAll, IOWarningInFunction, entry::keyword(), and Foam::name().

Here is the call graph for this function:

◆ lookupEntry()

const Foam::entry & lookupEntry ( const word keyword,
bool  recursive,
bool  patternMatch 
) const

Find and return an entry data stream if present otherwise error.

If recursive, search parent dictionaries. If patternMatch, use regular expressions.

Definition at line 625 of file dictionary.C.

References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, and Foam::name().

Referenced by lduMatrix::smoother::getName(), lduMatrix::preconditioner::getName(), Foam::listSwitches(), Foam::mergeDictionaries(), lduMatrix::preconditioner::New(), and lduMatrix::smoother::New().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lookupEntryBackwardsCompatible()

const Foam::entry & lookupEntryBackwardsCompatible ( const wordList keywords,
bool  recursive,
bool  patternMatch 
) const

Find and return an entry data stream if present, trying a list.

of keywords in sequence, otherwise error. If recursive, search parent dictionaries. If patternMatch, use regular expressions

Definition at line 646 of file dictionary.C.

◆ lookup() [1/3]

Foam::ITstream & lookup ( const word keyword,
bool  recursive = false,
bool  patternMatch = true 
) const

Find and return an entry data stream.

If recursive, search parent dictionaries. If patternMatch, use regular expressions.

Definition at line 668 of file dictionary.C.

Referenced by advectiveFvPatchField< Type >::advectiveFvPatchField(), BlendedInterfacialModel< ModelType >::BlendedInterfacialModel(), Foam::blendingDict(), boundBox::boundBox(), BreakupModel< CloudType >::BreakupModel(), Field< tensor >::clone(), CloudFilmTransfer< CloudType >::CloudFilmTransfer(), collection::collection(), compressibleInterPhaseTransportModel::compressibleInterPhaseTransportModel(), constTransport< Thermo >::constTransport(), cloud::correct(), forcesBase::createFileNames(), directions::directions(), argList::displayDoc(), ETAB< CloudType >::ETAB(), Zonal< DimensionedFieldType >::evaluate(), exponentialSolidTransport< Thermo >::exponentialSolidTransport(), FreeStream< CloudType >::FreeStream(), functions::functions(), fvConstraints::fvConstraints(), fvModels::fvModels(), incompressibleInterPhaseTransportModel::incompressibleInterPhaseTransportModel(), InjectionModel< CloudType >::InjectionModel(), Fickian< unityLewisFourier< laminarThermophysicalTransportModel > >::j(), layerParameters::layerParameters(), LocalInteraction< CloudType >::LocalInteraction(), basicThermo::lookupCstrIter(), medialAxisMeshMover::move(), forcesBase::mu(), multiDirRefinement::multiDirRefinement(), multivariateSelectionScheme< Type >::multivariateSelectionScheme(), extrudeModel::New(), XiModel::New(), SuModel::New(), diameterModel::New(), profileModel::New(), CorrectionLimitingMethod::New(), ParticleStressModel::New(), TimeScaleModel::New(), liquidProperties::New(), solidProperties::New(), contactAngleModel::New(), chemistryReductionMethod< ThermoType >::New(), DampingModel< CloudType >::New(), IsotropyModel< CloudType >::New(), PackingModel< CloudType >::New(), surfaceTensionModel::New(), patchDistMethod::New(), relativeVelocityModel::New(), interfaceCompositionModel::New(), liftModel::New(), wallLubricationModel::New(), dragModel::New(), heatTransferModel::New(), shapeModel::New(), packingDispersionModel::New(), waveSpectrum::New(), coordinateRotation::New(), DimensionedFieldFunction< DimensionedFieldType >::New(), interpolation< Type >::New(), PDRDragModel::New(), renumberMethod::New(), solidBodyMotionFunction::New(), turbulentDispersionModel::New(), surfaceTensionCoefficientModel::New(), virtualMassModel::New(), generalisedNewtonianViscosityModel::New(), XiGModel::New(), XiEqModel::New(), XiProfile::New(), fvFieldSource< Type >::New(), kernelShape::New(), chemistryTabulationMethod::New(), AveragingMethod< Type >::New(), LagrangianPatchField< Type >::New(), coordinateSystem::New(), phaseModel::New(), pointMeshMover::New(), breakupModel::New(), coalescenceModel::New(), LagrangianFieldSource< Type >::New(), LduMatrix< Type, DType, LUType >::preconditioner::New(), Reaction< ThermoType >::New(), diffusiveMassTransferModel::New(), radiationModel::New(), lduMatrix::solver::New(), LduMatrix< Type, DType, LUType >::smoother::New(), LduMatrix< Type, DType, LUType >::solver::New(), saturationPressureModel::New(), saturationTemperatureModel::New(), polyPatch::New(), energyScalingFunction::New(), pairPotential::New(), sixDoFRigidBodyMotionConstraint::New(), sixDoFRigidBodyMotionRestraint::New(), tetherPotential::New(), oneDimensionalDiscretisation::New(), Function1< scalar >::New(), Function1< Type >::New(), Function2< Type >::New(), fvConstraint::New(), fvModel::New(), LagrangianModel::New(), LESdelta::New(), fieldValue::New(), sampledSurface::New(), zoneGenerator::New(), sampledSet::New(), functionObject::New(), parcelCloud::New(), setWriter::New(), fvMeshDistributor::New(), fvMeshMover::New(), GAMGProcAgglomeration::New(), decomposedBlockData::numBlocks(), dlLibraryTable::open(), multivariateIndependentScheme< Type >::operator()(), axesRotation::operator=(), dimensioned< scalar >::operator[](), argList::parse(), PatchInjection< CloudType >::PatchInjection(), patchInternalField::patchInternalField(), polyBoundaryMesh::patchSet(), PilchErdman< CloudType >::PilchErdman(), plane::plane(), powerLawLopesdaCostaZone::powerLawLopesdaCostaZone(), kineticTheoryModel::read(), multiphaseVoFSolver::read(), singleRegionConvergenceControl::read(), singleRegionCorrectorConvergenceControl::read(), cloudSolution::read(), homogeneousMixture< ThermoType >::read(), inhomogeneousEGRMixture< ThermoType >::read(), inhomogeneousMixture< ThermoType >::read(), leanInhomogeneousMixture< ThermoType >::read(), bInhomogeneousMixture::read(), uHomogeneousMixture::read(), uInhomogeneousEGRMixture::read(), uInhomogeneousMixture::read(), forcesBase::read(), smoothDelta::read(), anisotropicFilter::read(), laplaceFilter::read(), timeControl::read(), patchProbes::read(), probes::read(), dimensioned< Type >::read(), IATE::read(), linearTsub::read(), residualDiameter::read(), porosityModel::read(), targetCoeffTrim::read(), consumptionSpeed::read(), relaxation::read(), cavitationModel::read(), fieldAverage::read(), generatedCellZone::read(), reactionRateFlameArea::read(), doubleSigmoid::read(), sigmoid::read(), azizChen::read(), dampedCoulomb::read(), exponentialRepulsion::read(), lennardJones::read(), maitlandSmith::read(), PDRDragModel::read(), multiValveEnginePistonMotion::read(), multiValveEngineValveMotion::read(), harmonicSpring::read(), pitchForkRing::read(), restrainedHarmonicSpring::read(), unitSet::read(), generatedZoneSet::read(), Time::readDict(), IOobject::readHeader(), dimensioned< scalar >::readIfPresent(), constSolidThermo::readProperty(), ensightPart::reconstruct(), refinementSurfaces::refinementSurfaces(), ReitzDiwakar< CloudType >::ReitzDiwakar(), ReitzKHRT< CloudType >::ReitzKHRT(), boundaryRegion::rename(), rigidBodyModel::rigidBodyModel(), motionSmootherAlgo::scaleMesh(), searchableSurfaceList::searchableSurfaceList(), kEpsilonLopesdaCosta< BasicMomentumTransportModel >::setCdAv(), Time::setControls(), kEpsilonLopesdaCosta< BasicMomentumTransportModel >::setPorosityCoefficient(), incompressibleFluid::setRDeltaT(), Time::setTime(), SingleMixtureFraction< CloudType >::SingleMixtureFraction(), populationBalanceModel::solve(), structured::structured(), surfaceFeatures::surfaceFeatures(), ensightSurfaceWriter::surfaceWriter(), surfaceZonesInfo::surfaceZonesInfo(), Foam::units::table(), uInhomogeneousbMulticomponent::uInhomogeneousbMulticomponent(), WallLocalSpringSliderDashpot< CloudType >::WallLocalSpringSliderDashpot(), waveSuperposition::waveSuperposition(), and IOobject::writeHeader().

◆ lookupBackwardsCompatible() [1/3]

Foam::ITstream & lookupBackwardsCompatible ( const wordList keywords,
bool  recursive = false,
bool  patternMatch = true 
) const

Find and return an entry data stream, trying a list of keywords.

in sequence if not found throw a fatal error relating to the first keyword If recursive, search parent dictionaries. If patternMatch, use regular expressions.

Definition at line 679 of file dictionary.C.

Referenced by laminarModel< BasicMomentumTransportModel >::New(), LESModel< BasicMomentumTransportModel >::New(), RASModel< BasicMomentumTransportModel >::New(), decompositionMethod::NewDecomposer(), plane::plane(), Time::readDict(), and populationBalanceModel::solve().

Here is the caller graph for this function:

◆ lookup() [2/3]

T lookup ( const word keyword,
bool  recursive = false,
bool  patternMatch = true 
) const

Find and return a T, if not found throw a fatal error.

If recursive, search parent dictionaries. If patternMatch, use regular expressions.

Definition at line 120 of file dictionaryTemplates.C.

References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::name(), and entry::stream().

Here is the call graph for this function:

◆ lookup() [3/3]

T lookup ( const word keyword,
const DefaultUnits &  defaultUnits,
bool  recursive = false,
bool  patternMatch = true 
) const

Find and return a T, with dimension checking and unit.

conversions, and if not found throw a fatal error. If recursive, search parent dictionaries. If patternMatch, use regular expressions.

Definition at line 141 of file dictionaryTemplates.C.

References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::name(), and entry::stream().

Here is the call graph for this function:

◆ lookupBackwardsCompatible() [2/3]

T lookupBackwardsCompatible ( const wordList keywords,
bool  recursive = false,
bool  patternMatch = true 
) const

Find and return a T, trying a list of keywords in sequence,.

and if not found throw a fatal error relating to the first (preferred) keyword. If recursive, search parent dictionaries. If patternMatch, use regular expressions.

Definition at line 163 of file dictionaryTemplates.C.

References entry::stream().

Here is the call graph for this function:

◆ lookupBackwardsCompatible() [3/3]

T lookupBackwardsCompatible ( const wordList keywords,
const DefaultUnits &  defaultUnits,
bool  recursive = false,
bool  patternMatch = true 
) const

Find and return a T, with dimension checking and unit.

conversions, trying a list of keywords in sequence, and if not found throw a fatal error relating to the first (preferred) keyword. If recursive, search parent dictionaries. If patternMatch, use regular expressions.

Definition at line 186 of file dictionaryTemplates.C.

References entry::stream().

Here is the call graph for this function:

◆ lookupOrDefault() [1/2]

T lookupOrDefault ( const word keyword,
const T defaultValue 
) const

Find and return a T, if not found return the given default.

value.

Definition at line 210 of file dictionaryTemplates.C.

References entry::stream().

Referenced by CloudFilmTransfer< CloudType >::CloudFilmTransfer(), solidElectricalConduction::correct(), momentumTransferSystem::ddtCorrs(), directions::directions(), fieldAverageItem::fieldAverageItem(), fixedMeanOutletInletFvPatchField< Type >::fixedMeanOutletInletFvPatchField(), freestreamFvPatchField< Type >::freestreamFvPatchField(), momentumTransferSystem::invADVs(), LocalInteraction< CloudType >::LocalInteraction(), meshRefinement::meshRefinement(), chemistryModel::New(), ubMixtureMap::New(), argList::parse(), compressibleVoF::read(), multiphaseEuler::read(), twoPhaseSolver::read(), pimpleLoop::read(), pimpleMultiRegionControl::read(), pimpleNoLoopControl::read(), pisoControl::read(), fluidSolutionControl::read(), nonOrthogonalSolutionControl::read(), functionObject::read(), timeControl::read(), multicomponentMixture< ThermoType >::read(), fixedInterfacialArea::read(), phaseSystem::alphaControl::read(), control::read(), targetCoeffTrim::read(), generatedZoneSet::read(), temperatureDependent::readDict(), refinementSurfaces::refinementSurfaces(), scalarTransport::scalarTransport(), multiphaseVoFSolver::setInterfaceRDeltaT(), twoPhaseVoFSolver::setInterfaceRDeltaT(), incompressibleFluid::setRDeltaT(), fvMatrix< Type >::solve(), solver::solver(), and IOobject::writeHeader().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lookupOrDefault() [2/2]

T lookupOrDefault ( const word keyword,
const DefaultUnits &  defaultUnits,
const T defaultValue 
) const

Find and return a T with dimension checking and unit.

conversions, and if not found return the given default value. If recursive, search parent dictionaries. If patternMatch, use regular expressions.

Definition at line 239 of file dictionaryTemplates.C.

References entry::stream().

Here is the call graph for this function:

◆ lookupOrDefaultBackwardsCompatible() [1/2]

T lookupOrDefaultBackwardsCompatible ( const wordList keywords,
const T defaultValue 
) const

Find and return a T, trying a list of keywords in sequence,.

and if not found throw a fatal error relating to the first (preferred) keyword If recursive, search parent dictionaries. If patternMatch, use regular expressions.

Definition at line 269 of file dictionaryTemplates.C.

References entry::stream().

Referenced by pointMeshMover::New(), twoPhaseSolver::read(), pimpleNoLoopControl::read(), and phaseSystem::alphaControl::read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lookupOrDefaultBackwardsCompatible() [2/2]

T lookupOrDefaultBackwardsCompatible ( const wordList keywords,
const DefaultUnits &  defaultUnits,
const T defaultValue 
) const

Find and return a T, with dimension checking and unit.

conversions, trying a list of keywords in sequence, and if not found throw a fatal error relating to the first (preferred) keyword If recursive, search parent dictionaries. If patternMatch, use regular expressions.

Definition at line 291 of file dictionaryTemplates.C.

References entry::stream().

Here is the call graph for this function:

◆ lookupOrAddDefault()

T lookupOrAddDefault ( const word keyword,
const T defaultValue 
)

Find and return a T, if not found return the given.

default value, and add to dictionary. If recursive, search parent dictionaries. If patternMatch, use regular expressions.

Definition at line 314 of file dictionaryTemplates.C.

References Foam::add(), and entry::stream().

Referenced by Foam::debug::debugSwitch(), Foam::debug::floatOptimisationSwitch(), Foam::debug::infoSwitch(), Foam::debug::optimisationSwitch(), and Foam::debug::wordOptimisationSwitch().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readIfPresent() [1/2]

◆ readIfPresent() [2/2]

bool readIfPresent ( const word keyword,
const DefaultUnits &  defaultUnits,
T val,
bool  recursive = false,
bool  patternMatch = true 
) const

Find an entry if present, and assign to T, with dimension.

checking and unit conversions. Returns true if the entry was found. If recursive, search parent dictionaries. If patternMatch, use regular expressions.

Definition at line 367 of file dictionaryTemplates.C.

References entry::stream().

Here is the call graph for this function:

◆ lookupScopedEntryPtr()

const Foam::entry * lookupScopedEntryPtr ( const word keyword,
bool  recursive,
bool  patternMatch 
) const

Find and return an entry data stream pointer if present,.

otherwise return nullptr. If recursive, search parent dictionaries. If patternMatch, use regular expressions. Allows scoping using '/' with special handling for '!' and '..'.

Definition at line 695 of file dictionary.C.

References dictionary::null.

Referenced by Foam::getVariable(), and entry::New().

Here is the caller graph for this function:

◆ lookupScoped()

T lookupScoped ( const word keyword,
bool  recursive = false,
bool  patternMatch = true 
) const

Find and return a T,.

if not found throw a fatal error. If recursive, search parent dictionaries. If patternMatch, use regular expressions. Allows scoping using '/' with special handling for '!' and '..'.

Definition at line 391 of file dictionaryTemplates.C.

References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::name(), and entry::stream().

Here is the call graph for this function:

◆ lookupCompoundScoped()

const T & lookupCompoundScoped ( const word keyword,
bool  recursive,
bool  patternMatch 
) const

Find return the reference to the compound T,.

if not found or not a compound throw a fatal error. If recursive, search parent dictionaries. If patternMatch, use regular expressions. Allows scoping using '/' with special handling for '!' and '..'.

Definition at line 413 of file dictionaryTemplates.C.

References token::compoundToken(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::name(), and entry::stream().

Here is the call graph for this function:

◆ isDict()

◆ subDictPtr() [1/2]

const Foam::dictionary * subDictPtr ( const word keyword) const

Find and return a sub-dictionary pointer if present.

otherwise return nullptr.

Definition at line 748 of file dictionary.C.

References entry::dict().

Referenced by namedBlock::namedBlock(), namedVertex::namedVertex(), blockVertex::read(), blockDescriptor::write(), and blockVertex::write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ subDictPtr() [2/2]

Foam::dictionary * subDictPtr ( const word keyword)

Find and return a sub-dictionary pointer if present.

otherwise return nullptr.

Definition at line 763 of file dictionary.C.

References entry::dict().

Here is the call graph for this function:

◆ subDict() [1/2]

const Foam::dictionary & subDict ( const word keyword) const

Find and return a sub-dictionary.

Definition at line 778 of file dictionary.C.

References entry::dict(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, and Foam::name().

Referenced by sixDoFRigidBodyMotion::addConstraints(), snappyLayerDriver::addLayers(), sixDoFRigidBodyMotion::addRestraints(), Foam::blendingDict(), CloudFunctionObjectList< CloudType >::CloudFunctionObjectList(), collection::collection(), decompositionMethod::decompositionMethod(), multiRegionSolutionControl::dict(), singleRegionSolutionControl::dict(), fvMeshDistribute::distribute(), includeEntry::execute(), functionObjectList::functionObjectList(), subModelBase::getBaseProperty(), subModelBase::getModelProperty(), cloudSolution::integrationSchemes(), cloudSolution::interpolationSchemes(), layerParameters::layerParameters(), Foam::listSwitches(), LocalInteraction< CloudType >::LocalInteraction(), basicThermo::lookupCstrIter(), laminarModel< BasicMomentumTransportModel >::New(), LESModel< BasicMomentumTransportModel >::New(), RASModel< BasicMomentumTransportModel >::New(), XiModel::New(), SuModel::New(), XiGModel::New(), XiEqModel::New(), XiProfile::New(), phaseModel::New(), fvMeshTopoChanger::New(), parcelThermo::parcelThermo(), phaseModel::phaseModel(), phaseSystem::phaseSystem(), Foam::preservePatchTypes(), diameterModel::read(), tolerances::read(), MaxwellStefan< BasicThermophysicalTransportModel >::read(), homogeneousMixture< ThermoType >::read(), inhomogeneousEGRMixture< ThermoType >::read(), inhomogeneousMixture< ThermoType >::read(), leanInhomogeneousMixture< ThermoType >::read(), BHomogeneousMixture< ThermoType >::read(), BInhomogeneousMixture< ThermoType >::read(), UHomogeneousMixture< ThermoType >::read(), UInhomogeneousEGRMixture< ThermoType >::read(), UInhomogeneousMixture< ThermoType >::read(), pureMixture< ThermoType >::read(), multicomponentMixture< ThermoType >::read(), singleComponentMixture< ThermoType >::read(), zonalMixture< ThermoType >::read(), SuModel::read(), XiModel::read(), MRFZoneList::read(), porosityModelList::read(), relaxation::read(), solidBodyMotionFunction::read(), kernelShape::read(), XiEqModel::read(), XiGModel::read(), XiProfile::read(), generatedZoneSet::read(), Foam::readConfigFile(), liquidProperties::readIfPresent(), constSolidThermo::readProperty(), refinementSurfaces::refinementSurfaces(), rigidBodyModel::rigidBodyModel(), searchableSurfaceList::searchableSurfaceList(), subModelBase::setBaseProperty(), subModelBase::setModelProperty(), cloudSolution::sourceTermDict(), Foam::units::table(), uInhomogeneousbMulticomponent::uInhomogeneousbMulticomponent(), uMulticomponentbInhomogeneous::uMulticomponentbInhomogeneous(), and dictionary::write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ subDict() [2/2]

Foam::dictionary & subDict ( const word keyword)

Find and return a sub-dictionary for manipulation.

Definition at line 793 of file dictionary.C.

References entry::dict(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, and Foam::name().

Here is the call graph for this function:

◆ subDictBackwardsCompatible()

const Foam::dictionary & subDictBackwardsCompatible ( const wordList keywords) const

Find and return a sub-dictionary, trying a list of keywords in.

sequence, otherwise error.

Definition at line 808 of file dictionary.C.

References entry::dict().

Referenced by argList::displayDoc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ subOrEmptyDict()

const Foam::dictionary & subOrEmptyDict ( const word keyword,
const bool  mustRead = false 
) const

Find and return a sub-dictionary.

or empty dictionary if the sub-dictionary does not exist

Definition at line 828 of file dictionary.C.

References entry::dict(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, and Foam::name().

Referenced by singleRegionConvergenceControl::read(), and singleRegionCorrectorConvergenceControl::read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ optionalSubDict()

const Foam::dictionary & optionalSubDict ( const word keyword) const

Find and return a sub-dictionary if found.

otherwise return this dictionary

Definition at line 855 of file dictionary.C.

References entry::dict().

Here is the call graph for this function:

◆ typeDict()

const Foam::dictionary & typeDict ( const word typeName) const

Find and return a type sub-dictionary.

looked-up from typeName with optional "Coeffs" appended

Definition at line 873 of file dictionary.C.

References entry::dict(), and entry::isDict().

Referenced by BreakupModel< CloudType >::BreakupModel(), parMetis::parMetis(), doubleSigmoid::read(), sigmoid::read(), dampedCoulomb::read(), lennardJones::read(), harmonicSpring::read(), pitchForkRing::read(), and restrainedHarmonicSpring::read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ typeOrEmptyDict()

const Foam::dictionary & typeOrEmptyDict ( const word typeName) const

Find and return a type sub-dictionary.

looked-up from typeName with optional "Coeffs" appended or empty dictionary if the sub-dictionary does not exist

Definition at line 897 of file dictionary.C.

References entry::dict(), and entry::isDict().

Referenced by decompositionMethod::NewDecomposer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ optionalTypeDict()

◆ scopedDict() [1/2]

const Foam::dictionary & scopedDict ( const word keyword) const

Find and return a sub-dictionary by scoped lookup.

i.e. the keyword may contain scope characters. If the keyword is null this dictionary is returned

Definition at line 943 of file dictionary.C.

References Foam::abort(), entry::dict(), Foam::endl(), Foam::FatalIOError, FatalIOErrorInFunction, entry::isDict(), and Foam::name().

Referenced by Foam::readConfigFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scopedDict() [2/2]

Foam::dictionary & scopedDict ( const word keyword)

Find and return a sub-dictionary by scoped lookup.

i.e. the keyword may contain scope characters. If the keyword is null this dictionary is returned

Definition at line 972 of file dictionary.C.

◆ toc()

◆ sortedToc()

Foam::wordList sortedToc ( ) const

Return the sorted table of contents.

Definition at line 995 of file dictionary.C.

Referenced by Foam::listSwitches().

Here is the caller graph for this function:

◆ keys()

Foam::List< Foam::keyType > keys ( bool  patterns = false) const

Return the list of available keys or patterns.

Definition at line 1001 of file dictionary.C.

References forAllConstIter, and List< T >::setSize().

Referenced by Foam::mergeDictionaries().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ substituteKeyword()

bool substituteKeyword ( const word keyword)

Substitute the given keyword prepended by '$' with the.

corresponding sub-dictionary entries

Definition at line 172 of file dictionaryIO.C.

References dictionary::add(), entry::dict(), forAllConstIter, and dictionary::lookupEntryPtr().

Here is the call graph for this function:

◆ add() [1/8]

bool add ( entry entryPtr,
bool  mergeEntry = false 
)

Add a new entry.

With the merge option, dictionaries are interwoven and primitive entries are overwritten

Definition at line 1019 of file dictionary.C.

References entry::dict(), entry::disableFunctionEntries, Foam::endl(), IOWarningInFunction, entry::isDict(), keyType::isPattern(), entry::keyword(), entry::name(), Foam::name(), and UILList< LListBase, T >::remove().

Referenced by error::abort(), IOerror::abort(), Foam::addEntry(), snappyLayerDriver::addLayers(), dimensioned< Type >::dimensioned(), includeEntry::execute(), error::exit(), IOerror::exit(), NamedEnum< vtkPolyhedra, 3 >::lookupOrDefault(), Foam::mergeDictionaries(), namedBlock::namedBlock(), namedVertex::namedVertex(), entry::New(), cellTable::operator=(), argList::parse(), Foam::preservePatchTypes(), generatedZoneSet::read(), Foam::readConfigFile(), subModelBase::setBaseProperty(), subModelBase::setModelProperty(), dictionary::substituteKeyword(), polynomialSolidTransport< Thermo, PolySize >::write(), adiabaticPerfectFluid< Specie >::write(), Boussinesq< Specie >::write(), icoPolynomial< Specie, PolySize >::write(), icoTabulated< Specie >::write(), incompressiblePerfectGas< Specie >::write(), linear< Type >::write(), perfectFluid< Specie >::write(), rhoConst< Specie >::write(), rhoTabulated< Specie >::write(), rPolynomial< Specie >::write(), specie::write(), eConstThermo< EquationOfState >::write(), eIcoTabulatedThermo< EquationOfState >::write(), ePolynomialThermo< EquationOfState, PolySize >::write(), eTabulatedThermo< EquationOfState >::write(), hConstThermo< EquationOfState >::write(), hIcoTabulatedThermo< EquationOfState >::write(), hPolynomialThermo< EquationOfState, PolySize >::write(), hTabulatedThermo< EquationOfState >::write(), janafThermo< EquationOfState >::write(), AndradeTransport< Thermo >::write(), icoTabulatedTransport< Thermo >::write(), logPolynomialTransport< Thermo, PolySize >::write(), polynomialTransport< Thermo, PolySize >::write(), sutherlandTransport< Thermo >::write(), tabulatedTransport< Thermo >::write(), WLFTransport< Thermo >::write(), surfaceFeatures::writeDict(), and Time::writeTimeDict().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add() [2/8]

void add ( const entry e,
bool  mergeEntry = false 
)

Add an entry.

With the merge option, dictionaries are interwoven and primitive entries are overwritten

Definition at line 1111 of file dictionary.C.

References Foam::add(), and Foam::e.

Here is the call graph for this function:

◆ add() [3/8]

void add ( const keyType k,
const word w,
bool  overwrite = false 
)

Add a word entry.

optionally overwrite an existing entry

Definition at line 1117 of file dictionary.C.

References Foam::add(), k, and overwrite.

Here is the call graph for this function:

◆ add() [4/8]

void add ( const keyType k,
const string s,
bool  overwrite = false 
)

Add a string entry.

optionally overwrite an existing entry

Definition at line 1123 of file dictionary.C.

References Foam::add(), k, overwrite, and s().

Here is the call graph for this function:

◆ add() [5/8]

void add ( const keyType k,
const label  l,
bool  overwrite = false 
)

Add a label entry.

optionally overwrite an existing entry

Definition at line 1134 of file dictionary.C.

References Foam::add(), k, and overwrite.

Here is the call graph for this function:

◆ add() [6/8]

void add ( const keyType k,
const scalar  s,
bool  overwrite = false 
)

Add a scalar entry.

optionally overwrite an existing entry

Definition at line 1140 of file dictionary.C.

References Foam::add(), k, overwrite, and s().

Here is the call graph for this function:

◆ add() [7/8]

void add ( const keyType k,
const dictionary d,
bool  mergeEntry = false 
)

Add a dictionary entry.

optionally merge with an existing sub-dictionary

Definition at line 1146 of file dictionary.C.

References Foam::add(), and k.

Here is the call graph for this function:

◆ add() [8/8]

void add ( const keyType k,
const T t,
bool  overwrite = false 
)

Add a T entry.

optionally overwrite an existing entry

Definition at line 440 of file dictionaryTemplates.C.

References Foam::add(), k, and overwrite.

Here is the call graph for this function:

◆ set() [1/9]

void set ( entry entryPtr)

Assign a new entry, overwrite any existing entry.

Definition at line 1157 of file dictionary.C.

References Foam::add(), dictionary::clear(), entry::dict(), entry::isDict(), and entry::keyword().

Here is the call graph for this function:

◆ set() [2/9]

void set ( const entry e)

Assign a new entry, overwrite any existing entry.

Definition at line 1170 of file dictionary.C.

References Foam::e.

◆ set() [3/9]

void set ( const keyType k,
const dictionary d 
)

Assign a dictionary entry, overwrite any existing entry.

Definition at line 1176 of file dictionary.C.

References k.

◆ set() [4/9]

void set ( const keyType k,
const std::tuple< const Entries &... > &  entries 
)

Assign a dictionary entry, overwrite any existing entry.

Definition at line 454 of file dictionaryTemplates.C.

References k.

◆ set() [5/9]

void set ( const keyType k,
const T t 
)

Assign a T entry, overwrite any existing entry.

Definition at line 447 of file dictionaryTemplates.C.

References k.

◆ set() [6/9]

void set ( const entry e,
const Entries &  ... 
)

Assign multiple entries, overwriting any existing entries.

◆ set() [7/9]

void set ( const keyType ,
const T ,
const Entries &  ... 
)

Assign multiple T entries, overwriting any existing entries.

◆ remove() [1/2]

bool remove ( const word Keyword)

Remove an entry specified by keyword.

Definition at line 1182 of file dictionary.C.

References UILList< LListBase, T >::remove().

Referenced by removeEntry::execute(), Foam::mergeDictionaries(), and dictionary::read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove() [2/2]

void remove ( const wordList Keywords)

Remove entries specified by keywords.

Definition at line 1214 of file dictionary.C.

References forAll.

◆ changeKeyword()

bool changeKeyword ( const keyType oldKeyword,
const keyType newKeyword,
bool  forceOverwrite = false 
)

Change the keyword for an entry,.

optionally forcing overwrite of an existing entry

Definition at line 1223 of file dictionary.C.

References Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, IOWarningInFunction, keyType::isPattern(), and Foam::name().

Here is the call graph for this function:

◆ merge()

bool merge ( const dictionary dict)

Merge entries from the given dictionary.

Also merge sub-dictionaries as required.

Definition at line 1313 of file dictionary.C.

References Foam::abort(), Foam::add(), Foam::clone(), dict, Foam::FatalIOError, FatalIOErrorInFunction, forAllConstIter, and Foam::name().

Referenced by snappyLayerDriver::addLayers(), Foam::debug::configDict(), functionObjectList::functionObjectList(), Foam::listSwitches(), functionObjectList::New(), Foam::readConfigFile(), and stateModel::stateDict().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear()

void clear ( )

Clear the dictionary.

Definition at line 1358 of file dictionary.C.

References ILList< LListBase, T >::clear().

Referenced by includeEntry::execute(), functionObjectList::New(), entry::New(), Foam::operator>>(), and dictionary::set().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ transfer()

void transfer ( dictionary dict)

Transfer the contents of the argument and annul the argument.

Definition at line 1367 of file dictionary.C.

References dict, dictionaryName::name(), Foam::name(), and ILList< LListBase, T >::transfer().

Referenced by Foam::operator>>().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read()

◆ global()

bool global ( ) const
virtual

Return true if the dictionary global,.

i.e. the same on all processors. Defaults to false, must be overridden by global IO dictionaries

Reimplemented in localIOdictionary, IOdictionary, and dictionary::includedDictionary.

Definition at line 159 of file dictionaryIO.C.

References dictionary::global(), and dictionary::null.

Referenced by dictionary::global().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write()

◆ operator[]()

Foam::ITstream & operator[] ( const word keyword) const

Find and return entry.

Definition at line 1382 of file dictionary.C.

References Foam::units::lookup().

Here is the call graph for this function:

◆ operator=()

◆ operator+=()

void operator+= ( const dictionary rhs)

Include entries from the given dictionary.

Warn, but do not overwrite existing entries.

Definition at line 1411 of file dictionary.C.

References Foam::abort(), Foam::add(), Foam::clone(), Foam::FatalIOError, FatalIOErrorInFunction, forAllConstIter, and Foam::name().

Here is the call graph for this function:

◆ operator|=()

void operator|= ( const dictionary rhs)

Conditionally include entries from the given dictionary.

Do not overwrite existing entries.

Definition at line 1428 of file dictionary.C.

References Foam::abort(), Foam::add(), Foam::clone(), Foam::FatalIOError, FatalIOErrorInFunction, forAllConstIter, found, and Foam::name().

Here is the call graph for this function:

◆ operator<<=()

void operator<<= ( const dictionary rhs)

Unconditionally include entries from the given dictionary.

Overwrite existing entries.

Definition at line 1448 of file dictionary.C.

References Foam::abort(), Foam::clone(), Foam::FatalIOError, FatalIOErrorInFunction, forAllConstIter, and Foam::name().

Here is the call graph for this function:

◆ entries() [2/2]

std::tuple<const Entries& ...> entries ( const Entries &...  entries)

Definition at line 34 of file dictionaryTemplates.C.

References dictionary::entries().

Here is the call graph for this function:

◆ set() [8/9]

void set ( const entry e,
const Entries &...  entries 
)

Definition at line 465 of file dictionaryTemplates.C.

References Foam::e.

◆ set() [9/9]

void set ( const keyType k,
const T t,
const Entries &...  entries 
)

Definition at line 473 of file dictionaryTemplates.C.

References k.

Friends And Related Function Documentation

◆ entry

friend class entry
friend

Declare friendship with the entry class for IO.

Definition at line 251 of file dictionary.H.

◆ operator>>

Istream& operator>> ( Istream ,
dictionary  
)
friend

Read dictionary from Istream.

◆ operator<<

Ostream& operator<< ( Ostream ,
const dictionary  
)
friend

Write dictionary to Ostream.

Member Data Documentation

◆ null


The documentation for this class was generated from the following files: