Back to index

salome-smesh  6.5.0
SMESH_subMesh_i.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
00024 //  File   : SMESH_subMesh_i.hxx
00025 //  Author : Paul RASCLE, EDF
00026 //  Module : SMESH
00027 //
00028 #ifndef _SMESH_SUBMESH_I_HXX_
00029 #define _SMESH_SUBMESH_I_HXX_
00030 
00031 #include "SMESH.hxx"
00032 
00033 #include <SALOMEconfig.h>
00034 #include CORBA_SERVER_HEADER(SMESH_Mesh)
00035 #include CORBA_SERVER_HEADER(SMESH_Hypothesis)
00036 #include CORBA_CLIENT_HEADER(GEOM_Gen)
00037 #include CORBA_CLIENT_HEADER(MED)
00038 
00039 #include "SALOME_GenericObj_i.hh"
00040 #include "SMESH_Mesh_i.hxx"
00041 
00042 class SMESH_Gen_i;
00043 class SMESH_PreMeshInfo;
00044 
00045 class SMESH_I_EXPORT SMESH_subMesh_i:
00046   public virtual POA_SMESH::SMESH_subMesh,
00047   public virtual SALOME::GenericObj_i
00048 {
00049 public:
00050   SMESH_subMesh_i();
00051   SMESH_subMesh_i( PortableServer::POA_ptr thePOA,
00052                    SMESH_Gen_i*            gen_i,
00053                    SMESH_Mesh_i*           mesh_i,
00054                    int                     localId );
00055   ~SMESH_subMesh_i();
00056 
00057   CORBA::Long GetNumberOfElements()
00058     throw (SALOME::SALOME_Exception);
00059   
00060   CORBA::Long  GetNumberOfNodes( CORBA::Boolean all )
00061     throw (SALOME::SALOME_Exception);
00062   
00063   SMESH::long_array* GetElementsId()
00064     throw (SALOME::SALOME_Exception);
00065 
00066   SMESH::long_array* GetElementsByType( SMESH::ElementType theElemType )
00067     throw (SALOME::SALOME_Exception);
00068   
00069   SMESH::ElementType GetElementType( CORBA::Long id, bool iselem )
00070     throw (SALOME::SALOME_Exception);
00071   
00072   SMESH::long_array* GetNodesId()
00073     throw (SALOME::SALOME_Exception);
00074   
00075   SMESH::SMESH_Mesh_ptr GetFather()
00076     throw (SALOME::SALOME_Exception);
00077   
00078   GEOM::GEOM_Object_ptr GetSubShape()
00079     throw (SALOME::SALOME_Exception);
00080 
00081   CORBA::Long GetId();
00082 
00083   SALOME_MED::FAMILY_ptr GetFamily()
00084     throw (SALOME::SALOME_Exception);
00085 
00086 
00087   // =========================
00088   // interface SMESH_IDSource
00089   // =========================
00093   virtual SMESH::long_array* GetIDs();
00099   virtual SMESH::long_array* GetMeshInfo();
00103   virtual SMESH::array_of_ElementType* GetTypes();
00107   virtual SMESH::SMESH_Mesh_ptr GetMesh();
00112   virtual bool IsMeshInfoCorrect();
00113 
00114 
00115 protected:
00116 
00117   SMESH_Gen_i*  _gen_i;
00118   int           _localId;
00119   SMESH_Mesh_i* _mesh_i; //NRI
00120 
00121   void changeLocalId(int localId) { _localId = localId; }
00122   friend void SMESH_Mesh_i::CheckGeomGroupModif();
00123 
00124   SMESH_PreMeshInfo* _preMeshInfo; // mesh info before full loading from study file
00125 
00126   SMESH_PreMeshInfo* & changePreMeshInfo() { return _preMeshInfo; }
00127   friend class SMESH_PreMeshInfo;
00128 };
00129 
00130 #endif