Back to index

salome-med  6.5.0
testUGeoNameMeshEntities.cxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 //  File   : testUGeoNameMeshEntities.cxx
00021 //  Module : MED
00022 //
00023 #include "MEDMEM_DriversDef.hxx"
00024 
00025 using namespace std;
00026 static void usage(char * name)
00027 {
00028   cout << "    " << name << endl;
00029   cout << "    " << "displays all avalaible geometry elements" << endl;
00030   cout << "    " << "display then all avalaible entities, and for each" << endl;
00031   cout << "    " << "all possible geomety element" << endl;
00032   cout << endl;
00033   exit(-1);
00034 }
00035 
00036 int main (int argc, char ** argv) 
00037 {
00038   
00039   if (argc < 1) usage(argv[0]);
00040 
00041 
00042   cout << "GEO_NAME Test" << endl ;
00043   cout << "-------------" << endl << endl;
00044   MED_EN::GEO_NAME::const_iterator currentGeom;
00045   for (currentGeom  = MED_EN::geoNames.begin();
00046        currentGeom != MED_EN::geoNames.end(); 
00047        currentGeom++) 
00048   {
00049                 cout << (*currentGeom).second << endl;
00050   };
00051 
00052   MED_EN::MESH_ENTITIES::const_iterator currentEntity;
00053   list<MED_EN::medGeometryElement>::const_iterator currentGeometry;
00054 
00055   cout << endl; 
00056   cout << "MESH_ENTITIES Test" << endl ;
00057   cout << "------------------" << endl << endl;
00058   for (currentEntity  = MED_EN::meshEntities.begin();
00059        currentEntity != MED_EN::meshEntities.end(); 
00060        currentEntity++) 
00061   {
00062         cout << (*((MED_EN::entNames).find((*currentEntity).first))).second <<endl;
00063         for (currentGeometry  = (*currentEntity).second.begin();
00064              currentGeometry != (*currentEntity).second.end(); 
00065              currentGeometry++) 
00066         {
00067         cout << MED_EN::geoNames[(MED_EN::medGeometryElement)(*currentGeometry)] << endl;
00068         }
00069         cout << endl;
00070   }
00071 
00072 }