Skip to content
  • Mark OLESEN's avatar
    ENH: reset headerClassName within typeHeaderOk · bdd384c7
    Mark OLESEN authored
    - ensures that read failures can be properly detected
    
    COMP: include refPtr.H instead of autoPtr.H in IOobject.H
    
    - ensures inclusion of autoPtr/refPtr/tmp/stdFoam
    
    ENH: add IOobject::resetHeader() method
    
    - when re-using an IOobject for repeated read operations it enforces
      resetting of headerClassName, scalar/label sizes etc prior to
      reading. Permits convenient resetting of the name too (optional).
    
      Example,
    
          IOobject rio("none", ..., IOobject::LAZY_READ);
    
          rio.resetHeader("U")
          if (returnReduceOr(rio.typeHeaderOk<volVectorField>(false)))
              ...
    
          io.resetHeader("p")
          if (returnReduceOr(rio.typeHeaderOk<volScalarField>(false)))
             ...
    bdd384c7