]> SALOME platform Git repositories - tools/medcoupling.git/blob - doc/MEDMEM/MEDMEM_InvokingDriverAtObjectCreationTime.cxx
Salome HOME
Join modifications from branch BR_DEBUG_3_2_0b1
[tools/medcoupling.git] / doc / MEDMEM / MEDMEM_InvokingDriverAtObjectCreationTime.cxx
1 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 // 
4 #include "MEDMEM_Exception.hxx"
5 #include "MEDMEM_define.hxx"
6
7 #include "MEDMEM_Field.hxx"
8 #include "MEDMEM_Mesh.hxx"
9 #include "MEDMEM_Med.hxx"
10
11 using namespace MEDMEM ;
12 using namespace MED_EN ;
13
14 main () {
15   
16   const char * fileName  = "pointe.med";
17   const char * fieldName = "fieldcelldouble";
18   const char * meshName  = "maa1";
19   
20   try {
21     
22     // Test creation of drivers at object Creation time
23
24     //This test failed due to inadequate Support implementation   
25     // FIELD<double> myField (MED_DRIVER,fileName,fieldName); 
26     MESH          myMesh  (MED_DRIVER,fileName,meshName);
27     MED           myMed   (MED_DRIVER,fileName);
28
29     // Test removal of drivers
30     //myField.rmDriver();
31     myMesh.rmDriver ();
32     myMed.rmDriver  ();
33
34   } catch (MEDEXCEPTION& ex){
35     MESSAGE(ex.what()) ;
36   }
37 }