used to check the existence of and open an object file, read and check the header without constructing the object. 'typeIOobject' operates in an equivalent and consistent manner to 'regIOobject' but the type information is provided by the template argument rather than via virtual functions for which the derived object would need to be constructed, which is the case for 'regIOobject'. 'typeIOobject' replaces the previous separate functions 'typeHeaderOk' and 'typeFilePath' with a single consistent interface.
22 lines
473 B
C++
22 lines
473 B
C++
// ignore special fields or fields that we don't handle
|
|
//
|
|
bool variableGood = true;
|
|
for (label n1=0; n1<Times.size() && variableGood; ++n1)
|
|
{
|
|
// ignore _0 fields
|
|
if (fieldName.size() > 2 && fieldName(fieldName.size() - 2, 2) == "_0")
|
|
{
|
|
variableGood = false;
|
|
}
|
|
else
|
|
{
|
|
variableGood = IOobject
|
|
(
|
|
fieldName,
|
|
Times[n1].name(),
|
|
mesh,
|
|
IOobject::NO_READ
|
|
).headerOk();
|
|
}
|
|
}
|