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:
#include <OpenFOAM/dictionary.H>
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:
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.
Definition at line 122 of file dictionary.H.
Public Member Functions | |
ClassName ("dictionary") | |
dictionary () | |
Construct top-level dictionary null.
| |
dictionary (const fileName &name) | |
Construct top-level empty dictionary with given name.
| |
dictionary (const fileName &name, const dictionary &parentDict, Istream &) | |
Construct given the entry name, parent dictionary and Istream,.
| |
dictionary (Istream &) | |
Construct top-level dictionary from Istream, reading entries.
| |
dictionary (const dictionary &parentDict, const dictionary &) | |
Construct as copy given the parent dictionary.
| |
dictionary (const dictionary &) | |
Construct top-level dictionary as copy.
| |
dictionary (const dictionary *) | |
Construct top-level dictionary as copy from pointer to dictionary.
| |
dictionary (const dictionary &parentDict, const Xfer< dictionary > &) | |
Construct by transferring parameter contents given parent dictionary.
| |
dictionary (const Xfer< dictionary > &) | |
Construct top-level dictionary by transferring parameter contents.
| |
autoPtr< dictionary > | clone () const |
Construct and return clone.
| |
~dictionary () | |
const dictionary & | parent () const |
Return the parent dictionary.
| |
label | startLineNumber () const |
Return line number of first token in dictionary.
| |
label | endLineNumber () const |
Return line number of last token in dictionary.
| |
SHA1Digest | digest () const |
Return the SHA1 digest of the dictionary contents.
| |
bool | found (const word &, bool recursive=false) const |
Search dictionary for given keyword.
| |
const entry * | lookupEntryPtr (const word &, bool recursive, bool patternMatch) const |
Find and return an entry data stream pointer if present.
| |
entry * | lookupEntryPtr (const word &, bool recursive, bool patternMatch) |
Find and return an entry data stream pointer for manipulation.
| |
const entry & | lookupEntry (const word &, bool recursive, bool patternMatch) const |
Find and return an entry data stream if present otherwise error.
| |
ITstream & | lookup (const word &, bool recursive=false, bool patternMatch=true) const |
Find and return an entry data stream.
| |
template<class T > | |
T | lookupOrDefault (const word &, const T &, bool recursive=false, bool patternMatch=true) const |
Find and return a T,.
| |
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.
| |
template<class T > | |
bool | readIfPresent (const word &, T &, bool recursive=false, bool patternMatch=true) const |
Find an entry if present, and assign to T.
| |
bool | isDict (const word &) const |
Check if entry is a sub-dictionary.
| |
const dictionary * | subDictPtr (const word &) const |
Find and return a sub-dictionary pointer if present.
| |
const dictionary & | subDict (const word &) const |
Find and return a sub-dictionary.
| |
dictionary & | subDict (const word &) |
Find and return a sub-dictionary for manipulation.
| |
dictionary | subOrEmptyDict (const word &) const |
Find and return a sub-dictionary as a copy, or.
| |
wordList | toc () const |
Return the table of contents.
| |
List< keyType > | keys (bool patterns=false) const |
Return the list of available keys or patterns.
| |
bool | substituteKeyword (const word &keyword) |
Substitute the given keyword prepended by '$' with the.
| |
bool | add (entry *, bool mergeEntry=false) |
Add a new entry.
| |
void | add (const entry &, bool mergeEntry=false) |
Add an entry.
| |
void | add (const keyType &, const word &, bool overwrite=false) |
Add a word entry.
| |
void | add (const keyType &, const string &, bool overwrite=false) |
Add a string entry.
| |
void | add (const keyType &, const label, bool overwrite=false) |
Add a label entry.
| |
void | add (const keyType &, const scalar, bool overwrite=false) |
Add a scalar entry.
| |
void | add (const keyType &, const dictionary &, bool mergeEntry=false) |
Add a dictionary entry.
| |
template<class T > | |
void | add (const keyType &, const T &, bool overwrite=false) |
Add a T entry.
| |
void | set (entry *) |
Assign a new entry, overwrite any existing entry.
| |
void | set (const entry &) |
Assign a new entry, overwrite any existing entry.
| |
void | set (const keyType &, const dictionary &) |
Assign a dictionary entry, overwrite any existing entry.
| |
template<class T > | |
void | set (const keyType &, const T &) |
Assign a T entry, overwrite any existing entry.
| |
bool | remove (const word &) |
Remove an entry specified by keyword.
| |
bool | changeKeyword (const keyType &oldKeyword, const keyType &newKeyword, bool forceOverwrite=false) |
Change the keyword for an entry,.
| |
bool | merge (const dictionary &) |
Merge entries from the given dictionary.
| |
void | clear () |
Clear the dictionary.
| |
void | transfer (dictionary &) |
Transfer the contents of the argument and annul the argument.
| |
Xfer< dictionary > | xfer () |
Transfer contents to the Xfer container.
| |
bool | read (Istream &) |
Read dictionary from Istream.
| |
void | write (Ostream &, bool subDict=true) const |
ITstream & | operator[] (const word &) const |
Find and return entry.
| |
void | operator= (const dictionary &) |
void | operator+= (const dictionary &) |
Include entries from the given dictionary.
| |
void | operator|= (const dictionary &) |
Conditionally include entries from the given dictionary.
| |
void | operator<<= (const dictionary &) |
Unconditionally include entries from the given dictionary.
| |
Static Public Member Functions | |
static autoPtr< dictionary > | New (Istream &) |
Construct top-level dictionary on freestore from Istream.
| |
Static Public Attributes | |
static const dictionary | null |
Null dictionary.
| |
Friends | |
class | entry |
Declare friendship with the entry class for IO.
| |
Istream & | operator>> (Istream &, dictionary &) |
Read dictionary from Istream.
| |
Ostream & | operator<< (Ostream &, const dictionary &) |
Write dictionary to Ostream.
|
dictionary | ( | ) |
Construct top-level dictionary null.
Definition at line 105 of file dictionary.C.
dictionary | ( | const fileName & | name ) |
Construct top-level empty dictionary with given name.
Definition at line 111 of file dictionary.C.
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 96 of file dictionaryIO.C.
dictionary | ( | Istream & | is ) |
Construct top-level dictionary from Istream, reading entries.
until EOF
Definition at line 109 of file dictionaryIO.C.
References dictionary::clear(), and dictionary::read().
dictionary | ( | const dictionary & | parentDict, |
const dictionary & | dict | ||
) |
Construct as copy given the parent dictionary.
Definition at line 119 of file dictionary.C.
References forAllIter.
dictionary | ( | const dictionary & | dict ) |
Construct top-level dictionary as copy.
Definition at line 145 of file dictionary.C.
References forAllIter.
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 170 of file dictionary.C.
dictionary | ( | const dictionary & | parentDict, |
const Xfer< dictionary > & | dict | ||
) |
Construct by transferring parameter contents given parent dictionary.
Definition at line 184 of file dictionary.C.
References dictionaryName::name(), and Foam::name().
dictionary | ( | const Xfer< dictionary > & | dict ) |
Construct top-level dictionary by transferring parameter contents.
Definition at line 197 of file dictionary.C.
~dictionary | ( | ) |
Definition at line 215 of file dictionary.C.
ClassName | ( | "dictionary" | ) |
Foam::autoPtr< Foam::dictionary > clone | ( | ) | const |
Construct and return clone.
Definition at line 207 of file dictionary.C.
Foam::autoPtr< Foam::dictionary > New | ( | Istream & | is ) | [static]
|
Construct top-level dictionary on freestore from Istream.
Definition at line 121 of file dictionaryIO.C.
Referenced by dictionary::read().
const dictionary& parent | ( | ) | const [inline]
|
Return the parent dictionary.
Definition at line 229 of file dictionary.H.
Foam::label startLineNumber | ( | ) | const |
Return line number of first token in dictionary.
Reimplemented in dictionaryEntry.
Definition at line 223 of file dictionary.C.
Foam::label endLineNumber | ( | ) | const |
Return line number of last token in dictionary.
Reimplemented in dictionaryEntry.
Definition at line 236 of file dictionary.C.
Foam::SHA1Digest digest | ( | ) | const |
Return the SHA1 digest of the dictionary contents.
Definition at line 249 of file dictionary.C.
References OSHA1stream::digest(), and forAllConstIter.
Referenced by functionObjectList::read().
bool found | ( | const word & | keyword, |
bool | recursive = false
|
||
) | const |
Search dictionary for given keyword.
If recursive, search parent dictionaries
Definition at line 263 of file dictionary.C.
References DLListBase::begin(), and dictionary::null.
Referenced by activeBaffleVelocityFvPatchVectorField::activeBaffleVelocityFvPatchVectorField(), sixDoFRigidBodyMotion::addConstraints(), sixDoFRigidBodyMotion::addRestraints(), advectiveFvPatchField< Type >::advectiveFvPatchField(), alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField(), alphaFixedPressureFvPatchScalarField::alphaFixedPressureFvPatchScalarField(), angularOscillatingDisplacementPointPatchVectorField::angularOscillatingDisplacementPointPatchVectorField(), angularOscillatingVelocityPointPatchVectorField::angularOscillatingVelocityPointPatchVectorField(), autoHexMeshDriver::autoHexMeshDriver(), chemkinReader::chemkinReader(), cyclicPolyPatch::cyclicPolyPatch(), argList::displayDoc(), fanFvPatchField< Type >::fanFvPatchField(), fixedFluxPressureFvPatchScalarField::fixedFluxPressureFvPatchScalarField(), fvMotionSolverEngineMesh::fvMotionSolverEngineMesh(), fvPatchField< Type >::fvPatchField(), fvsPatchField< Type >::fvsPatchField(), greyDiffusiveRadiationMixedFvPatchScalarField::greyDiffusiveRadiationMixedFvPatchScalarField(), inletOutletTotalTemperatureFvPatchScalarField::inletOutletTotalTemperatureFvPatchScalarField(), JobInfo::JobInfo(), layeredEngineMesh::layeredEngineMesh(), layerParameters::layerParameters(), PstreamImpl::loadPstreamLibrary(), MarshakRadiationFixedTMixedFvPatchScalarField::MarshakRadiationFixedTMixedFvPatchScalarField(), MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField(), MRFZone::MRFZone(), pointPatchField< Type >::New(), fvsPatchField< Type >::New(), fvPatchField< Type >::New(), dlLibraryTable::open(), coordinateSystem::operator=(), coordinateRotation::operator=(), oscillatingDisplacementPointPatchVectorField::oscillatingDisplacementPointPatchVectorField(), oscillatingFixedValueFvPatchField< Type >::oscillatingFixedValueFvPatchField(), oscillatingVelocityPointPatchVectorField::oscillatingVelocityPointPatchVectorField(), Foam::preservePatchTypes(), pressureInletOutletVelocityFvPatchVectorField::pressureInletOutletVelocityFvPatchVectorField(), tolerances::read(), solution::read(), fvSchemes::read(), fieldAverage::readAveragingProperties(), Time::readDict(), refinementSurfaces::refinementSurfaces(), tolerances::relax(), sampledPlane::sampledPlane(), sampledThresholdCellFaces::sampledThresholdCellFaces(), searchableSurfaces::searchableSurfaces(), Foam::setRefCell(), sixDoFRigidBodyDisplacementPointPatchVectorField::sixDoFRigidBodyDisplacementPointPatchVectorField(), supersonicFreestreamFvPatchVectorField::supersonicFreestreamFvPatchVectorField(), timeVaryingMappedFixedValueFvPatchField< Type >::timeVaryingMappedFixedValueFvPatchField(), timeVaryingUniformFixedValueFvPatchField< Type >::timeVaryingUniformFixedValueFvPatchField(), timeVaryingUniformInletOutletFvPatchField< Type >::timeVaryingUniformInletOutletFvPatchField(), timeVaryingUniformTotalPressureFvPatchScalarField::timeVaryingUniformTotalPressureFvPatchScalarField(), totalPressureFvPatchScalarField::totalPressureFvPatchScalarField(), totalTemperatureFvPatchScalarField::totalTemperatureFvPatchScalarField(), turbulentInletFvPatchField< Type >::turbulentInletFvPatchField(), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(), uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField(), uniformDensityHydrostaticPressureFvPatchScalarField::uniformDensityHydrostaticPressureFvPatchScalarField(), valuePointPatchField< Type >::valuePointPatchField(), wallHeatTransferFvPatchScalarField::wallHeatTransferFvPatchScalarField(), and wideBandDiffusiveRadiationMixedFvPatchScalarField::wideBandDiffusiveRadiationMixedFvPatchScalarField().
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 298 of file dictionary.C.
References DLListBase::begin(), HashTable< T, Key, Hash >::end(), HashTable< T, Key, Hash >::find(), and dictionary::null.
Referenced by coordinateSystem::coordinateSystem(), entry::New(), Foam::debug::switchSet(), and solution::upgradeSolverDict().
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 337 of file dictionary.C.
References DLListBase::begin(), HashTable< T, Key, Hash >::end(), HashTable< T, Key, Hash >::find(), and dictionary::null.
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 381 of file dictionary.C.
References Foam::exit(), Foam::FatalIOError, FatalIOErrorIn, and Foam::name().
Referenced by lduMatrix::smoother::getName(), lduMatrix::preconditioner::getName(), lduMatrix::smoother::New(), and lduMatrix::preconditioner::New().
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 405 of file dictionary.C.
Referenced by activeBaffleVelocityFvPatchVectorField::activeBaffleVelocityFvPatchVectorField(), sixDoFRigidBodyMotion::addConstraints(), advectiveFvPatchField< Type >::advectiveFvPatchField(), argList::argList(), autoHexMeshDriver::autoHexMeshDriver(), cellModel::cellModel(), motionSmoother::checkMesh(), chemkinReader::chemkinReader(), molecule::constantProperties::constantProperties(), correlationFunction< Type >::correlationFunction(), cyclicPolyPatch::cyclicPolyPatch(), forces::devRhoReff(), Foam::dimensionedConstant(), directions::directions(), argList::displayDoc(), autoRefineDriver::doRefine(), EulerCoordinateRotation::EulerCoordinateRotation(), fanFvPatchField< Type >::fanFvPatchField(), Field< Type >::Field(), fieldAverageItem::fieldAverageItem(), FreeStream< CloudType >::FreeStream(), fvMotionSolverEngineMesh::fvMotionSolverEngineMesh(), lduMatrix::smoother::getName(), lduMatrix::preconditioner::getName(), globalMeshData::globalMeshData(), Foam::MULES::implicitSolve(), absorptionCoeffs::initialise(), faceSource::initialise(), cellSource::initialise(), JobInfo::JobInfo(), laminarFlameSpeed::laminarFlameSpeed(), layeredEngineMesh::layeredEngineMesh(), layerParameters::layerParameters(), liquidMixture::liquidMixture(), PstreamImpl::loadPstreamInstance(), PstreamImpl::loadPstreamLibrary(), multiDirRefinement::multiDirRefinement(), multivariateSelectionScheme< Type >::multivariateSelectionScheme(), LESfilter::New(), LESdelta::New(), incompressible::turbulenceModel::New(), turbulenceModel::New(), incompressible::RASModel::New(), RASModel::New(), incompressible::LESModel::New(), LESModel::New(), viscosityModel::New(), hsReactionThermo::New(), hReactionThermo::New(), hsCombustionThermo::New(), hhuCombustionThermo::New(), hCombustionThermo::New(), scatterModel::New(), absorptionEmissionModel::New(), radiationModel::New(), pdf::New(), laminarFlameSpeed::New(), rhoChemistryModel::New(), psiChemistryModel::New(), basicRhoThermo::New(), basicPsiThermo::New(), barotropicCompressibilityModel::New(), sampledSurface::New(), sampledSet::New(), sixDoFRigidBodyMotionRestraint::New(), sixDoFRigidBodyMotionConstraint::New(), pointZone::New(), faceZone::New(), cellZone::New(), polyPatch::New(), GAMGAgglomeration::New(), lduMatrix::solver::New(), lduMatrix::smoother::New(), lduMatrix::preconditioner::New(), pointPatchField< Type >::New(), functionObject::New(), tetherPotential::New(), pairPotential::New(), energyScalingFunction::New(), HeatTransferModel< CloudType >::New(), SurfaceReactionModel< CloudType >::New(), DevolatilisationModel< CloudType >::New(), PhaseChangeModel< CloudType >::New(), CompositionModel< CloudType >::New(), PostProcessingModel< CloudType >::New(), PatchInteractionModel< CloudType >::New(), InjectionModel< CloudType >::New(), DragModel< CloudType >::New(), DispersionModel< CloudType >::New(), DataEntry< Type >::New(), IntegrationScheme< Type >::New(), WallInteractionModel< CloudType >::New(), InflowBoundaryModel< CloudType >::New(), BinaryCollisionModel< CloudType >::New(), wallModel::New(), injectorModel::New(), heatTransferModel::New(), evaporationModel::New(), dragModel::New(), dispersionModel::New(), collisionModel::New(), breakupModel::New(), atomizationModel::New(), injectorType::New(), interpolation< Type >::New(), fvsPatchField< Type >::New(), fvPatchField< Type >::New(), SRFModel::New(), basicSource::New(), engineMesh::New(), polyMeshModifier::New(), motionSolver::New(), solidBodyMotionFunction::New(), dynamicFvMesh::New(), decompositionMethod::New(), combustionModel::New(), hsReactionThermo::NewType(), hReactionThermo::NewType(), hsCombustionThermo::NewType(), hCombustionThermo::NewType(), dlLibraryTable::open(), coordinateRotation::operator=(), Foam::operator>>(), phaseProperties::phaseProperties(), plane::plane(), Foam::preservePatchTypes(), pressureGradientExplicitSource::pressureGradientExplicitSource(), Foam::PstreamConfigSectionName(), laplaceFilter::read(), anisotropicFilter::read(), smoothDelta::read(), maxhxhyhzDelta::read(), maxDeltaxyz::read(), cubeRootVolDelta::read(), IDDESDelta::read(), powerLaw::read(), HerschelBulkley::read(), CrossPowerLaw::read(), BirdCarreau::read(), veryInhomogeneousMixture< ThermoType >::read(), multiComponentMixture< ThermoType >::read(), inhomogeneousMixture< ThermoType >::read(), homogeneousMixture< ThermoType >::read(), egrMixture< ThermoType >::read(), dieselMixture< ThermoType >::read(), pureMixture< ThermoType >::read(), sampledSurfaces::read(), probes::read(), patchProbes::read(), staticPressure::read(), writeRegisteredObject::read(), partialWrite::read(), sixDoFRigidBodyMotionConstraint::read(), forces::read(), forceCoeffs::read(), surfaceInterpolateFields::read(), readFields::read(), fieldValue::read(), fieldMinMax::read(), fieldAverage::read(), tolerances::read(), outputFilterOutputControl::read(), restrainedHarmonicSpring::read(), pitchForkRing::read(), harmonicSpring::read(), maitlandSmith::read(), lennardJones::read(), exponentialRepulsion::read(), dampedCoulomb::read(), azizChen::read(), sigmoid::read(), doubleSigmoid::read(), fvSchemes::read(), basicSource::read(), Time::readDict(), dynamicRefineFvMesh::readDict(), DimensionedField< Type, GeoMesh >::readField(), IOobject::readHeader(), ensightPart::reconstruct(), refinementParameters::refinementParameters(), refinementSurfaces::refinementSurfaces(), tolerances::relaxationFactor(), boundaryRegion::rename(), sampledCuttingPlane::sampledCuttingPlane(), sampledIsoSurface::sampledIsoSurface(), motionSmoother::scaleMesh(), searchableSurfaceCollection::searchableSurfaceCollection(), searchableSurfaces::searchableSurfaces(), searchableSurfaceWithGaps::searchableSurfaceWithGaps(), TimeActivatedExplicitSource< Type >::setFieldData(), Foam::setRefCell(), reducedUnits::setRefValues(), TimeActivatedExplicitSource< Type >::setSelection(), basicSource::setSelection(), shellSurfaces::shellSurfaces(), sixDoFRigidBodyDisplacementPointPatchVectorField::sixDoFRigidBodyDisplacementPointPatchVectorField(), slidingInterface::slidingInterface(), solidMixture::solidMixture(), tolerances::solverRelativeTolerance(), tolerances::solverTolerance(), STARCDCoordinateRotation::STARCDCoordinateRotation(), surfaceFeatures::surfaceFeatures(), surfacePatchIOList::surfacePatchIOList(), surfZoneIOList::surfZoneIOList(), TimeActivatedExplicitSource< Type >::TimeActivatedExplicitSource(), timeVaryingMappedFixedValueFvPatchField< Type >::timeVaryingMappedFixedValueFvPatchField(), UniformDimensionedField< Type >::UniformDimensionedField(), dynamicRefineFvMesh::update(), and wideBandAbsorptionEmission::wideBandAbsorptionEmission().
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 entry::stream().
Referenced by argList::argList(), EulerCoordinateRotation::EulerCoordinateRotation(), dimensioned< Type >::lookupOrDefault(), tableReader< Type >::New(), Foam::operator>>(), sampledSurfaces::read(), sixDoFRigidBodyMotionConstraint::read(), forces::read(), fieldValue::read(), fieldMinMax::read(), smoothSolver::readControls(), lduMatrix::solver::readControls(), slidingInterface::setTolerances(), STARCDCoordinateRotation::STARCDCoordinateRotation(), incompressible::turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs(), turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs(), incompressible::turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs(), and turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs().
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 55 of file dictionaryTemplates.C.
References add(), and entry::stream().
Referenced by Foam::debug::debugSwitch(), Foam::debug::infoSwitch(), Switch::lookupOrAddToDict(), dimensioned< Type >::lookupOrAddToDict(), and Foam::debug::optimisationSwitch().
bool readIfPresent | ( | const word & | k, |
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 78 of file dictionaryTemplates.C.
References entry::stream().
Referenced by advectiveFvPatchField< Type >::advectiveFvPatchField(), cyclicPolyPatch::cyclicPolyPatch(), parMetisDecomp::decompose(), IDDESDelta::IDDESDelta(), layerParameters::layerParameters(), chemistryReader< ThermoType >::New(), polyPatch::New(), coordinateSystem::New(), coordinateRotation::New(), coordinateSystem::operator=(), coordinateRotation::operator=(), patchIdentifier::patchIdentifier(), Foam::preservePatchTypes(), incompressible::RASModel::RASModel(), RASModel::RASModel(), PrandtlDelta::read(), vanDriestDelta::read(), staticPressure::read(), systemCall::read(), forces::read(), fieldAverage::read(), solution::read(), actuationDiskSource::read(), Time::readDict(), IOobject::readHeader(), Switch::readIfPresent(), dimensioned< Type >::readIfPresent(), ensightPart::reconstruct(), sampledPlane::sampledPlane(), sampledSurface::sampledSurface(), searchableSurfaces::searchableSurfaces(), Time::setControls(), Time::setTime(), surfZoneIdentifier::surfZoneIdentifier(), surfZoneIOList::surfZoneIOList(), and triSurfaceMesh::triSurfaceMesh().
bool isDict | ( | const word & | keyword ) | const |
Check if entry is a sub-dictionary.
Definition at line 415 of file dictionary.C.
References entry::isDict().
Referenced by searchableSurfaceCollection::searchableSurfaceCollection(), and searchableSurfaces::searchableSurfaces().
const Foam::dictionary * subDictPtr | ( | const word & | keyword ) | const |
Find and return a sub-dictionary pointer if present.
otherwise return NULL.
Definition at line 431 of file dictionary.C.
References entry::dict().
Referenced by liquidMixture::liquidMixture(), porousZone::porousZone(), and porousZone::writeDict().
const Foam::dictionary & subDict | ( | const word & | keyword ) | const |
Find and return a sub-dictionary.
Definition at line 446 of file dictionary.C.
References entry::dict(), Foam::exit(), Foam::FatalIOError, FatalIOErrorIn, and Foam::name().
Referenced by sixDoFRigidBodyMotion::addConstraints(), autoLayerDriver::addLayers(), sixDoFRigidBodyMotion::addRestraints(), parMetisDecomp::decompose(), directions::directions(), argList::displayDoc(), fvMeshDistribute::distribute(), autoHexMeshDriver::doMesh(), greyMeanAbsorptionEmission::greyMeanAbsorptionEmission(), IDDESDelta::IDDESDelta(), layerParameters::layerParameters(), PstreamImpl::loadPstreamInstance(), PstreamImpl::loadPstreamLibrary(), coordinateSystem::operator=(), coordinateRotation::operator=(), plane::plane(), Foam::preservePatchTypes(), Foam::PstreamConfigSectionName(), laplaceFilter::read(), anisotropicFilter::read(), smoothDelta::read(), PrandtlDelta::read(), maxhxhyhzDelta::read(), maxDeltaxyz::read(), cubeRootVolDelta::read(), IDDESDelta::read(), vanDriestDelta::read(), powerLaw::read(), HerschelBulkley::read(), CrossPowerLaw::read(), BirdCarreau::read(), twoPhaseMixture::read(), sixDoFRigidBodyMotionRestraint::read(), sixDoFRigidBodyMotionConstraint::read(), tolerances::read(), solution::read(), restrainedHarmonicSpring::read(), pitchForkRing::read(), harmonicSpring::read(), maitlandSmith::read(), lennardJones::read(), exponentialRepulsion::read(), dampedCoulomb::read(), azizChen::read(), sigmoid::read(), doubleSigmoid::read(), fvSchemes::read(), explicitSource::read(), basicSource::read(), actuationDiskSource::read(), solidBodyMotionFunction::read(), combustionModel::read(), fieldAverage::readAveragingProperties(), dynamicRefineFvMesh::readDict(), refinementSurfaces::refinementSurfaces(), searchableSurfaceCollection::searchableSurfaceCollection(), searchableSurfaces::searchableSurfaces(), shellSurfaces::shellSurfaces(), dynamicRefineFvMesh::update(), wideBandAbsorptionEmission::wideBandAbsorptionEmission(), and fieldAverage::writeAveragingProperties().
Foam::dictionary & subDict | ( | const word & | keyword ) |
Find and return a sub-dictionary for manipulation.
Definition at line 464 of file dictionary.C.
References entry::dict(), Foam::exit(), Foam::FatalIOError, FatalIOErrorIn, and Foam::name().
Foam::dictionary subOrEmptyDict | ( | const word & | keyword ) | 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 483 of file dictionary.C.
References entry::dict(), and Foam::name().
Foam::wordList toc | ( | ) | const |
Return the table of contents.
Definition at line 500 of file dictionary.C.
References forAllConstIter.
Referenced by removeEntry::execute(), FreeStream< CloudType >::FreeStream(), and explicitSource::setFieldData().
Foam::List< Foam::keyType > keys | ( | bool | patterns = false
) |
const |
Return the list of available keys or patterns.
Definition at line 514 of file dictionary.C.
References forAllConstIter, and List< T >::setSize().
Referenced by layerParameters::layerParameters().
bool substituteKeyword | ( | const word & | keyword ) |
Substitute the given keyword prepended by '$' with the.
corresponding sub-dictionary entries
Definition at line 69 of file dictionaryIO.C.
References add(), and forAllConstIter.
Referenced by entry::New().
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 532 of file dictionary.C.
References DLListBase::append(), entry::dict(), HashTable< T, Key, Hash >::end(), Foam::endl(), HashTable< T, Key, Hash >::find(), IOWarningIn, entry::isDict(), keyType::isPattern(), entry::keyword(), Foam::name(), entry::name(), UILList< DLListBase, T >::remove(), and DLListBase::replace().
Referenced by IOerror::abort(), error::abort(), dictionary::add(), argList::argList(), autoHexMeshDriver::autoHexMeshDriver(), coordinateSystem::dict(), Foam::dimensionedConstant(), IOerror::exit(), error::exit(), entry::New(), error::operator dictionary(), cellTable::operator=(), Foam::preservePatchTypes(), fvSchemes::read(), ICCG::solverDict(), BICCG::solverDict(), sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), solution::upgradeSolverDict(), globalMeshData::write(), fieldAverage::writeAveragingProperties(), surfaceFeatures::writeDict(), and Time::writeObject().
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 613 of file dictionary.C.
References add(), and entry::clone().
Add a word entry.
optionally overwrite an existing entry
Definition at line 619 of file dictionary.C.
References add().
Add a string entry.
optionally overwrite an existing entry
Definition at line 626 of file dictionary.C.
References add().
void add | ( | const keyType & | k, |
const label | l, | ||
bool | overwrite = false
|
||
) |
Add a label entry.
optionally overwrite an existing entry
Definition at line 636 of file dictionary.C.
References add().
void add | ( | const keyType & | k, |
const scalar | s, | ||
bool | overwrite = false
|
||
) |
Add a scalar entry.
optionally overwrite an existing entry
Definition at line 642 of file dictionary.C.
References add().
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 649 of file dictionary.C.
References add().
void add | ( | const keyType & | k, |
const T & | t, | ||
bool | overwrite = false
|
||
) |
Add a T entry.
optionally overwrite an existing entry
Definition at line 100 of file dictionaryTemplates.C.
References dictionary::add().
void set | ( | entry * | entryPtr ) |
Assign a new entry, overwrite any existing entry.
Definition at line 659 of file dictionary.C.
References add(), dictionary::clear(), entry::dict(), entry::isDict(), and entry::keyword().
Referenced by liquidMixture::liquidMixture(), boundaryRegion::rename(), and solution::upgradeSolverDict().
void set | ( | const entry & | e ) |
Assign a new entry, overwrite any existing entry.
Definition at line 672 of file dictionary.C.
References entry::clone().
void set | ( | const keyType & | k, |
const dictionary & | d | ||
) |
Assign a dictionary entry, overwrite any existing entry.
Definition at line 678 of file dictionary.C.
void set | ( | const keyType & | k, |
const T & | t | ||
) |
Assign a T entry, overwrite any existing entry.
Definition at line 107 of file dictionaryTemplates.C.
bool remove | ( | const word & | Keyword ) |
Remove an entry specified by keyword.
Definition at line 684 of file dictionary.C.
References DLListBase::begin(), HashTable< T, Key, Hash >::end(), HashTable< T, Key, Hash >::find(), and UILList< DLListBase, T >::remove().
Referenced by autoHexMeshDriver::autoHexMeshDriver(), and removeEntry::execute().
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 717 of file dictionary.C.
References DLListBase::begin(), HashTable< T, Key, Hash >::end(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, HashTable< T, Key, Hash >::find(), keyType::isPattern(), Foam::name(), DLListBase::replace(), and WarningIn.
bool merge | ( | const dictionary & | dict ) |
Merge entries from the given dictionary.
Also merge sub-dictionaries as required.
Definition at line 808 of file dictionary.C.
References Foam::abort(), add(), HashTable< T, Key, Hash >::end(), Foam::FatalError, FatalErrorIn, HashTable< T, Key, Hash >::find(), forAllConstIter, and Foam::name().
void clear | ( | ) |
Clear the dictionary.
Reimplemented from ILList< DLListBase, entry >.
Definition at line 853 of file dictionary.C.
References ILList< DLListBase, T >::clear().
Referenced by dictionary::dictionary(), entry::New(), Foam::operator>>(), and dictionary::set().
void transfer | ( | dictionary & | dict ) |
Transfer the contents of the argument and annul the argument.
Definition at line 862 of file dictionary.C.
References dictionaryName::name(), Foam::name(), and ILList< DLListBase, T >::transfer().
Foam::Xfer< Foam::dictionary > xfer | ( | ) |
Transfer contents to the Xfer container.
Definition at line 875 of file dictionary.C.
References Foam::xferMove().
bool read | ( | Istream & | is ) |
Read dictionary from Istream.
Definition at line 33 of file dictionaryIO.C.
References IOstream::bad(), token::BEGIN_BLOCK, Foam::endl(), IOstream::eof(), Foam::exit(), Foam::FatalIOError, FatalIOErrorIn, IOstream::good(), Foam::Info, dictionaryName::name(), dictionary::New(), and Istream::putBack().
Referenced by dictionary::dictionary(), includeIfPresentEntry::execute(), includeEntry::execute(), Foam::operator>>(), vanDriestDelta::read(), OutputFilterFunctionObject< OutputFilter >::read(), and shellSurfaces::shellSurfaces().
void write | ( | Ostream & | os, |
bool | subDict = true
|
||
) | const |
Definition at line 144 of file dictionaryIO.C.
References token::BEGIN_BLOCK, Foam::decrIndent(), e, token::END_BLOCK, Foam::endl(), forAllConstIter, IOstream::good(), Foam::incrIndent(), Foam::indent(), Foam::name(), Foam::nl, dictionary::null, and WarningIn.
Referenced by Foam::operator<<(), IOdictionary::writeData(), fieldDictionary::writeData(), and surfaceFeatures::writeDict().
Foam::ITstream & operator[] | ( | const word & | keyword ) | const |
Find and return entry.
Definition at line 883 of file dictionary.C.
void operator= | ( | const dictionary & | rhs ) |
Definition at line 889 of file dictionary.C.
References Foam::abort(), add(), clear(), Foam::FatalError, FatalErrorIn, forAllConstIter, dictionaryName::name(), and Foam::name().
Referenced by IOdictionary::operator=().
void operator+= | ( | const dictionary & | rhs ) |
Include entries from the given dictionary.
Warn, but do not overwrite existing entries.
Definition at line 912 of file dictionary.C.
References Foam::abort(), add(), Foam::FatalError, FatalErrorIn, forAllConstIter, and Foam::name().
void operator|= | ( | const dictionary & | rhs ) |
Conditionally include entries from the given dictionary.
Do not overwrite existing entries.
Definition at line 929 of file dictionary.C.
References Foam::abort(), add(), Foam::FatalError, FatalErrorIn, forAllConstIter, and Foam::name().
void operator<<= | ( | const dictionary & | rhs ) |
Unconditionally include entries from the given dictionary.
Overwrite existing entries.
Definition at line 949 of file dictionary.C.
References Foam::abort(), Foam::FatalError, FatalErrorIn, forAllConstIter, and Foam::name().
friend class entry [friend]
|
Declare friendship with the entry class for IO.
Definition at line 166 of file dictionary.H.
Istream& operator>> | ( | Istream & | , |
dictionary & | |||
) | [friend]
|
Read dictionary from Istream.
Ostream& operator<< | ( | Ostream & | , |
const dictionary & | |||
) | [friend]
|
Write dictionary to Ostream.
const Foam::dictionary null [static]
|
Null dictionary.
Definition at line 174 of file dictionary.H.
Referenced by cellModel::cellModel(), entry::clone(), primitiveEntry::dict(), fieldAverageItem::fieldAverageItem(), dictionary::found(), dictionary::lookupEntryPtr(), entry::New(), phase::iNew::operator()(), Foam::operator>>(), phaseProperties::phaseProperties(), pressureGradientExplicitSource::pressureGradientExplicitSource(), primitiveEntry::primitiveEntry(), and dictionary::write().