1 // SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
3 // Copyright (C) 2004 CEA
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License.
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // File : SMESH_Group_i.hxx
24 // Author : Sergey ANIKIN, OCC
29 #ifndef SMESH_Group_i_HeaderFile
30 #define SMESH_Group_i_HeaderFile
34 #include <SALOMEconfig.h>
35 #include CORBA_SERVER_HEADER(SMESH_Group)
36 #include CORBA_SERVER_HEADER(SMESH_Mesh)
37 #include CORBA_CLIENT_HEADER(GEOM_Gen)
39 #include "SALOME_GenericObj_i.hh"
43 class SMESHDS_GroupBase;
48 class SMESH_I_EXPORT SMESH_GroupBase_i:
49 public virtual POA_SMESH::SMESH_GroupBase,
50 public virtual SALOME::GenericObj_i
53 SMESH_GroupBase_i(PortableServer::POA_ptr thePOA,
54 SMESH_Mesh_i* theMeshServant,
55 const int theLocalID );
56 virtual ~SMESH_GroupBase_i();
58 // CORBA interface implementation
59 void SetName(const char* name);
61 SMESH::ElementType GetType();
63 CORBA::Boolean IsEmpty();
64 CORBA::Boolean Contains(CORBA::Long elem_id);
65 CORBA::Long GetID(CORBA::Long elem_index);
66 SMESH::long_array* GetListOfID();
67 SMESH::SMESH_Mesh_ptr GetMesh();
69 // Inherited from SMESH_IDSource interface
70 virtual SMESH::long_array* GetIDs();
72 // Internal C++ interface
73 int GetLocalID() const { return myLocalID; }
74 SMESH_Mesh_i* GetMeshServant() const { return myMeshServant; }
75 SMESH_Group* GetSmeshGroup() const;
76 SMESHDS_GroupBase* GetGroupDS() const;
78 void SetColor(const SALOMEDS::Color& color);
79 SALOMEDS::Color GetColor();
81 void SetColorNumber(CORBA::Long color);
82 CORBA::Long GetColorNumber();
85 SMESH_Mesh_i* myMeshServant;
93 class SMESH_I_EXPORT SMESH_Group_i:
94 public virtual POA_SMESH::SMESH_Group,
95 public SMESH_GroupBase_i
98 SMESH_Group_i( PortableServer::POA_ptr thePOA, SMESH_Mesh_i* theMeshServant, const int theLocalID );
100 // CORBA interface implementation
102 CORBA::Long Add( const SMESH::long_array& theIDs );
103 CORBA::Long Remove( const SMESH::long_array& theIDs );
105 CORBA::Long AddByPredicate( SMESH::Predicate_ptr thePredicate );
106 CORBA::Long RemoveByPredicate( SMESH::Predicate_ptr thePredicate );
109 // =========================
110 // Group linked to geometry
111 // =========================
113 class SMESH_I_EXPORT SMESH_GroupOnGeom_i:
114 public virtual POA_SMESH::SMESH_GroupOnGeom,
115 public SMESH_GroupBase_i
118 SMESH_GroupOnGeom_i( PortableServer::POA_ptr thePOA, SMESH_Mesh_i* theMeshServant, const int theLocalID );
120 // CORBA interface implementation
121 GEOM::GEOM_Object_ptr GetShape();