diff --git a/src/OpenFOAM/db/objectRegistry/objectRegistry.C b/src/OpenFOAM/db/objectRegistry/objectRegistry.C index 1ada425950..1d8c2a8e4b 100644 --- a/src/OpenFOAM/db/objectRegistry/objectRegistry.C +++ b/src/OpenFOAM/db/objectRegistry/objectRegistry.C @@ -77,29 +77,6 @@ bool Foam::objectRegistry::parentNotTime() const } -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -const Foam::regIOobject* Foam::objectRegistry::cfindIOobject -( - const word& name, - const bool recursive -) const -{ - const_iterator iter = cfind(name); - - if (iter.found()) - { - return iter.val(); - } - else if (recursive && this->parentNotTime()) - { - return parent_.cfindIOobject(name, recursive); - } - - return nullptr; -} - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::objectRegistry::objectRegistry(const Time& t, const label nObjects) @@ -424,6 +401,27 @@ void Foam::objectRegistry::rename(const word& newName) } +const Foam::regIOobject* Foam::objectRegistry::cfindIOobject +( + const word& name, + const bool recursive +) const +{ + const_iterator iter = cfind(name); + + if (iter.found()) + { + return iter.val(); + } + else if (recursive && this->parentNotTime()) + { + return parent_.cfindIOobject(name, recursive); + } + + return nullptr; +} + + bool Foam::objectRegistry::found ( const word& name, diff --git a/src/OpenFOAM/db/objectRegistry/objectRegistry.H b/src/OpenFOAM/db/objectRegistry/objectRegistry.H index 578391a1d6..0d0be88524 100644 --- a/src/OpenFOAM/db/objectRegistry/objectRegistry.H +++ b/src/OpenFOAM/db/objectRegistry/objectRegistry.H @@ -138,20 +138,6 @@ class objectRegistry void operator=(const objectRegistry&) = delete; - // Protected Member Functions - - //- Return const pointer to the regIOobject. - // - // \param recursive search parent registries - // - // \return nullptr if the object was not found. - const regIOobject* cfindIOobject - ( - const word& name, - const bool recursive = false - ) const; - - public: //- Declare type name for this IOobject @@ -355,6 +341,16 @@ public: template HashTable lookupClass(const bool strict = false); + //- Return const pointer to the regIOobject. + // + // \param recursive search parent registries + // + // \return nullptr if the object was not found. + const regIOobject* cfindIOobject + ( + const word& name, + const bool recursive = false + ) const; //- Can the regIOobject object be found (by name). //