Salome HOME
Building a version which will be tagged PreV2_0_0 working with KERNEL V1_4_0.
[tools/medcoupling.git] / doc / MEDMEM / MEDMEM_InvokingDriverAtObjectCreationTime.cxx
1 #include "MEDMEM_Exception.hxx"
2 #include "MEDMEM_define.hxx"
3
4 #include "MEDMEM_Field.hxx"
5 #include "MEDMEM_Mesh.hxx"
6 #include "MEDMEM_Med.hxx"
7
8 main () {
9   
10   const char * fileName  = "pointe.med";
11   const char * fieldName = "fieldcelldouble";
12   const char * meshName  = "maa1";
13   
14   try {
15     
16     // Test creation of drivers at object Creation time
17
18     //This test failed due to inadequate Support implementation   
19     // FIELD<double> myField (MED_DRIVER,fileName,fieldName); 
20     MESH          myMesh  (MED_DRIVER,fileName,meshName);
21     MED           myMed   (MED_DRIVER,fileName);
22
23     // Test removal of drivers
24     //myField.rmDriver();
25     myMesh.rmDriver ();
26     myMed.rmDriver  ();
27
28   } catch (MEDEXCEPTION& ex){
29     MESSAGE(ex.what()) ;
30   }
31 }