Back to index

salome-med  6.5.0
MEDMEM_GMesh_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 //=============================================================================
00024 // File      : MEDMEM_GMesh_i.hxx
00025 // Project   : SALOME
00026 //=============================================================================
00027 //
00028 #ifndef _MED_GMESH_I_HXX_
00029 #define _MED_GMESH_I_HXX_
00030 
00031 #include <MEDMEM_I.hxx>
00032 
00033 #include <map>
00034 #include <string>
00035 
00036 #include <SALOMEconfig.h>
00037 #include "SALOMEMultiComm.hxx"
00038 #include "SALOME_GenericObj_i.hh"
00039 #include CORBA_SERVER_HEADER(MED)
00040 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
00041 #include CORBA_SERVER_HEADER(SALOME_Comm)
00042 
00043 namespace MEDMEM {
00044 class GMESH;
00045 class MEDMEM_I_EXPORT GMESH_i: virtual public POA_SALOME_MED::GMESH,
00046               virtual public SALOMEMultiComm,
00047               virtual public SALOME::GenericObj_i
00048 {
00049 public :
00050     static std::map < int,::MEDMEM::GMESH *> meshMap;
00051 private :
00052     static int meshIndex;
00053 
00054 private :
00055 
00056 protected:
00057     // C++ object containing values
00058     ::MEDMEM::GMESH * const _mesh;
00059     const int               _corbaIndex;
00060     std::string             _meshId;
00061 
00062 
00063 public:
00064 
00065   // Constructors and associated internal methods
00066   GMESH_i();
00067   GMESH_i(::MEDMEM::GMESH * const m);
00068   GMESH_i(GMESH_i & m);
00069   ~GMESH_i();
00070 
00071   // IDL Methods 
00072   char *          getName()             throw (SALOME::SALOME_Exception);
00073   
00074   CORBA::Long     getSpaceDimension()   throw (SALOME::SALOME_Exception);
00075 
00076   CORBA::Long     getMeshDimension()    throw (SALOME::SALOME_Exception);
00077   
00078   CORBA::Boolean  getIsAGrid()          throw (SALOME::SALOME_Exception);
00079 
00080   char *          getCoordinatesSystem() 
00081                          throw (SALOME::SALOME_Exception);
00082   
00083   SALOME_TYPES::ListOfString* getCoordinatesNames() 
00084                          throw (SALOME::SALOME_Exception);
00085   
00086   SALOME_TYPES::ListOfString* getCoordinatesUnits()
00087                          throw (SALOME::SALOME_Exception); 
00088   
00089   CORBA::Long     getNumberOfNodes() 
00090                          throw (SALOME::SALOME_Exception);
00091   
00092   CORBA::Long     getNumberOfTypes       (SALOME_MED::medEntityMesh entity) 
00093                          throw   (SALOME::SALOME_Exception);
00094   
00095   SALOME_MED::medGeometryElement_array* getTypes(SALOME_MED::medEntityMesh entity)
00096                          throw   (SALOME::SALOME_Exception);
00097 
00098   SALOME_MED::medGeometryElement   getElementType(SALOME_MED::medEntityMesh entity,
00099                                                   CORBA::Long number)
00100                          throw   (SALOME::SALOME_Exception);
00101 
00102   
00103   CORBA::Long     getNumberOfElements (SALOME_MED::medEntityMesh entity,
00104                                        SALOME_MED::medGeometryElement geomElement) 
00105                          throw (SALOME::SALOME_Exception);
00106   
00107 
00108     // Family and Group
00109     CORBA::Long               getNumberOfFamilies(SALOME_MED::medEntityMesh entity)
00110                                         throw (SALOME::SALOME_Exception);
00111     CORBA::Long               getNumberOfGroups(SALOME_MED::medEntityMesh entity) 
00112                                         throw (SALOME::SALOME_Exception);
00113     SALOME_MED::Family_array* getFamilies(SALOME_MED::medEntityMesh entity) 
00114                                         throw (SALOME::SALOME_Exception);
00115     SALOME_MED::FAMILY_ptr    getFamily    (SALOME_MED::medEntityMesh entity,
00116                                             CORBA::Long i) 
00117                                         throw (SALOME::SALOME_Exception);
00118     SALOME_MED::Group_array*  getGroups(SALOME_MED::medEntityMesh entity) 
00119                                         throw (SALOME::SALOME_Exception);
00120     SALOME_MED::GROUP_ptr     getGroup (SALOME_MED::medEntityMesh entity, 
00121                                             CORBA::Long i) 
00122                                         throw (SALOME::SALOME_Exception);
00123     // 
00124     SALOME_MED::SUPPORT_ptr getBoundaryElements(SALOME_MED::medEntityMesh entity)
00125                                      throw (SALOME::SALOME_Exception);
00126     SALOME_MED::SUPPORT_ptr getSupportOnAll(SALOME_MED::medEntityMesh entity)
00127                                      throw (SALOME::SALOME_Exception);
00128     SALOME_MED::SUPPORT_ptr getSkin        (SALOME_MED::SUPPORT_ptr mySupport3D)
00129                                      throw (SALOME::SALOME_Exception);
00130     // 
00131     SALOME_MED::FIELD_ptr getVolume        (SALOME_MED::SUPPORT_ptr mySupport)
00132                                      throw (SALOME::SALOME_Exception);
00133     SALOME_MED::FIELD_ptr getArea          (SALOME_MED::SUPPORT_ptr mySupport)          
00134                                      throw (SALOME::SALOME_Exception);
00135     SALOME_MED::FIELD_ptr getLength        (SALOME_MED::SUPPORT_ptr mySupport)        
00136                                      throw (SALOME::SALOME_Exception);
00137     SALOME_MED::FIELD_ptr getNormal        (SALOME_MED::SUPPORT_ptr mySupport)        
00138                                      throw (SALOME::SALOME_Exception);
00139     SALOME_MED::FIELD_ptr getBarycenter    (SALOME_MED::SUPPORT_ptr mySupport)    
00140                                      throw (SALOME::SALOME_Exception);
00141     SALOME_MED::FIELD_ptr getNeighbourhood (SALOME_MED::SUPPORT_ptr mySupport) 
00142                                      throw (SALOME::SALOME_Exception);
00143 
00144     SALOME_MED::MESH_ptr convertInMESH() throw (SALOME::SALOME_Exception);
00145 
00146     // Others
00147     void        addInStudy (SALOMEDS::Study_ptr myStudy, 
00148                             SALOME_MED::GMESH_ptr myIor)   
00149                             throw (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
00150     void        addInStudy (SALOMEDS::Study_ptr myStudy, 
00151                             SALOME_MED::GMESH_ptr myIor,
00152                             const std::string & fileName)   
00153                             throw (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
00154     CORBA::Long addDriver  (SALOME_MED::medDriverTypes driverType, 
00155                             const char* fileName, const char* meshName)
00156                                                           throw (SALOME::SALOME_Exception);
00157     void        rmDriver   (CORBA::Long i)                throw (SALOME::SALOME_Exception);
00158     void        read       (CORBA::Long i)                throw (SALOME::SALOME_Exception);
00159     void        write      (CORBA::Long i, const char* driverMeshName)
00160                                                           throw (SALOME::SALOME_Exception);
00161 
00162     //                                  Cuisine interne
00163     CORBA::Long getCorbaIndex() throw (SALOME::SALOME_Exception);
00164     ::MEDMEM::GMESH * constructConstMesh() const;
00165     SALOME_MED::GMESH::meshInfos * getMeshGlobal()
00166                                   throw (SALOME::SALOME_Exception);
00167     SALOME_MED::GMESH::coordinateInfos * getCoordGlobal()
00168                                   throw (SALOME::SALOME_Exception);
00169     CORBA::Boolean areEquals(SALOME_MED::GMESH_ptr other);
00170 
00171 };
00172 }
00173 
00174 #endif /* _MED_MESH_I_HXX_ */