COMP: rename dictionary::read<T> to dictionary::readEntry<T>

- avoids compiler ambiguity when virtual methods such as
  IOdictionary::read() exist.

- the method was introduced in 1806, and was thus not yet widely used
This commit is contained in:
Mark Olesen
2018-07-30 15:52:40 +02:00
parent 215570915e
commit f00c7a655c
49 changed files with 125 additions and 113 deletions

View File

@ -315,8 +315,8 @@ Foam::probes::probes
bool Foam::probes::read(const dictionary& dict)
{
dict.read("probeLocations", static_cast<pointField&>(*this));
dict.read("fields", fieldSelection_);
dict.readEntry("probeLocations", static_cast<pointField&>(*this));
dict.readEntry("fields", fieldSelection_);
dict.readIfPresent("fixedLocations", fixedLocations_);
if (dict.readIfPresent("interpolationScheme", interpolationScheme_))

View File

@ -226,11 +226,11 @@ bool Foam::sampledSets::read(const dictionary& dict)
if (dict_.found("sets"))
{
dict_.read("fields", fieldSelection_);
dict_.readEntry("fields", fieldSelection_);
clearFieldGroups();
dict.read("interpolationScheme", interpolationScheme_);
dict.read("setFormat", writeFormat_);
dict.readEntry("interpolationScheme", interpolationScheme_);
dict.readEntry("setFormat", writeFormat_);
PtrList<sampledSet> newList
(

View File

@ -493,7 +493,7 @@ Foam::sampledIsoSurface::sampledIsoSurface
if (zoneID_.index() != -1)
{
dict.read("exposedPatchName", exposedPatchName_);
dict.readEntry("exposedPatchName", exposedPatchName_);
if (mesh.boundaryMesh().findPatchID(exposedPatchName_) == -1)
{

View File

@ -312,7 +312,7 @@ Foam::sampledCuttingPlane::sampledCuttingPlane
{
if (zoneID_.index() != -1)
{
dict.read("exposedPatchName", exposedPatchName_);
dict.readEntry("exposedPatchName", exposedPatchName_);
if (mesh.boundaryMesh().findPatchID(exposedPatchName_) == -1)
{

View File

@ -259,9 +259,8 @@ bool Foam::sampledSurfaces::read(const dictionary& dict)
{
sampleFaceScheme_ = dict.lookupOrDefault<word>("sampleScheme", "cell");
dict.read("interpolationScheme", sampleNodeScheme_);
dict.read("fields", fieldSelection_);
dict.readEntry("interpolationScheme", sampleNodeScheme_);
dict.readEntry("fields", fieldSelection_);
const word writeType(dict.get<word>("surfaceFormat"));

View File

@ -159,7 +159,7 @@ void Foam::ensightSurfaceWriter::updateMesh
IFstream is(baseDir/"fieldsDict");
if (is.good() && dict.read(is))
{
dict.read(is);
// ... any futher actions
}
}

View File

@ -343,7 +343,7 @@ Foam::nastranSurfaceWriter::nastranSurfaceWriter(const dictionary& options)
}
List<Pair<word>> fieldPairs;
options.read("fields", fieldPairs);
options.readEntry("fields", fieldPairs);
for (const Pair<word>& item : fieldPairs)
{

View File

@ -348,7 +348,7 @@ bool Foam::surfMeshSamplers::read(const dictionary& dict)
{
sampleScheme_ = dict.lookupOrDefault<word>("sampleScheme", "cell");
dict.read("fields", fieldSelection_);
dict.readEntry("fields", fieldSelection_);
fieldSelection_.uniq();
Info<< type() << " fields: " << flatOutput(fieldSelection_) << nl;