Salome HOME
This commit was generated by cvs2git to create branch 'IMPORT'.
[modules/smesh.git] / src / SMDS / SMDS_MeshGroup.cdl
1 -- File:        SMDS_MeshGroup.cdl
2 -- Created:     Mon Jun  3 11:49:08 2002
3 -- Author:      Jean-Michel BOULCOURT
4 --              <jmb@localhost.localdomain>
5 ---Copyright:    Matra Datavision 2002
6
7
8 class MeshGroup from SMDS inherits MeshObject from SMDS
9
10         ---Purpose: 
11
12 uses
13     Mesh from SMDS,
14     MeshElement from SMDS,
15     ElementType from SMDSAbs,
16     ListOfMeshGroup from SMDS,
17     MapOfMeshElement from SMDS
18
19 raises
20
21     NoSuchObject from Standard,
22     TypeMismatch from Standard
23
24 is
25
26     ---=====================================
27     ---Category: public API methods
28     --           Group creation and deletion
29     --======================================
30
31     Create(aMesh: Mesh from SMDS) returns MeshGroup from SMDS;
32     ---Purpose: constructor
33         
34     AddSubGroup(me: mutable) returns MeshGroup from SMDS;
35     ---Purpose:  create a  sub  group.  
36     --          uses  a private constructor to create an instance of the
37     --          subgroup and attahc it the parent group.
38     
39     RemoveSubGroup(me: mutable; aGroup: MeshGroup from SMDS)
40     returns Boolean
41     ---Purpose: remove aGroup from the list of Children
42     --          if the subgroup does not belong to this, it returns False
43     --          (True otherwise)
44     is virtual;
45     
46     RemoveFromParent(me: mutable)
47     returns Boolean
48     ---Purpose: remove this from its parent
49     --          if this has no parent then it returns False (True otherwise)
50     is virtual;
51     
52
53
54     ---=====================================
55     ---Category: public API methods
56     --           Group contents edition
57     --======================================
58
59     Clear(me: mutable);
60     ---Purpose: clear the group
61     --          once the group is cleared, the type is set to All
62     --          but the referenced mesh remains.
63
64     Add(me: mutable; ME: MeshElement from SMDS)
65     raises TypeMismatch from Standard;
66     ---Purpose: add an element to the group
67
68     Remove(me: mutable; ME: MeshElement from SMDS)
69     raises NoSuchObject from Standard;
70     ---Purpose: remove an element from the group
71     --          raises if the element is not in the group
72
73     ---=====================================
74     ---Category: public API methods
75     --           Group contents exploration
76     --======================================
77
78     IsEmpty(me)
79     returns Boolean from Standard;
80     ---Purpose: check if the group is empty
81
82     Extent(me) returns Integer from Standard;
83     ---Purpose: return numner of elements in the group
84
85     Type(me) returns ElementType from SMDSAbs;
86     ---Purpose: return current element type
87     --          if the group is empty, returns All
88
89     Contains(me; ME : MeshElement from SMDS)
90     returns Boolean from Standard;
91     ---Purpose: check if the group contains the mesh element
92
93     Elements(me) returns MapOfMeshElement from SMDS;
94     ---Purpose: check if the group contains the mesh element
95     ---C++: return const &
96     ---C++: inline
97     
98     ---===========================================
99     ---Category: private or protected API methods
100     --           
101     --============================================
102
103     Create(parent: MeshGroup) returns mutable MeshGroup
104     ---Purpose: constructor used internally to create subgroup
105     --          
106     is private;
107     
108
109 fields
110     myMesh     : Mesh from SMDS;
111     myType     : ElementType from SMDSAbs;
112     myElements : MapOfMeshElement from SMDS;
113     myParent   : MeshGroup from SMDS;
114     myChildren : ListOfMeshGroup from SMDS;
115     
116 end MeshGroup;