Salome HOME
Fix: Bug PAL7970 Broken control Lengh2D after Free Borders
[modules/smesh.git] / idl / SMESH_Group.idl
1 //  Copyright (C) 2004  CEA 
2 // 
3 //  This library is free software; you can redistribute it and/or 
4 //  modify it under the terms of the GNU Lesser General Public 
5 //  License as published by the Free Software Foundation; either 
6 //  version 2.1 of the License. 
7 // 
8 //  This library is distributed in the hope that it will be useful, 
9 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
10 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
11 //  Lesser General Public License for more details. 
12 // 
13 //  You should have received a copy of the GNU Lesser General Public 
14 //  License along with this library; if not, write to the Free Software 
15 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
16 // 
17 //  See http://www.salome-platform.org or email : webmaster.salome@opencascade.org 
18 //
19 //
20 //
21 //  File   : SMESH_Group.idl
22 //  Author : Sergey ANIKIN, OCC
23 //  $Header$
24
25
26 #ifndef _SMESH_GROUP_IDL_
27 #define _SMESH_GROUP_IDL_
28
29 #include "SALOME_Exception.idl"
30 #include "SALOME_GenericObj.idl"
31
32 #include "SMESH_Mesh.idl"
33
34 module SMESH
35 {
36   /*!
37    * SMESH_Group: base interface of group object
38    */
39   interface SMESH_GroupBase : SALOME::GenericObj, SMESH_IDSource
40   {
41     /*!
42      * Sets group name
43      */
44     void SetName( in string name );
45
46     /*!
47      * Returns group name
48      */
49     string GetName();
50
51     /*!
52      * Returns group type (type of elements in the group)
53      */
54     ElementType GetType();
55
56     /*!
57      * Returns the number of elements in the group
58      */
59     long Size();
60
61     /*!
62      * Returns true if the group does not contain any elements
63      */
64     boolean IsEmpty();
65
66     /*!
67      * returns true if the group contains an element with ID == <elem_id> 
68      */
69     boolean Contains( in long elem_id );
70
71     /*!
72      * Returns ID of an element at position <elem_index>
73      */
74     long GetID( in long elem_index );
75
76     /*!
77      * Returns a sequence of all element IDs in the group
78      */
79     long_array GetListOfID();
80
81     /*!
82      * Returns the mesh object this group belongs to
83      */
84     SMESH_Mesh GetMesh();
85   }; 
86
87   /*!
88    * SMESH_Group: interface of group object
89    */
90   interface SMESH_Group : SMESH_GroupBase
91   {
92     /*!
93      * Clears the group's contents
94      */
95     void Clear();
96
97     /*!
98      * Adds elements to the group
99      */
100     long Add( in long_array elem_ids );
101
102     /*!
103      * Removes elements from the group
104      */
105     long Remove( in long_array elem_ids );
106
107   };
108   /*!
109    * SMESH_Group: interface of group object linked to geometry
110    */
111   interface SMESH_GroupOnGeom : SMESH_GroupBase
112   {
113     GEOM::GEOM_Object GetShape();
114   };
115
116 };
117
118
119 #endif