Salome HOME
removing this useless file.
[modules/med.git] / src / MEDMEM / MEDMEM_GenDriver.cxx
index 7e9d4d3fbdd9180892112c65354d975af256a05a..cff81aed691dec9fe62fa13cf5e2b220a2d69cdb 100644 (file)
@@ -2,6 +2,7 @@ using namespace std;
 #include "MEDMEM_GenDriver.hxx"
 #include "MEDMEM_STRING.hxx"
 #include "MEDMEM_Exception.hxx"
+using namespace MEDMEM;
 
 GENDRIVER::GENDRIVER(): _id(MED_INVALID),
                         _fileName(""),
@@ -16,17 +17,23 @@ GENDRIVER::GENDRIVER(const string & fileName,
                                                                               _status(MED_CLOSED),
                                                                               _driverType(NO_DRIVER) {}
 
-GENDRIVER::GENDRIVER(const GENDRIVER & genDriver):_id(MED_INVALID), _fileName(genDriver._fileName),
-                                                  _accessMode(genDriver._accessMode),
-                                                  _status(genDriver._status),_driverType(NO_DRIVER) {}
+GENDRIVER::GENDRIVER(const GENDRIVER & genDriver):
+  //_id(MED_INVALID), 
+  _id(genDriver._id),
+  _fileName(genDriver._fileName),
+  _accessMode(genDriver._accessMode),
+  _status(genDriver._status),
+  _driverType(genDriver._driverType) 
+{}
+
 GENDRIVER::~GENDRIVER() {}
 
 
-GENDRIVER & GENDRIVER::operator=(const GENDRIVER &  genDriver) {
+GENDRIVER & MEDMEM::GENDRIVER::operator=(const GENDRIVER &  genDriver) 
+{
   const char * LOC = " GENDRIVER & GENDRIVER::operator=(const GENDRIVER &  genDriver)  : ";
   
   BEGIN_OF(LOC);
-
   _fileName    = genDriver._fileName;
   _accessMode  = genDriver._accessMode;
   _status      = genDriver._status;
@@ -39,8 +46,11 @@ GENDRIVER & GENDRIVER::operator=(const GENDRIVER &  genDriver) {
 void GENDRIVER::writeFrom      ( void ) {};
 void GENDRIVER::readFileStruct ( void ) {};
 
-void GENDRIVER::setMeshName    (const string & meshName) {};
-void GENDRIVER::setFieldName   (const string & fieldName) {};
+void GENDRIVER::setMeshName    (const string & ) {};
+void GENDRIVER::setFieldName   (const string & ) {};
+
+void GENDRIVER::openAppend ( void ) {};
+void GENDRIVER::writeAppend ( void ) const {};
 
 void GENDRIVER::setId ( int id ) {
   const char * LOC = "void GENDRIVER::setId ( int id ) : ";
@@ -100,42 +110,46 @@ med_mode_acces GENDRIVER::getAccessMode() const {
   END_OF(LOC);
 }
 
-ostream & operator<<(ostream &os,const GENDRIVER & drv)
+ostream & MEDMEM::operator<<(ostream &os,const GENDRIVER & drv)
 {
   switch (drv._accessMode)
     {
     case MED_RDONLY : 
-      os<<"C'est un IO de READ"<<endl;
+      os << "C'est un IO de READ" << endl;
       break;
     case MED_RDWR :
-      os<<"C'est un IO d'READ/WRITE"<<endl;
+      os << "C'est un IO d'READ/WRITE" << endl;
+      break;
+    case MED_WRONLY :
+      os << "C'est un IO de READ et AJOUT" << endl;
       break;
+    case MED_CREATION :
+      os << "C'est un IO de CREATION" << endl;
     }
   switch (drv._status)
     {
     case MED_OPENED :
-      os<<"L'IO_Mesh_MED est open"<<endl;
+      os << "L'IO_Mesh_MED est open" << endl;
       break;
     case MED_CLOSED :
-      os<<"L'IO_Mesh_MED est fermé"<<endl;
+      os << "L'IO_Mesh_MED est fermé" << endl;
       break;
     case MED_INVALID :
-      os<<"L'IO_Mesh_MED est non-valide"<<endl;
+      os << "L'IO_Mesh_MED est non-valide" << endl;
       break;
     }
   return os;
 }
 
 // Test if this driver has been created from  MED driver
-bool GENDRIVER::operator ==(const GENDRIVER &genDriver) const {
+bool MEDMEM::GENDRIVER::operator ==(const GENDRIVER &genDriver) const {
   
   const char * LOC = "bool GENDRIVER::operator ==(const GENDRIVER &genDriver) const : ";
 
-  BEGIN_OF(LOC);
+  MESSAGE(LOC);
 
   return ( _id == genDriver._id )  &&
     ( _driverType == genDriver._driverType );
   
-  END_OF(LOC);
-  
 };
+