src/DriverMED/DriverMED_R_SMESHDS_Mesh.h

Go to the documentation of this file.
00001 //  SMESH DriverMED : driver to read and write 'med' files
00002 //
00003 //  Copyright (C) 2003  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   : 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 "Driver_SMESHDS_Mesh.h"
00031 #include "DriverMED_Family.h"
00032 
00033 #include <list>
00034 
00035 class SMESHDS_Mesh;
00036 class SMESHDS_Group;
00037 class SMESHDS_SubMesh;
00038 
00039 typedef std::pair< std::string, SMDSAbs_ElementType > TNameAndType;
00040 
00041 class DriverMED_R_SMESHDS_Mesh: public Driver_SMESHDS_Mesh
00042 {
00043  public:
00044   virtual Status Perform();
00045 
00046   std::list< TNameAndType > GetGroupNamesAndTypes();
00047   void GetGroup(SMESHDS_Group* theGroup);
00048   void CreateAllSubMeshes();
00049   void GetSubMesh(SMESHDS_SubMesh* theSubMesh, const int theId);
00050 
00051   std::list<std::string> GetMeshNames(Status& theStatus);
00052   void SetMeshName(std::string theMeshName);
00053 
00054  private:
00061   bool checkFamilyID(DriverMED_FamilyPtr & aFamily, int anID) const;
00062 
00063   bool buildMeshGrille(const MED::PWrapper& theWrapper,
00064                  const MED::PMeshInfo& theMeshInfo);
00065 
00066  private:
00067   std::string myMeshName;
00068   std::map<int, DriverMED_FamilyPtr> myFamilies;
00069 
00070 };
00071 
00072 #endif