Read construct from registry, or return previously registered
| 68 | |
| 69 | // Read construct from registry, or return previously registered |
| 70 | const Foam::coordinateSystems& Foam::coordinateSystems::New |
| 71 | ( |
| 72 | const objectRegistry& obr |
| 73 | ) |
| 74 | { |
| 75 | if (obr.foundObject<coordinateSystems>(typeName)) |
| 76 | { |
| 77 | return obr.lookupObject<coordinateSystems>(typeName); |
| 78 | } |
| 79 | else |
| 80 | { |
| 81 | return obr.store |
| 82 | ( |
| 83 | new coordinateSystems |
| 84 | ( |
| 85 | IOobject |
| 86 | ( |
| 87 | typeName, |
| 88 | obr.time().constant(), |
| 89 | obr, |
| 90 | IOobject::READ_IF_PRESENT, |
| 91 | IOobject::NO_WRITE |
| 92 | ) |
| 93 | ) |
| 94 | ); |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | |
| 99 | // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // |
no test coverage detected