X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_Objects.h;h=0991cf21077dba0fe2b3bcc38a0caafd91f4ebbf;hb=b0196aeefbaa53754b1052fab904386707caad87;hp=856d3c90b12f87cb96a40e91ada6c4dec8ac0327;hpb=e3fa38d82c331df1c34de068d74dacc76a630687;p=modules%2Fshaper.git diff --git a/src/Model/Model_Objects.h b/src/Model/Model_Objects.h index 856d3c90b..0991cf210 100644 --- a/src/Model/Model_Objects.h +++ b/src/Model/Model_Objects.h @@ -109,6 +109,10 @@ class Model_Objects //! \param theAllowFolder take into account grouping feature by folders int size(const std::string& theGroupID, const bool theAllowFolder = false); + //! Returns the parent object of this child. This may be result or feature, parent of a + //! top result. Fast method, that uses internal data structure specifics. + std::shared_ptr parent(const std::shared_ptr theChild); + //! Returns all (and disabled) results of the given type. //! Not fast method (iterates all features). void allResults(const std::string& theGroupID, std::list& theResults); @@ -292,7 +296,7 @@ class Model_Objects std::string& theParentName) const; /// Return object representing a folder or empty pointer - ObjectPtr folder(TDF_Label theLabel) const; + const ObjectPtr& folder(TDF_Label theLabel) const; private: TDF_Label myMain; ///< main label of the data storage