Back to index

salome-smesh  6.5.0
DriverMED_R_SMESHDS_Mesh.h
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 DriverMED : driver to read and write 'med' files
00024 //  File   : DriverMED_R_SMESHDS_Mesh.h
00025 //  Module : SMESH
00026 //
00027 #ifndef _INCLUDE_DRIVERMED_R_SMESHDS_MESH
00028 #define _INCLUDE_DRIVERMED_R_SMESHDS_MESH
00029 
00030 #include "SMESH_DriverMED.hxx"
00031 
00032 #include "Driver_SMESHDS_Mesh.h"
00033 #include "DriverMED_Family.h"
00034 
00035 #include <list>
00036 
00037 class SMESHDS_Mesh;
00038 class SMESHDS_Group;
00039 class SMESHDS_SubMesh;
00040 
00041 typedef std::pair< std::string, SMDSAbs_ElementType > TNameAndType;
00042 
00043 class MESHDRIVERMED_EXPORT DriverMED_R_SMESHDS_Mesh: public Driver_SMESHDS_Mesh
00044 {
00045  public:
00046   virtual Status Perform();
00047 
00048   std::list< TNameAndType > GetGroupNamesAndTypes();
00049   void GetGroup(SMESHDS_Group* theGroup);
00050   void CreateAllSubMeshes();
00051   void GetSubMesh(SMESHDS_SubMesh* theSubMesh, const int theId);
00052 
00053   std::list<std::string> GetMeshNames(Status& theStatus);
00054   void SetMeshName(std::string theMeshName);
00055 
00056  private:
00063   bool checkFamilyID(DriverMED_FamilyPtr & aFamily, int anID) const;
00064 
00065   bool buildMeshGrille(const MED::PWrapper& theWrapper,
00066                        const MED::PMeshInfo& theMeshInfo);
00067 
00068  private:
00069   std::string myMeshName;
00070   std::map<int, DriverMED_FamilyPtr> myFamilies;
00071 
00072 };
00073 
00074 #endif