Salome HOME
Color Number (Color Group) parameter is returned for compatibility
[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.com
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 #include "SALOMEDS_Attributes.idl"
32
33 #include "SMESH_Mesh.idl"
34
35 module SMESH
36 {
37   interface Predicate;
38
39   /*!
40    * SMESH_Group: base interface of group object
41    */
42   interface SMESH_GroupBase : SALOME::GenericObj, SMESH_IDSource
43   {
44     /*!
45      * Sets group name
46      */
47     void SetName( in string name );
48
49     /*!
50      * Returns group name
51      */
52     string GetName();
53
54     /*!
55      * Returns group type (type of elements in the group)
56      */
57     ElementType GetType();
58
59     /*!
60      * Returns the number of elements in the group
61      */
62     long Size();
63
64     /*!
65      * Returns true if the group does not contain any elements
66      */
67     boolean IsEmpty();
68
69     /*!
70      * returns true if the group contains an element with ID == <elem_id> 
71      */
72     boolean Contains( in long elem_id );
73
74     /*!
75      * Returns ID of an element at position <elem_index>
76      */
77     long GetID( in long elem_index );
78
79     /*!
80      * Returns a sequence of all element IDs in the group
81      */
82     long_array GetListOfID();
83
84     /*!
85      * Returns the mesh object this group belongs to
86      */
87     SMESH_Mesh GetMesh();
88
89     /*!
90      * Sets group color
91      */
92     void SetColor(in SALOMEDS::Color theColor);
93
94     /*!
95      * Returns group color
96      */
97     SALOMEDS::Color GetColor();
98
99     /*!
100      * Sets group color number
101      * (corresponds to the "hue" parameter of the color - must be in range [0, 360])
102      */
103     void SetColorNumber( in long color );
104
105     /*!
106      * Returns group color number (obsolete - use GetColor instead)
107      * (corresponds to the "hue" parameter of the color - must be in range [0, 360])
108      */
109     long GetColorNumber();
110   }; 
111
112   /*!
113    * SMESH_Group: interface of group object
114    */
115   interface SMESH_Group : SMESH_GroupBase
116   {
117     /*!
118      * Clears the group's contents
119      */
120     void Clear();
121
122     /*!
123      * Adds elements to the group
124      */
125     long Add( in long_array elem_ids );
126     long AddByPredicate( in Predicate thePredicate );
127
128     /*!
129      * Removes elements from the group
130      */
131     long Remove( in long_array elem_ids );
132     long RemoveByPredicate( in Predicate thePredicate );
133
134   };
135   /*!
136    * SMESH_Group: interface of group object linked to geometry
137    */
138   interface SMESH_GroupOnGeom : SMESH_GroupBase
139   {
140     GEOM::GEOM_Object GetShape();
141   };
142
143 };
144
145
146 #endif