Files
openfoam/applications/test
Mark Olesen b81420e524 ENH: additional variants of IOobjectList findObject()
- cfindObject() for const pointer access.

- getObject() for mutable non-const pointer access, similar to the
     objectRegistry::getObjectPtr()

- cfindObject(), findObject(), getObject() with template type access
  to also check the headerClassName.

  For example,

      cfindObject("U")  ->  good
      cfindObject<volVectorField>("U") -> good
      cfindObject<volScalarField>("U") -> nullptr

  This allows inversion of looping logic.

    1) Obtain the names for a particular Type

       for (const word& objName : objs.sortedNames<Type>())
       {
           const IOobject* io = objs[objName];
           ...
       }

    2) Use previously obtained names and apply to a particular Type

       for (const word& objName : someListOfNames)
       {
           const IOobject* io = objs.cfindObject<Type>(objName);
           if (io)
           {
               ...
           }
       }
2018-11-28 11:28:38 +01:00
..
2018-10-18 12:57:32 +02:00
2018-11-12 13:59:38 +01:00
2018-10-29 09:44:31 +00:00
2018-11-12 13:59:38 +01:00
2017-05-17 10:18:14 +02:00
2013-09-27 22:47:59 +01:00