src/MedClient/src/CONNECTIVITYClient.hxx

Go to the documentation of this file.
00001 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00002 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00003 // 
00004 // This library is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU Lesser General Public
00006 // License as published by the Free Software Foundation; either 
00007 // version 2.1 of the License.
00008 // 
00009 // This library is distributed in the hope that it will be useful 
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
00012 // Lesser General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU Lesser General Public  
00015 // License along with this library; if not, write to the Free Software 
00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00017 //
00018 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00019 //
00020 #ifndef _CONNECTIVITY_CLIENT_HXX
00021 #define _CONNECTIVITY_CLIENT_HXX
00022 
00023 #include <SALOMEconfig.h>
00024 #include "MEDMEM_Connectivity.hxx"
00025 #include CORBA_CLIENT_HEADER(MED)
00026 
00027 namespace MEDMEM {
00028 class CONNECTIVITYClient : public CONNECTIVITY {
00029 
00030 protected:
00031  
00032   long *_numberOfElements_client;
00033   long _totalNumberOfElements_client;
00034   medGeometryElement _polyType_client;
00035 
00036   mutable bool _complete;
00037   SALOME_MED::MESH_var IOR_Mesh ;
00038 
00039 public:
00040 
00041   CONNECTIVITYClient(const SALOME_MED::MESH_ptr m, 
00042                medEntityMesh Entity=MED_CELL);
00043 
00044   virtual ~CONNECTIVITYClient();
00045 
00046   void fillCopy();
00047   void blankCopy();
00048  
00049   int getNumberOf(medEntityMesh Entity, medGeometryElement Type) const;
00050 
00051   const int * getConnectivity      (medConnectivity ConnectivityType, 
00052                          medEntityMesh Entity,
00053                          medGeometryElement Type);
00054   const int * getConnectivityIndex (medConnectivity ConnectivityType,
00055                          medEntityMesh Entity);
00056   
00057   void  calculateConnectivity (medConnectivity connectivityType, 
00058                       medEntityMesh Entity);
00059 
00060   void  updateFamily (vector<FAMILY*> myFamilies);
00061 
00062   const int * getGlobalNumberingIndex (medEntityMesh Entity) const throw (MEDEXCEPTION);
00063 
00064   bool existConnectivity(medConnectivity ConnectivityType, 
00065                 medEntityMesh Entity) const;
00066 
00067   const int* getReverseConnectivity (medConnectivity ConnectivityType, 
00068                           medEntityMesh Entity=MED_CELL)
00069     throw (MEDEXCEPTION);
00070 
00071   const int* getReverseConnectivityIndex (medConnectivity ConnectivityType,
00072                                medEntityMesh Entity=MED_CELL)
00073     throw (MEDEXCEPTION);
00074 
00075   const int* getValue (medConnectivity TypeConnectivity, 
00076                   medGeometryElement Type);
00077  
00078   const int* getValueIndex        (medConnectivity TypeConnectivity);
00079   const int* getNeighbourhood() const;
00080 
00081   
00082 
00083   bool       existPolygonsConnectivity(medConnectivity connectivityType,
00084                                        medEntityMesh   Entity) const;
00085   bool       existPolyhedronConnectivity(medConnectivity connectivityType,
00086                                          medEntityMesh   Entity) const;
00087   const int* getPolygonsConnectivity(medConnectivity ConnectivityType,
00088                          medEntityMesh   Entity);
00089   const int* getPolygonsConnectivityIndex(medConnectivity ConnectivityType,
00090                            medEntityMesh   Entity);
00091   const int* getPolyhedronConnectivity(medConnectivity ConnectivityType) const;
00092   const int* getPolyhedronIndex(medConnectivity ConnectivityType) const;
00093   const int* getPolyhedronFacesIndex() const;
00094   int getNumberOfPolygons() const;
00095   int getNumberOfPolyhedronFaces() const;
00096   int getNumberOfPolyhedron() const;
00097 };
00098 };
00099 
00100 
00101 #endif