Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | Friends
dictionary Class Reference

A list of keyword definitions, which are a keyword followed by any number of values (e.g. words and numbers). The keywords can represent patterns which are matched using Posix regular expressions. The general order for searching is as follows: More...

Inheritance diagram for dictionary:
Inheritance graph
[legend]
Collaboration diagram for dictionary:
Collaboration graph
[legend]

Public Member Functions

 ClassName ("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, Istream &)
 Construct given the entry name, parent dictionary and Istream,. More...
 
 dictionary (Istream &)
 Construct top-level dictionary from Istream,. More...
 
 dictionary (Istream &, const bool keepHeader)
 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...
 
 dictionary (const dictionary &parentDict, const Xfer< dictionary > &)
 Construct by transferring parameter contents given parent dictionary. More...
 
 dictionary (const Xfer< dictionary > &)
 Construct top-level dictionary by transferring parameter contents. More...
 
autoPtr< dictionaryclone () const
 Construct and return clone. More...
 
virtual ~dictionary ()
 Destructor. More...
 
const dictionaryparent () const
 Return the parent dictionary. More...
 
const dictionarytopDict () const
 Return the top of the tree. More...
 
label startLineNumber () const
 Return line number of first token in dictionary. More...
 
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 entrylookupEntry (const word &, bool recursive, bool patternMatch) const
 Find and return an entry data stream if present otherwise error. More...
 
ITstreamlookup (const word &, bool recursive=false, bool patternMatch=true) const
 Find and return an entry data stream. More...
 
template<class T >
T lookupOrDefault (const word &, const T &, bool recursive=false, bool patternMatch=true) const
 Find and return a T,. More...
 
template<class T >
T lookupOrAddDefault (const word &, const T &, bool recursive=false, bool patternMatch=true)
 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...
 
const entrylookupScopedEntryPtr (const word &, bool recursive, bool patternMatch) const
 Find and return an entry data stream pointer if present. 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...
 
const dictionarysubDict (const word &) const
 Find and return a sub-dictionary. More...
 
dictionarysubDict (const word &)
 Find and return a sub-dictionary for manipulation. More...
 
dictionary subOrEmptyDict (const word &, const bool mustRead=false) const
 Find and return a sub-dictionary as a copy, or. More...
 
wordList toc () const
 Return the 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 substituteScopedKeyword (const word &keyword)
 Substitute the given scoped 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 T >
void set (const keyType &, const T &)
 Assign a T entry, overwrite any existing entry. More...
 
bool remove (const word &)
 Remove an entry specified by keyword. 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...
 
Xfer< dictionaryxfer ()
 Transfer contents to the Xfer container. More...
 
bool read (Istream &)
 Read dictionary from Istream. More...
 
bool read (Istream &, const bool keepHeader)
 Read dictionary from Istream, optionally keeping the header. 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...
 
- Public Member Functions inherited from dictionaryName
 dictionaryName ()
 Construct dictionaryName null. More...
 
 dictionaryName (const fileName &name)
 Construct dictionaryName as copy of the given fileName. 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...
 
- Public Member Functions inherited from IDLList< entry >
 IDLList ()
 Null construct. More...
 
 IDLList (const entry &a)
 Construct given initial T. More...
 
 IDLList (Istream &is, const INew &inewt)
 Construct from Istream using given Istream constructor class. More...
 
 IDLList (Istream &is)
 Construct from Istream. More...
 
 IDLList (const IDLList< entry > &idll, const CloneArg &cloneArg)
 Copy constructor with additional argument for clone. More...
 
- Public Member Functions inherited from ILList< DLListBase, entry >
 ILList ()
 Null construct. More...
 
 ILList (T *a)
 Construct given initial T. More...
 
 ILList (Istream &)
 Construct from Istream. More...
 
 ILList (const ILList< LListBase, T > &)
 Construct as copy. More...
 
 ILList (const ILList< LListBase, T > &lst, const CloneArg &cloneArg)
 Copy constructor with additional argument for clone. More...
 
 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 > &)
 

Static Public Member Functions

static autoPtr< dictionaryNew (Istream &)
 Construct top-level dictionary on freestore from Istream. More...
 

Static Public Attributes

static const dictionary null
 Null dictionary. More...
 

Private Member Functions

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. More...
 
bool findInPatterns (const bool patternMatch, const word &Keyword, DLList< entry * >::iterator &wcLink, DLList< autoPtr< regExp > >::iterator &reLink)
 Search patterns table for exact match or regular expression match. More...
 

Private Attributes

HashTable< entry * > hashedEntries_
 HashTable of the entries held on the DL-list for quick lookup. More...
 
const dictionaryparent_
 Parent dictionary. More...
 
DLList< entry * > patternEntries_
 Entries of matching patterns. More...
 
DLList< autoPtr< regExp > > patternRegexps_
 Patterns as precompiled regular expressions. More...
 

Static Private Attributes

static bool writeOptionalEntries
 If true write optional keywords and values. 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...
 

Detailed Description

A list of keyword definitions, which are a keyword followed by any number of values (e.g. words and numbers). The keywords can represent patterns which are matched using Posix regular expressions. The general order for searching is as follows:

- exact match

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.

To add - a merge() member function with a non-const dictionary parameter? This would avoid unnecessary cloning in the add(entry*, bool) method.

Source files

Definition at line 137 of file dictionary.H.

Constructor & Destructor Documentation

◆ dictionary() [1/10]

Construct top-level dictionary null.

Definition at line 113 of file dictionary.C.

Referenced by data::data().

Here is the caller graph for this function:

◆ dictionary() [2/10]

dictionary ( const fileName name)
explicit

Construct top-level empty dictionary with given name.

Definition at line 119 of file dictionary.C.

◆ dictionary() [3/10]

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

Construct given the entry name, parent dictionary and Istream,.

reading entries until lastEntry or EOF

Definition at line 34 of file dictionaryIO.C.

References Foam::read().

Here is the call graph for this function:

◆ dictionary() [4/10]

dictionary ( Istream is)

Construct top-level dictionary from Istream,.

reading entries until EOF

Definition at line 47 of file dictionaryIO.C.

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

Here is the call graph for this function:

◆ dictionary() [5/10]

dictionary ( Istream is,
const bool  keepHeader 
)

Construct top-level dictionary from Istream,.

reading entries until EOF, optionally keeping the header

Definition at line 59 of file dictionaryIO.C.

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

Here is the call graph for this function:

◆ dictionary() [6/10]

dictionary ( const dictionary parentDict,
const dictionary dict 
)

Construct as copy given the parent dictionary.

Definition at line 127 of file dictionary.C.

References forAllIter.

◆ dictionary() [7/10]

dictionary ( const dictionary dict)

Construct top-level dictionary as copy.

Definition at line 153 of file dictionary.C.

References forAllIter.

◆ dictionary() [8/10]

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 178 of file dictionary.C.

◆ dictionary() [9/10]

dictionary ( const dictionary parentDict,
const Xfer< dictionary > &  dict 
)

Construct by transferring parameter contents given parent dictionary.

Definition at line 192 of file dictionary.C.

References dict, dictionaryName::name(), and Foam::name().

Here is the call graph for this function:

◆ dictionary() [10/10]

dictionary ( const Xfer< dictionary > &  dict)

Construct top-level dictionary by transferring parameter contents.

Definition at line 205 of file dictionary.C.

References dict.

◆ ~dictionary()

~dictionary ( )
virtual

Destructor.

Definition at line 223 of file dictionary.C.

Member Function Documentation

◆ findInPatterns() [1/2]

bool findInPatterns ( const bool  patternMatch,
const word Keyword,
DLList< entry * >::const_iterator &  wcLink,
DLList< autoPtr< regExp > >::const_iterator &  reLink 
) const
private

Search patterns table for exact match or regular expression match.

Definition at line 50 of file dictionary.C.

References LList< DLListBase, T >::end().

Here is the call graph for this function:

◆ findInPatterns() [2/2]

bool findInPatterns ( const bool  patternMatch,
const word Keyword,
DLList< entry * >::iterator &  wcLink,
DLList< autoPtr< regExp > >::iterator &  reLink 
)
private

Search patterns table for exact match or regular expression match.

Definition at line 81 of file dictionary.C.

References LList< DLListBase, T >::end().

Here is the call graph for this function:

◆ ClassName()

ClassName ( "dictionary"  )

◆ clone()

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

Construct and return clone.

Definition at line 215 of file dictionary.C.

Referenced by createRefinementSurfaces(), hexRef8Data::hexRef8Data(), 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 73 of file dictionaryIO.C.

◆ parent()

const dictionary& parent ( ) const
inline

Return the parent dictionary.

Definition at line 251 of file dictionary.H.

References dictionary::parent_.

◆ topDict()

const Foam::dictionary & topDict ( ) const

Return the top of the tree.

Definition at line 229 of file dictionary.C.

References p.

Referenced by codeStream::getFunction().

Here is the caller graph for this function:

◆ startLineNumber()

Foam::label startLineNumber ( ) const

Return line number of first token in dictionary.

Definition at line 244 of file dictionary.C.

Referenced by messageStream::operator()(), and IOerror::operator()().

Here is the caller graph for this function:

◆ endLineNumber()

Foam::label endLineNumber ( ) const

Return line number of last token in dictionary.

Definition at line 257 of file dictionary.C.

Referenced by messageStream::operator()(), and IOerror::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 270 of file dictionary.C.

References OSHA1stream::digest(), and forAllConstIter().

Referenced by writeDictionary::execute(), main(), and functionObjectList::read().

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

◆ tokens()

Foam::tokenList tokens ( ) const

Return the dictionary as a list of tokens.

Definition at line 284 of file dictionary.C.

References DynamicList::append(), ISstream::read(), OStringStream::str(), write(), and DynamicList::xfer().

Referenced by primitiveEntry::expandVariable().

Here is the call graph for this function:
Here is the caller 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 304 of file dictionary.C.

References LList< DLListBase, T >::begin(), LList::begin(), and dictionary::null.

Referenced by sixDoFRigidBodyMotion::addConstraints(), functionObjectCloud::addGeometryToScene(), fvMeshTools::addPatchFields(), sixDoFRigidBodyMotion::addRestraints(), advectiveFvPatchField< Type >::advectiveFvPatchField(), angularOscillatingDisplacementPointPatchVectorField::angularOscillatingDisplacementPointPatchVectorField(), angularOscillatingVelocityPointPatchVectorField::angularOscillatingVelocityPointPatchVectorField(), equationMaxIterCondition::apply(), equationInitialResidualCondition::apply(), renameBoundaryPatches::calculateNewBoundary(), cartesian2DMeshGenerator::cartesian2DMeshGenerator(), cartesianMeshGenerator::cartesianMeshGenerator(), checkMeshDict::checkAnisotropicSources(), checkMeshDict::checkBasicSettings(), checkMeshDict::checkBoundaryLayers(), checkMeshDict::checkEdgeMeshRefinements(), meshOctreeAddressing::checkGluedRegions(), checkMeshDict::checkKeepCellsIntersectingPatches(), checkMeshDict::checkLocalRefinementLevel(), polyMeshGenGeometryModification::checkModification(), edgeMeshGeometryModification::checkModification(), surfaceMeshGeometryModification::checkModification(), checkMeshDict::checkObjectRefinements(), checkMeshDict::checkPatchCellSize(), checkMeshDict::checkRemoveCellsIntersectingPatches(), checkMeshDict::checkRenameBoundary(), checkMeshDict::checkSubsetCellSize(), checkMeshDict::checkSurfaceRefinements(), chemkinReader::chemkinReader(), workflowControls::completedSteps(), coupledFreestreamFvPatchField< Type >::coupledFreestreamFvPatchField(), cartesian2DMeshGenerator::createCartesianMesh(), cartesianMeshGenerator::createCartesianMesh(), createRefinementSurfaces(), blockMesh::createTopology(), cyclicACMIFvPatchField< Type >::cyclicACMIFvPatchField(), cyclicAMIFvPatchField< scalar >::cyclicAMIFvPatchField(), determineDecomposition(), Foam::dimensionedConstant(), domainDecomposition::distributeCells(), ensightSurfaceWriter::ensightSurfaceWriter(), workflowControls::exitAfterCurrentStep(), fieldVisualisationBase::fieldVisualisationBase(), filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::filmPyrolysisRadiativeCoupledMixedFvPatchScalarField(), meshOctreeAddressing::findUsedBoxes(), functionObjectState::foundProperty(), freestreamFvPatchField< Type >::freestreamFvPatchField(), voronoiMeshGenerator::generateBoudaryLayers(), tetMeshGenerator::generateBoundaryLayers(), generateLayer(), geometryBase::geometryBase(), subModelBase::getModelProperty(), functionObjectState::getObjectProperty(), functionObjectState::getObjectResult(), refinementParameters::getZoneInfo(), solarLoad::initialise(), solarHeatLoad::initialise(), moleculeCloud::initialiseMolecules(), landuseClass::landuseClass(), workflowControls::lastCompletedStep(), meshOctreeCreator::loadDistribution(), main(), mappedPatchBase::mappedPatchBase(), meshOctreeAddressing::meshOctreeAddressing(), meshOctreeAutomaticRefinement::meshOctreeAutomaticRefinement(), nastranSurfaceWriter::nastranSurfaceWriter(), coordinateModification::New(), objectRefinement::New(), objectRefinement::objectRefinement(), functionObjectState::objectResultEntries(), functionObjectState::objectResultType(), dlLibraryTable::open(), lineRefinement::operator=(), sphereRefinement::operator=(), boxRefinement::operator=(), coneRefinement::operator=(), hollowConeRefinement::operator=(), planeScaling::operator=(), boxScaling::operator=(), axesRotation::operator=(), tetMeshGenerator::optimiseFinalMesh(), voronoiMeshGenerator::optimiseFinalMesh(), cartesianMeshGenerator::optimiseFinalMesh(), meshOptimizer::optimizeBoundaryLayer(), oscillatingDisplacementPointPatchVectorField::oscillatingDisplacementPointPatchVectorField(), oscillatingFixedValueFvPatchField< Type >::oscillatingFixedValueFvPatchField(), oscillatingVelocityPointPatchVectorField::oscillatingVelocityPointPatchVectorField(), Foam::preservePatchTypes(), tetMeshGenerator::projectSurfaceAfterBackScaling(), voronoiMeshGenerator::projectSurfaceAfterBackScaling(), cartesianMeshGenerator::projectSurfaceAfterBackScaling(), solution::read(), tolerances::read(), fvSchemes::read(), outputFilterOutputControl::read(), abortCalculation::read(), fixedTemperatureConstraint::read(), explicitPorositySource::read(), streamLineBase::read(), sampledSurfaces::read(), streamLine::read(), sampledSets::read(), regionSizeDistribution::read(), forces::read(), Cloud< streamLineParticle >::readCloudUniformProperties(), Time::readDict(), pairPotentialList::readPairPotentialDict(), triangulateNonPlanarBaseFaces::readSettings(), boundaryLayerOptimisation::readSettings(), refineBoundaryLayers::readSettings(), tetherPotentialList::readTetherPotentialDict(), meshOctreeCreator::refineBoxesContainedInObjects(), meshOctreeCreator::refineBoxesIntersectingEdgeMeshes(), meshOctreeCreator::refineBoxesIntersectingSurfaces(), refinementSurfaces::refinementSurfaces(), renameBoundaryPatches::renameBoundaryPatches(), workflowControls::restartRequested(), sampledThresholdCellFaces::sampledThresholdCellFaces(), searchableSurfaces::searchableSurfaces(), runTimeCondition::setConditionDict(), meshOctreeAutomaticRefinement::setMaxRefLevel(), subModelBase::setModelProperty(), functionObjectState::setObjectResult(), fvMeshTools::setPatchFields(), meshOctreeCreator::setRootCubeSizeAndRefParameters(), potential::setSiteIdList(), workflowControls::setStepCompleted(), shellSurfaces::shellSurfaces(), sixDoFRigidBodyDisplacementPointPatchVectorField::sixDoFRigidBodyDisplacementPointPatchVectorField(), sixDoFRigidBodyMotion::sixDoFRigidBodyMotion(), solidBodyMotionDisplacementPointPatchVectorField::solidBodyMotionDisplacementPointPatchVectorField(), surface::surface(), TableFile::TableFile(), tetMeshGenerator::tetMeshGenerator(), timeVaryingMappedFixedValueFvPatchField< Type >::timeVaryingMappedFixedValueFvPatchField(), turbulentHeatFluxTemperatureFvPatchScalarField::turbulentHeatFluxTemperatureFvPatchScalarField(), turbulentInletFvPatchField< Type >::turbulentInletFvPatchField(), uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField(), uniformFixedValuePointPatchField< Type >::uniformFixedValuePointPatchField(), uniformInterpolatedDisplacementPointPatchVectorField::uniformInterpolatedDisplacementPointPatchVectorField(), Foam::unitSet(), meshOptimizer::untangleBoundaryLayer(), medialAxisMeshMover::update(), checkMeshDict::updateRenameBoundary(), valueAverage::valueAverage(), voronoiMeshGenerator::voronoiMeshGenerator(), wallHeatFluxFvPatchScalarField::wallHeatFluxFvPatchScalarField(), workflowControls::workflowCompleted(), averageCondition::write(), ensightSurfaceWriter::writeCollated(), and residuals::writeResidual().

Here is the call 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 NULL. If recursive, search parent dictionaries. If patternMatch, use regular expressions

Definition at line 343 of file dictionary.C.

References LList< DLListBase, T >::begin(), LList::begin(), and dictionary::null.

Referenced by checkDictionaryContent(), coordinateSystem::coordinateSystem(), createRefinementSurfaces(), dynamicCodeContext::dynamicCodeContext(), merge(), entry::New(), codedFunctionObject::read(), refinementSurfaces::refinementSurfaces(), shellSurfaces::shellSurfaces(), and solution::upgradeSolverDict().

Here is the call graph for this function:
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 NULL. If recursive, search parent dictionaries. If patternMatch, use regular expressions.

Definition at line 382 of file dictionary.C.

References LList< DLListBase, T >::begin(), LList::begin(), and dictionary::null.

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 426 of file dictionary.C.

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

Referenced by renameBoundaryPatches::calculateNewBoundary(), dynamicCodeContext::dynamicCodeContext(), lduMatrix::smoother::getName(), lduMatrix::preconditioner::getName(), main(), merge(), lduMatrix::smoother::New(), and lduMatrix::preconditioner::New().

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

◆ lookup()

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 449 of file dictionary.C.

Referenced by linearValveLayersFvMesh::addZonesAndModifiers(), linearValveFvMesh::addZonesAndModifiers(), mixerFvMesh::addZonesAndModifiers(), movingConeTopoFvMesh::addZonesAndModifiers(), advectiveFvPatchField< Type >::advectiveFvPatchField(), equationMaxIterCondition::apply(), equationInitialResidualCondition::apply(), averageCondition::averageCondition(), boundaryPatchBase::boundaryPatchBase(), moleculeCloud::buildConstProps(), immersedBoundaryForces::calcForcesMoment(), displacementInterpolationMotionSolver::calcInterpolation(), solarCalculator::calculateBetaTetha(), medialAxisMeshMover::calculateDisplacement(), renameBoundaryPatches::calculateNewBoundary(), cartesian2DMeshGenerator::cartesian2DMeshGenerator(), cartesianMeshGenerator::cartesianMeshGenerator(), displacementLayeredMotionMotionSolver::cellZoneSolve(), checkMeshDict::checkBasicSettings(), checkMeshDict::checkBoundaryLayers(), meshOctreeAddressing::checkGluedRegions(), checkMeshDict::checkKeepCellsIntersectingPatches(), checkMeshDict::checkObjectRefinements(), checkMeshDict::checkPatchCellSize(), checkMeshDict::checkRemoveCellsIntersectingPatches(), checkMeshDict::checkSubsetCellSize(), chemkinReader::chemkinReader(), CloudFunctionObjectList< KinematicCloud< CloudType > >::CloudFunctionObjectList(), coalCloudList::coalCloudList(), workflowControls::completedSteps(), solidificationMeltingSource::Cp(), cartesian2DMeshGenerator::createCartesianMesh(), cartesianMeshGenerator::createCartesianMesh(), thermalBaffleFvPatchScalarField::createPatchMesh(), createRefinementSurfaces(), blockMesh::createTopology(), cyclicAMIPolyPatch::cyclicAMIPolyPatch(), cyclicPolyPatch::cyclicPolyPatch(), determineDecomposition(), forces::devRhoReff(), Foam::dimensionedConstant(), directions::directions(), argList::displayDoc(), domainDecomposition::distributeCells(), ensightSurfaceWriter::ensightSurfaceWriter(), EulerCoordinateRotation::EulerCoordinateRotation(), Peclet::execute(), extrudePatchMesh::extrudeMesh(), fieldVisualisationBase::fieldVisualisationBase(), meshOctreeAddressing::findUsedBoxes(), FreeStream< CloudType >::FreeStream(), voronoiMeshGenerator::generateBoudaryLayers(), tetMeshGenerator::generateBoundaryLayers(), generateLayer(), geometryBase::geometryBase(), functionObjectState::getObjectProperty(), Foam::MULES::implicitSolve(), coordinateSystem::init(), contactAngleForce::initialise(), solarLoad::initialise(), solarHeatLoad::initialise(), DSMCCloud< DSMCParcel< ParcelType > >::initialise(), moleculeCloud::initialiseMolecules(), liquidFilmThermo::initLiquid(), InjectionModelList< Foam::KinematicCloud< Foam::DSMCCloud > >::InjectionModelList(), landuseClass::landuseClass(), workflowControls::lastCompletedStep(), layerParameters::layerParameters(), Foam::MULES::limiterCorr(), basicThermo::lookupThermo(), main(), mappedPatchBase::mappedPatchBase(), mappedPatchFieldBase< Type >::mappedPatchFieldBase(), meshRefinement::markFacesOnProblemCells(), meshRefinement::markFacesOnProblemCellsGeometric(), meshOctreeAddressing::meshOctreeAddressing(), meshOctreeAutomaticRefinement::meshOctreeAutomaticRefinement(), displacementMotionSolverMeshMover::move(), medialAxisMeshMover::move(), displacementMotionSolverMeshMover::moveMesh(), forces::mu(), multiDirRefinement::multiDirRefinement(), nastranSurfaceWriter::nastranSurfaceWriter(), basicChemistryModel::New(), renumberMethod::New(), decompositionMethod::New(), coordinateModification::New(), profileModel::New(), tetherPotential::New(), interpolation< Foam::Vector >::New(), energyScalingFunction::New(), motionSolver::New(), boundaryPatchBase::New(), basicSolidChemistryModel::New(), psiCombustionModel::New(), rhoCombustionModel::New(), engineMesh::New(), barotropicCompressibilityModel::New(), sixDoFRigidBodyMotionRestraint::New(), viscosityModel::New(), solidBodyMotionFunction::New(), pairPotential::New(), laminarFlameSpeed::New(), objectRefinement::New(), sixDoFRigidBodyMotionConstraint::New(), surfaceFilmModel::New(), functionObject::New(), SRFModel::New(), RASModel< EddyDiffusivity< phaseCompressibleTurbulenceModel > >::New(), solidProperties::New(), LESModel< BasicTurbulenceModel >::New(), pyrolysisModel::New(), liquidProperties::New(), option::New(), lduMatrix::solver::New(), radiationModel::New(), LduMatrix::solver::New(), coordinateSystem::New(), sampledSurface::New(), sampledSet::New(), Reaction::New(), LduMatrix::smoother::New(), LduMatrix::preconditioner::New(), objectRefinement::objectRefinement(), offsetSurface::offsetSurface(), dlLibraryTable::open(), multivariateIndependentScheme< Type >::operator()(), lineRefinement::operator=(), sphereRefinement::operator=(), boxRefinement::operator=(), coneRefinement::operator=(), hollowConeRefinement::operator=(), planeScaling::operator=(), boxScaling::operator=(), axesRotation::operator=(), tetMeshGenerator::optimiseFinalMesh(), voronoiMeshGenerator::optimiseFinalMesh(), cartesianMeshGenerator::optimiseFinalMesh(), meshOptimizer::optimizeBoundaryLayer(), argList::parse(), phaseProperties::phaseProperties(), plane::plane(), porosityModel::porosityModel(), Reaction::Reaction(), solution::read(), exponentialRepulsion::read(), lennardJones::read(), harmonicSpring::read(), fvSchemes::read(), restrainedHarmonicSpring::read(), pitchForkRing::read(), dampedCoulomb::read(), anisotropicFilter::read(), laplaceFilter::read(), sigmoid::read(), doubleSigmoid::read(), solutionControl::read(), thermalBaffle::read(), azizChen::read(), CrossPowerLaw::read(), powerLaw::read(), HerschelBulkley::read(), maitlandSmith::read(), distributedTriSurfaceMesh::read(), BirdCarreau::read(), outputFilterOutputControl::read(), consumptionSpeed::read(), writeDictionary::read(), cloudSolution::read(), abortCalculation::read(), inhomogeneousMixture< ThermoType >::read(), residuals::read(), targetCoeffTrim::read(), reactionRateFlameArea::read(), explicitPorositySource::read(), removeRegisteredObject::read(), egrMixture< ThermoType >::read(), readFields::read(), runTimePostProcessing::read(), fieldValue::read(), cloudInfo::read(), radialActuationDiskSource::read(), timeActivatedFileUpdate::read(), surfaceInterpolateFields::read(), calcMag::read(), writeRegisteredObject::read(), codedFunctionObject::read(), calcFvcDiv::read(), calcFvcGrad::read(), cellSetOption::read(), fieldCoordinateSystemTransform::read(), partialWrite::read(), streamLineBase::read(), blendingFactor::read(), kinematicSingleLayer::read(), fieldMinMax::read(), sampledSurfaces::read(), nearWallFields::read(), directionalPressureGradientExplicitSource::read(), scalarTransport::read(), porosityModel::read(), turbulenceFields::read(), smoothDelta::read(), sampledSets::read(), fluxSummary::read(), forceCoeffs::read(), rotorDiskSource::read(), solidificationMeltingSource::read(), fieldAverage::read(), regionSizeDistribution::read(), externalCoupledFunctionObject::read(), pressureTools::read(), forces::read(), fieldAverage::readAveragingProperties(), blockMesh::readBoundary(), scene::readCamera(), Cloud< streamLineParticle >::readCloudUniformProperties(), dynamicRefineFvMesh::readDict(), patchProbes::readDict(), Time::readDict(), probes::readDict(), DimensionedField< Type, Foam::pointMesh >::readField(), IOobject::readHeader(), mappedPatchBase::readListOrField(), runTimePostProcessing::readObjects(), blockMesh::readPatches(), reactingOneDim::readReactingOneDimControls(), triangulateNonPlanarBaseFaces::readSettings(), boundaryLayerOptimisation::readSettings(), refineBoundaryLayers::readSettings(), interpolationLookUpTable< scalar >::readTable(), meshOctreeCreator::refineBoxesContainedInObjects(), meshOctreeCreator::refineBoxesIntersectingEdgeMeshes(), meshOctreeCreator::refineBoxesIntersectingSurfaces(), multiDirRefinement::refineFromDict(), refinementSurfaces::refinementSurfaces(), boundaryRegion::rename(), sampledCuttingPlane::sampledCuttingPlane(), sampledIsoSurface::sampledIsoSurface(), motionSmootherAlgo::scaleMesh(), searchableSurfaceCollection::searchableSurfaceCollection(), searchableSurfaces::searchableSurfaces(), hierarchGeomDecomp::setDecompOrder(), interRegionOption::setMapper(), meshOctreeAutomaticRefinement::setMaxRefLevel(), reducedUnits::setRefValues(), meshOctreeCreator::setRootCubeSizeAndRefParameters(), potential::setSiteIdList(), workflowControls::setStepCompleted(), shellSurfaces::shellSurfaces(), medialAxisMeshMover::shrinkMesh(), sixDoFRigidBodyDisplacementPointPatchVectorField::sixDoFRigidBodyDisplacementPointPatchVectorField(), slidingInterface::slidingInterface(), solidReaction::solidReaction(), STARCDCoordinateRotation::STARCDCoordinateRotation(), subTriSurfaceMesh::subset(), surface::surface(), surfaceFeatures::surfaceFeatures(), surfaceZonesInfo::surfaceZonesInfo(), TableFile::TableFile(), constantFilmThermo::Tb(), tetMeshGenerator::tetMeshGenerator(), Foam::unitSet(), meshOptimizer::untangleBoundaryLayer(), medialAxisMeshMover::update(), dynamicRefineFvMesh::update(), wallHeatFluxFvPatchScalarField::updateCoeffs(), wallHeatTransferFvPatchScalarField::updateCoeffs(), alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs(), turbulentTemperatureRadFixedGradientFvPatchScalarField::updateCoeffs(), turbulentHeatFluxTemperatureFvPatchScalarField::updateCoeffs(), checkMeshDict::updatePatchCellSize(), checkMeshDict::updateRenameBoundary(), valueAverage::valueAverage(), voronoiMeshGenerator::voronoiMeshGenerator(), constantFilmThermo::W(), WallLocalSpringSliderDashpot< CloudType >::WallLocalSpringSliderDashpot(), thermalBaffleFvPatchScalarField::write(), and residuals::writeResidual().

◆ lookupOrDefault()

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

Find and return a T,.

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

Definition at line 33 of file dictionaryTemplates.C.

References Foam::endl(), IOInfoInFunction, and entry::stream().

Referenced by medialAxisMeshMover::calculateDisplacement(), coupledFreestreamFvPatchField< Type >::coupledFreestreamFvPatchField(), scotchDecomp::decomposeOneProc(), EulerCoordinateRotation::EulerCoordinateRotation(), freestreamFvPatchField< Type >::freestreamFvPatchField(), landuseClass::landuseClass(), Foam::MULES::limiter(), Foam::MULES::limiterCorr(), main(), meshRefinement::markFacesOnProblemCells(), tableReader< Type >::New(), thermalBaffleModel::New(), argList::parse(), solution::read(), solutionControl::read(), outputFilterOutputControl::read(), functionObjectFile::read(), derivedFields::read(), targetCoeffTrim::read(), fieldValue::read(), cloudInfo::read(), valueAverage::read(), wallShearStress::read(), streamLineBase::read(), fieldMinMax::read(), directionalPressureGradientExplicitSource::read(), MRFZone::read(), fluxSummary::read(), externalCoupledFunctionObject::read(), forces::read(), smoothSolver::readControls(), lduMatrix::solver::readControls(), layerAdditionRemoval::readOldThickness(), reactingOneDim::readReactingOneDimControls(), refinementSurfaces::refinementSurfaces(), slidingInterface::setTolerances(), shellSurfaces::shellSurfaces(), solidBodyMotionFvMesh::solidBodyMotionFvMesh(), STARCDCoordinateRotation::STARCDCoordinateRotation(), turbulentMixingLengthDissipationRateInletFvPatchScalarField::turbulentMixingLengthDissipationRateInletFvPatchScalarField(), turbulentMixingLengthFrequencyInletFvPatchScalarField::turbulentMixingLengthFrequencyInletFvPatchScalarField(), Foam::unitSet(), medialAxisMeshMover::update(), dynamicRefineFvMesh::update(), turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs(), and turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs().

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

◆ lookupOrAddDefault()

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

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 63 of file dictionaryTemplates.C.

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

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

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

◆ readIfPresent()

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

Find an entry if present, and assign to T.

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

Definition at line 94 of file dictionaryTemplates.C.

References Foam::endl(), IOInfoInFunction, and entry::stream().

Referenced by functionObjectSurface::addGeometryToScene(), functionObjectLine::addGeometryToScene(), functionObjectCloud::addGeometryToScene(), advectiveFvPatchField< Type >::advectiveFvPatchField(), cloudSolution::cloudSolution(), blockMesh::createTopology(), cyclicAMIPolyPatch::cyclicAMIPolyPatch(), scotchDecomp::decomposeOneProc(), ensightSurfaceWriter::ensightSurfaceWriter(), extractPatchGroups(), fvMotionSolverEngineMesh::fvMotionSolverEngineMesh(), subModelBase::getBaseProperty(), subModelBase::getModelProperty(), functionObjectState::getObjectResult(), refinementParameters::getZoneInfo(), kinematicSingleLayer::info(), constantFilmThermo::init(), coordinateSystem::init(), layeredEngineMesh::layeredEngineMesh(), layerParameters::layerParameters(), linearNormal::linearNormal(), main(), chemistryReader< gasHThermoPhysics >::New(), axesRotation::operator=(), Foam::preservePatchTypes(), maxDeltaxyz::read(), vanDriestDelta::read(), IDDESDelta::read(), PrandtlDelta::read(), runTimeControl::read(), abortCalculation::read(), fixedTemperatureConstraint::read(), Peclet::read(), vorticity::read(), Lambda2::read(), DESModelRegions::read(), fieldValue::read(), Q::read(), CourantNo::read(), calcMag::read(), writeRegisteredObject::read(), yPlus::read(), calcFvcDiv::read(), systemCall::read(), calcFvcGrad::read(), cellSetOption::read(), wallShearStress::read(), streamLineBase::read(), blendingFactor::read(), kinematicSingleLayer::read(), streamLine::read(), scalarTransport::read(), fluxSummary::read(), probes::read(), solidificationMeltingSource::read(), fieldAverage::read(), regionSizeDistribution::read(), externalCoupledFunctionObject::read(), pressureTools::read(), forces::read(), patchProbes::readDict(), Time::readDict(), probes::readDict(), IOobject::readHeader(), Switch::readIfPresent(), sampledSurface::sampledSurface(), searchableSurfaces::searchableSurfaces(), Time::setControls(), Time::setTime(), sixDoFRigidBodyDisplacementPointPatchVectorField::sixDoFRigidBodyDisplacementPointPatchVectorField(), surfaceZonesInfo::surfaceZonesInfo(), surfZoneIdentifier::surfZoneIdentifier(), timeVaryingMappedFixedValueFvPatchField< Type >::timeVaryingMappedFixedValueFvPatchField(), kinematicSingleLayer::transferPrimaryRegionSourceFields(), triSurfaceMesh::triSurfaceMesh(), triSurfaceSearch::triSurfaceSearch(), and wallShearStressWriter::wallShearStressWriter().

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 NULL. Allows scoping using '.'

Definition at line 460 of file dictionary.C.

References entry::dict(), Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, entry::isDict(), dictionary::lookupScopedEntryPtr(), Foam::name(), dictionary::null, and dictionary::parent_.

Referenced by primitiveEntry::expandVariable(), dictionary::lookupScopedEntryPtr(), and entry::New().

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

◆ isDict()

bool isDict ( const word keyword) const

◆ subDictPtr()

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

Find and return a sub-dictionary pointer if present.

otherwise return NULL.

Definition at line 616 of file dictionary.C.

References entry::dict().

Referenced by blockMesh::createTopology(), main(), RASModel< EddyDiffusivity< phaseCompressibleTurbulenceModel > >::read(), and LESModel< BasicTurbulenceModel >::read().

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

◆ subDict() [1/2]

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

Find and return a sub-dictionary.

Definition at line 631 of file dictionary.C.

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

Referenced by sixDoFRigidBodyMotion::addConstraints(), functionObjectCloud::addGeometryToScene(), autoLayerDriver::addLayers(), fvMeshTools::addPatchFields(), sixDoFRigidBodyMotion::addRestraints(), linearValveLayersFvMesh::addZonesAndModifiers(), linearValveFvMesh::addZonesAndModifiers(), mixerFvMesh::addZonesAndModifiers(), movingConeTopoFvMesh::addZonesAndModifiers(), moleculeCloud::buildConstProps(), DSMCCloud< DSMCParcel< ParcelType > >::buildConstProps(), renameBoundaryPatches::calculateNewBoundary(), displacementLayeredMotionMotionSolver::cellZoneSolve(), checkMeshDict::checkAnisotropicSources(), checkMeshDict::checkBoundaryLayers(), checkMeshDict::checkEdgeMeshRefinements(), checkMeshDict::checkKeepCellsIntersectingPatches(), checkMeshDict::checkLocalRefinementLevel(), polyMeshGenGeometryModification::checkModification(), edgeMeshGeometryModification::checkModification(), surfaceMeshGeometryModification::checkModification(), checkMeshDict::checkObjectRefinements(), checkMeshDict::checkPatchCellSize(), checkMeshDict::checkRemoveCellsIntersectingPatches(), checkMeshDict::checkRenameBoundary(), checkMeshDict::checkSubsetCellSize(), checkMeshDict::checkSurfaceRefinements(), multiComponentMixture< ThermoType >::constructSpeciesData(), coordinateModifier::coordinateModifier(), createRefinementSurfaces(), scotchDecomp::decomposeOneProc(), decompositionMethod::decompositionMethod(), solutionControl::dict(), Foam::dimensionedConstant(), directions::directions(), argList::displayDoc(), fvMeshDistribute::distribute(), workflowControls::exitAfterCurrentStep(), fieldVisualisationBase::fieldVisualisationBase(), meshOctreeAddressing::findUsedBoxes(), functionObjectState::foundProperty(), voronoiMeshGenerator::generateBoudaryLayers(), tetMeshGenerator::generateBoundaryLayers(), generateLayer(), subModelBase::getBaseProperty(), subModelBase::getModelProperty(), functionObjectState::getObjectProperty(), functionObjectState::getObjectResult(), refinementParameters::getZoneInfo(), coordinateSystem::init(), DSMCCloud< DSMCParcel< ParcelType > >::initialise(), moleculeCloud::initialiseMolecules(), liquidFilmThermo::initLiquid(), cloudSolution::integrationSchemes(), cloudSolution::interpolationSchemes(), basicThermo::lookupThermo(), main(), multiSolidBodyMotionFvMesh::multiSolidBodyMotionFvMesh(), basicChemistryModel::New(), basicSolidChemistryModel::New(), RASModel< EddyDiffusivity< phaseCompressibleTurbulenceModel > >::New(), solidProperties::New(), LESModel< BasicTurbulenceModel >::New(), liquidProperties::New(), functionObjectState::objectResultEntries(), functionObjectState::objectResultType(), lineRefinement::operator=(), sphereRefinement::operator=(), boxRefinement::operator=(), coneRefinement::operator=(), hollowConeRefinement::operator=(), planeScaling::operator=(), boxScaling::operator=(), meshOptimizer::optimizeBoundaryLayer(), Foam::preservePatchTypes(), pyrolysisModelCollection::pyrolysisModelCollection(), solution::read(), lennardJones::read(), harmonicSpring::read(), tolerances::read(), pitchForkRing::read(), restrainedHarmonicSpring::read(), fvSchemes::read(), dampedCoulomb::read(), anisotropicFilter::read(), laplaceFilter::read(), sigmoid::read(), doubleSigmoid::read(), pureMixture< ThermoType >::read(), trimModel::read(), CrossPowerLaw::read(), HerschelBulkley::read(), porosityModelList::read(), powerLaw::read(), BirdCarreau::read(), homogeneousMixture< ThermoType >::read(), runTimeControl::read(), solidBodyMotionFunction::read(), multiComponentMixture< ThermoType >::read(), inhomogeneousMixture< ThermoType >::read(), veryInhomogeneousMixture< ThermoType >::read(), egrMixture< ThermoType >::read(), runTimePostProcessing::read(), scene::read(), MRFZoneList::read(), streamLineBase::read(), kinematicSingleLayer::read(), scalarTransport::read(), porosityModel::read(), externalCoupledFunctionObject::read(), forces::read(), Cloud< streamLineParticle >::readCloudUniformProperties(), dynamicRefineFvMesh::readDict(), Time::readDict(), canopySource::readLanduseClasses(), pairPotentialList::readPairPotentialDict(), reactingOneDim::readReactingOneDimControls(), ReactionList< Foam::sutherlandTransport >::readReactionDict(), triangulateNonPlanarBaseFaces::readSettings(), boundaryLayerOptimisation::readSettings(), refineBoundaryLayers::readSettings(), tetherPotentialList::readTetherPotentialDict(), fvMeshDistribute::receiveFields(), meshOctreeCreator::refineBoxesContainedInObjects(), meshOctreeCreator::refineBoxesIntersectingEdgeMeshes(), meshOctreeCreator::refineBoxesIntersectingSurfaces(), refinementSurfaces::refinementSurfaces(), workflowControls::restartRequested(), searchableSurfaceCollection::searchableSurfaceCollection(), searchableSurfaces::searchableSurfaces(), subModelBase::setBaseProperty(), runTimeCondition::setConditionDict(), subModelBase::setModelProperty(), functionObjectState::setObjectProperty(), functionObjectState::setObjectResult(), fvMeshTools::setPatchFields(), meshOctreeCreator::setRootCubeSizeAndRefParameters(), potential::setSiteIdList(), shellSurfaces::shellSurfaces(), displacementLayeredMotionMotionSolver::solve(), cloudSolution::sourceTermDict(), Foam::unitSet(), meshOptimizer::untangleBoundaryLayer(), checkMeshDict::updateBoundaryLayers(), checkMeshDict::updateKeepCellsIntersectingPatches(), checkMeshDict::updateLocalRefinement(), checkMeshDict::updatePatchCellSize(), checkMeshDict::updateRemoveCellsIntersectingPatches(), checkMeshDict::updateRenameBoundary(), valueAverage::valueAverage(), wideBandAbsorptionEmission::wideBandAbsorptionEmission(), averageCondition::write(), thermalBaffleFvPatchScalarField::write(), and Cloud< streamLineParticle >::writeCloudUniformProperties().

Here is the call graph for this function:

◆ subDict() [2/2]

Foam::dictionary & subDict ( const word keyword)

Find and return a sub-dictionary for manipulation.

Definition at line 648 of file dictionary.C.

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

Here is the call graph for this function:

◆ subOrEmptyDict()

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

Find and return a sub-dictionary as a copy, or.

return an empty dictionary if the sub-dictionary does not exist

Definition at line 666 of file dictionary.C.

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

Referenced by cloudSolution::cloudSolution(), main(), runTimePostProcessing::read(), and sampledSurfaces::read().

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

◆ toc()

Foam::wordList toc ( ) const

◆ keys()

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

Return the list of available keys or patterns.

Definition at line 711 of file dictionary.C.

References forAllConstIter(), and List::setSize().

Referenced by main(), and merge().

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 132 of file dictionaryIO.C.

References Foam::add(), entry::dict(), and forAllConstIter().

Here is the call graph for this function:

◆ substituteScopedKeyword()

bool substituteScopedKeyword ( const word keyword)

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

corresponding sub-dictionary entries

Definition at line 576 of file dictionary.C.

References Foam::add(), entry::dict(), and forAllConstIter().

Referenced by entry::New().

Here is the call graph for this function:
Here is the caller 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 729 of file dictionary.C.

References entry::dict(), Foam::endl(), IOWarningInFunction, entry::isDict(), keyType::isPattern(), entry::keyword(), entry::name(), and Foam::name().

Referenced by error::abort(), IOerror::abort(), dictionary::add(), addEntry(), autoLayerDriver::addLayers(), cartesian2DMeshGenerator::cartesian2DMeshGenerator(), cartesianMeshGenerator::cartesianMeshGenerator(), createDummyFvMeshFiles(), triSurfaceMetaData::createMetaData(), autoLayerDriver::determineSidePatches(), boundaryPatch::dict(), sphereRefinement::dict(), lineRefinement::dict(), boxRefinement::dict(), coneRefinement::dict(), hollowConeRefinement::dict(), planeScaling::dict(), processorBoundaryPatch::dict(), boxScaling::dict(), coordinateSystem::dict(), Foam::dimensionedConstant(), calcEntry::execute(), error::exit(), IOerror::exit(), refinementParameters::getZoneInfo(), main(), merge(), entry::New(), cellTable::operator=(), argList::parse(), meshReader::polyBoundaryPatches(), Foam::preservePatchTypes(), functionObjectState::propertyDict(), solution::read(), fvSchemes::read(), refineImmersedBoundaryMesh::refineMesh(), subModelBase::setBaseProperty(), runTimeCondition::setConditionDict(), cellTable::setEntry(), subModelBase::setModelProperty(), functionObjectState::setObjectProperty(), functionObjectState::setObjectResult(), workflowControls::setStepCompleted(), sixDoFRigidBodyMotionSolver::solve(), tetMeshGenerator::tetMeshGenerator(), kinematicSingleLayer::transferPrimaryRegionSourceFields(), checkMeshDict::updateBoundaryLayers(), sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), checkMeshDict::updateLocalRefinement(), checkMeshDict::updateRenameBoundary(), solution::upgradeSolverDict(), voronoiMeshGenerator::voronoiMeshGenerator(), averageCondition::write(), specie::write(), rhoConst::write(), polynomialTransport::write(), hConstThermo::write(), hRefConstThermo::write(), eConstThermo::write(), icoPolynomial::write(), perfectFluid::write(), linear< Type >::write(), incompressiblePerfectGas::write(), sutherlandTransport::write(), adiabaticPerfectFluid::write(), Boussinesq::write(), janafThermo::write(), streamLineBase::write(), fieldAverage::writeAveragingProperties(), Cloud< streamLineParticle >::writeCloudUniformProperties(), surfaceFeatures::writeDict(), and Time::writeObject().

Here is the call 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 810 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 816 of file dictionary.C.

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

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 823 of file dictionary.C.

References Foam::add(), k, 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 833 of file dictionary.C.

References Foam::add(), and k.

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 839 of file dictionary.C.

References Foam::add(), k, 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 846 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 124 of file dictionaryTemplates.C.

References dictionary::add(), and k.

Here is the call graph for this function:

◆ set() [1/4]

void set ( entry entryPtr)

◆ set() [2/4]

void set ( const entry e)

Assign a new entry, overwrite any existing entry.

Definition at line 869 of file dictionary.C.

References Foam::e.

◆ set() [3/4]

void set ( const keyType k,
const dictionary d 
)

Assign a dictionary entry, overwrite any existing entry.

Definition at line 875 of file dictionary.C.

References k.

◆ set() [4/4]

void set ( const keyType k,
const T t 
)

Assign a T entry, overwrite any existing entry.

Definition at line 131 of file dictionaryTemplates.C.

References k.

◆ remove()

bool remove ( const word Keyword)

Remove an entry specified by keyword.

Definition at line 881 of file dictionary.C.

References LList< DLListBase, T >::begin(), and LList::begin().

Referenced by workflowControls::clearCompletedSteps(), removeEntry::execute(), main(), merge(), checkMeshDict::updateBoundaryLayers(), checkMeshDict::updateLocalRefinement(), and workflowControls::workflowCompleted().

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

◆ 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 914 of file dictionary.C.

References LList< DLListBase, T >::begin(), LList::begin(), Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, IOWarningInFunction, keyType::isPattern(), and Foam::name().

Referenced by main().

Here is the call graph for this function:
Here is the caller 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 1005 of file dictionary.C.

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

Referenced by autoLayerDriver::addLayers(), main(), and Time::readDict().

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 1050 of file dictionary.C.

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

Referenced by fvSchemes::clear(), triSurfaceMetaData::createMetaData(), Foam::help::exchangeMap(), entry::New(), Foam::operator>>(), solution::read(), 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 1059 of file dictionary.C.

References dict, dictionary::hashedEntries_, dictionaryName::name(), Foam::name(), dictionary::patternEntries_, dictionary::patternRegexps_, and ILList< DLListBase, T >::transfer().

Referenced by csvTableReader< Type >::operator()(), and meshRefinement::updateMesh().

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

◆ xfer()

Transfer contents to the Xfer container.

Definition at line 1072 of file dictionary.C.

References Foam::xferMove().

Referenced by main().

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

◆ read() [1/2]

bool read ( Istream is)

Read dictionary from Istream.

Definition at line 126 of file dictionaryIO.C.

References Foam::read().

Referenced by dictionary::dictionary(), includeIfPresentEntry::execute(), calcEntry::execute(), includeEntry::execute(), includeEtcEntry::execute(), codeStream::execute(), and Foam::operator>>().

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

◆ read() [2/2]

bool read ( Istream is,
const bool  keepHeader 
)

Read dictionary from Istream, optionally keeping the header.

Definition at line 81 of file dictionaryIO.C.

References IOstream::bad(), token::BEGIN_BLOCK, Foam::endl(), IOstream::eof(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, IOstream::good(), Foam::Info, Foam::name(), entry::New(), and Istream::putBack().

Here is the call graph for this function:

◆ write()

void write ( Ostream os,
const bool  subDict = true 
) const

◆ operator[]()

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

Find and return entry.

Definition at line 1080 of file dictionary.C.

References lookup().

Here is the call graph for this function:

◆ operator=()

void operator= ( const dictionary rhs)

Definition at line 1086 of file dictionary.C.

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

Referenced by IOdictionary::IOdictionary(), and IOdictionary::operator=().

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

◆ operator+=()

void operator+= ( const dictionary rhs)

Include entries from the given dictionary.

Warn, but do not overwrite existing entries.

Definition at line 1109 of file dictionary.C.

References Foam::abort(), Foam::add(), 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 1126 of file dictionary.C.

References Foam::abort(), Foam::add(), 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 1146 of file dictionary.C.

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

Here is the call graph for this function:

Friends And Related Function Documentation

◆ entry

friend class entry
friend

Declare friendship with the entry class for IO.

Definition at line 185 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.

Field Documentation

◆ writeOptionalEntries

bool writeOptionalEntries
staticprivate

If true write optional keywords and values.

if not present in dictionary

Definition at line 146 of file dictionary.H.

◆ hashedEntries_

HashTable<entry*> hashedEntries_
private

HashTable of the entries held on the DL-list for quick lookup.

Definition at line 149 of file dictionary.H.

Referenced by dictionary::transfer().

◆ parent_

const dictionary& parent_
private

Parent dictionary.

Definition at line 152 of file dictionary.H.

Referenced by dictionary::lookupScopedEntryPtr(), and dictionary::parent().

◆ patternEntries_

DLList<entry*> patternEntries_
private

Entries of matching patterns.

Definition at line 155 of file dictionary.H.

Referenced by dictionary::transfer().

◆ patternRegexps_

DLList<autoPtr<regExp> > patternRegexps_
private

Patterns as precompiled regular expressions.

Definition at line 158 of file dictionary.H.

Referenced by dictionary::transfer().

◆ null

const dictionary null
static

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