X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_Group_i.hxx;h=7e16691a6df8db23d2ae1013d1839b1ae001fa85;hb=910f46272cad5a23fa06e96795c778c78ef0e707;hp=2c7c1d36f6b021d62ca87248eed566409957681b;hpb=c3bf92bd87b770fd81631a3853f7f5bb1ac6a4e8;p=modules%2Fsmesh.git diff --git a/src/SMESH_I/SMESH_Group_i.hxx b/src/SMESH_I/SMESH_Group_i.hxx index 2c7c1d36f..7e16691a6 100644 --- a/src/SMESH_I/SMESH_Group_i.hxx +++ b/src/SMESH_I/SMESH_Group_i.hxx @@ -25,58 +25,90 @@ // Module : SMESH // $Header$ + #ifndef SMESH_Group_i_HeaderFile #define SMESH_Group_i_HeaderFile #include #include CORBA_SERVER_HEADER(SMESH_Group) #include CORBA_SERVER_HEADER(SMESH_Mesh) +#include CORBA_CLIENT_HEADER(GEOM_Gen) #include "SALOME_GenericObj_i.hh" class SMESH_Mesh_i; - -class SMESH_Group_i: - public virtual POA_SMESH::SMESH_Group, +class ::SMESH_Group; +class SMESHDS_GroupBase; + +// =========== +// Group Base +// =========== +class SMESH_GroupBase_i: + public virtual POA_SMESH::SMESH_GroupBase, public virtual SALOME::GenericObj_i { -public: - SMESH_Group_i( PortableServer::POA_ptr thePOA, SMESH_Mesh_i* theMeshServant, const int theLocalID ); - virtual ~SMESH_Group_i(); + public: + SMESH_GroupBase_i(PortableServer::POA_ptr thePOA, + SMESH_Mesh_i* theMeshServant, + const int theLocalID ); + virtual ~SMESH_GroupBase_i(); // CORBA interface implementation - void SetName( const char* theName ); - + void SetName(const char* name); char* GetName(); - SMESH::ElementType GetType(); - CORBA::Long Size(); - CORBA::Boolean IsEmpty(); + CORBA::Boolean Contains(CORBA::Long elem_id); + CORBA::Long GetID(CORBA::Long elem_index); + SMESH::long_array* GetListOfID(); + SMESH::SMESH_Mesh_ptr GetMesh(); - void Clear(); + // Inherited from SMESH_IDSource interface + virtual SMESH::long_array* GetIDs(); - CORBA::Boolean Contains( CORBA::Long theID ); + // Internal C++ interface + int GetLocalID() const { return myLocalID; } + SMESH_Mesh_i* GetMeshServant() const { return myMeshServant; } + ::SMESH_Group* GetSmeshGroup() const; + SMESHDS_GroupBase* GetGroupDS() const; - CORBA::Long Add( const SMESH::long_array& theIDs ); +private: + SMESH_Mesh_i* myMeshServant; + int myLocalID; +}; - CORBA::Long GetID( CORBA::Long theIndex ); +// ====== +// Group +// ====== - SMESH::long_array* GetListOfID(); +class SMESH_Group_i: + public SMESH_GroupBase_i, + public virtual POA_SMESH::SMESH_Group, + public virtual SALOME::GenericObj_i +{ + public: + SMESH_Group_i( PortableServer::POA_ptr thePOA, SMESH_Mesh_i* theMeshServant, const int theLocalID ); + // CORBA interface implementation + void Clear(); + CORBA::Long Add( const SMESH::long_array& theIDs ); CORBA::Long Remove( const SMESH::long_array& theIDs ); +}; - SMESH::SMESH_Mesh_ptr GetMesh(); - - // Internal C++ interface - int GetLocalID(); +// ========================= +// Group linked to geometry +// ========================= - SMESH_Mesh_i* GetMeshServant() { return myMeshServant; } +class SMESH_GroupOnGeom_i: + public SMESH_GroupBase_i, + public virtual POA_SMESH::SMESH_GroupOnGeom, + public virtual SALOME::GenericObj_i +{ + public: + SMESH_GroupOnGeom_i( PortableServer::POA_ptr thePOA, SMESH_Mesh_i* theMeshServant, const int theLocalID ); -private: - SMESH_Mesh_i* myMeshServant; - int myLocalID; + // CORBA interface implementation + GEOM::GEOM_Object_ptr GetShape(); }; - #endif