Salome HOME
Implementation of Groups support by the SHAPER-STUDY module
[modules/shaper_study.git] / idl / SHAPERSTUDY_Gen.idl
index 7705f3964c6b4a81f51fe9d74fa9de97038e3349..3b6cf883a1399abc93e290eefa5deb9845190cfd 100644 (file)
@@ -30,7 +30,7 @@
 module SHAPERSTUDY_ORB
 {
 
-interface SHAPER_Object     : GEOM::GEOM_Object
+interface SHAPER_Object : GEOM::GEOM_Object
 {
   /*!
   *  \brief Puts the shape to the object by BRep stream.
@@ -40,14 +40,67 @@ interface SHAPER_Object     : GEOM::GEOM_Object
   *  \brief Sets the internal entry of the object, common for all objects in SHAPER-STUDY
   */
   void SetEntry( in string theInternalEntry );
+  /*!
+  *  \brief Sets SObject of this object (when it is published)
+  */
+  void SetSO( in SALOMEDS::SObject theInternalEntry );
+  /*!
+  *  \brief Returns SObject of this object
+  */
+  SALOMEDS::SObject GetSO();
+  /*!
+  *  \brief Returns true if shape is already dead
+  */
+  boolean IsDead();
+  /*!
+  *  \brief Makes the dead-copy of the shape and returns it
+  */
+  SHAPER_Object MakeDead();
+  /*!
+  *  \brief Returns the stream of the previous version of the shape stored here
+  */
+  SALOMEDS::TMPFile GetOldShapeStream();
+  /*!
+  *  \brief Sets internal type of operation created this object. For group it is 37, shape 1.
+  */
+  void SetType( in long theType );
+
+  /*!
+  *  \brief Sets the shape by the pointer to the TopoDS_Shape
+  */
+  void SetShapeByPointer(in long long theShape);
+};
+
+/*!
+ * A group extension of the SHAPER object:
+ * it contains the selection-type and selected sub-shapes indices.
+ */
+interface SHAPER_Group : SHAPER_Object
+{
+  /*!
+  *  \brief Sets what is returned in the GEOM_IGroupOperations::GetType
+  */
+  void SetSelectionType(in long theType);
+  /*!
+  *  \brief Returns the type of the selected sub-shapes
+  */
+  long GetSelectionType();
+  /*!
+  *  \brief Sets what is returned in the GEOM_IGroupOperations::GetObjects
+  */
+  void SetSelection(in GEOM::ListOfLong theSelection);
+  /*!
+  *  \brief Returns the selected sub-shapes indices
+  */
+  GEOM::ListOfLong GetSelection();
 };
 
 interface Gen : GEOM::GEOM_Gen
 {
   /*!
-   *  \brief Creates a SHAPERSTUDY_Object to interact with SHAPER
+   *  \brief Searches existing or creates a new SHAPERSTUDY_Object to interact with SHAPER
    */
-  SHAPER_Object CreateShape(in string theInternalEntry);
+  SHAPER_Object FindOrCreateShape(in string theInternalEntry);
 };
 
 interface IShapesOperations : GEOM::GEOM_IShapesOperations
@@ -56,6 +109,10 @@ interface IShapesOperations : GEOM::GEOM_IShapesOperations
 
 interface IGroupOperations  : GEOM::GEOM_IGroupOperations
 {
+  /*!
+  *  \brief Searches existing group of theOwner shape by the entry. Returns NULL if can not find.
+  */
+  SHAPER_Group FindGroup(in SHAPER_Object theOwner, in string theEntry);
 };
 
 interface IFieldOperations  : GEOM::GEOM_IFieldOperations