MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / readIfPresent

Function readIfPresent

applications/test/IOField/Test-IOField.C:104–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102
103
104void readIfPresent
105(
106 IOobject& io,
107 const label sz,
108 const word& readType
109)
110{
111 autoPtr<fileOperation> readHandler(fileOperation::New(readType));
112 fileHandler(readHandler);
113
114 // Read
115 Pout<< "Reading:" << fileHandler().filePath(io.objectPath()) << endl;
116 io.readOpt() = IOobject::READ_IF_PRESENT;
117 read(io, sz);
118}
119
120
121// Main program:

Callers

nothing calls this directly

Calls 6

fileHandlerFunction · 0.85
objectPathMethod · 0.80
readOptMethod · 0.80
readFunction · 0.70
NewFunction · 0.50
filePathMethod · 0.45

Tested by

no test coverage detected