Salome HOME
Initial implementation of support of any level of hierarchy in Result Bodies.
[modules/shaper.git] / src / Model / Model_Objects.h
index d6f3d383f741867d3258b2947d2011fa034f2052..0991cf21077dba0fe2b3bcc38a0caafd91f4ebbf 100644 (file)
@@ -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<ModelAPI_Object> parent(const std::shared_ptr<ModelAPI_Object> theChild);
+
   //! Returns all (and disabled) results of the given type.
   //! Not fast method (iterates all features).
   void allResults(const std::string& theGroupID, std::list<ResultPtr>& theResults);