X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FDriverDAT%2FDriverDAT_R_SMESHDS_Document.cxx;h=c7d9b2230c1a28feb9be9aad1168a8364bc445c4;hp=421c6c95ca1fa3fa7671bbd3d767bbc12dee062b;hb=e4737e85f0da6d3f90fd08f6be1c2825195fe16f;hpb=4791f5b30ea7a9c1247aa551750dc71cb83b99aa diff --git a/src/DriverDAT/DriverDAT_R_SMESHDS_Document.cxx b/src/DriverDAT/DriverDAT_R_SMESHDS_Document.cxx index 421c6c95c..c7d9b2230 100644 --- a/src/DriverDAT/DriverDAT_R_SMESHDS_Document.cxx +++ b/src/DriverDAT/DriverDAT_R_SMESHDS_Document.cxx @@ -1,5 +1,3 @@ -// SMESH DriverDAT : driver to read and write 'dat' files -// // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // @@ -18,95 +16,5 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : DriverDAT_R_SMESHDS_Document.cxx -// Module : SMESH -using namespace std; #include "DriverDAT_R_SMESHDS_Document.h" -#include "DriverDAT_R_SMESHDS_Mesh.h" - -#include "utilities.h" - -int getOne() { - printf("in getOne"); - return (1); -} - -extern "C" { - // Document_Reader* maker() { - DriverDAT_R_SMESHDS_Document* maker() { - fprintf(stdout,"here in maker\n"); - return new DriverDAT_R_SMESHDS_Document; - } -} - -DriverDAT_R_SMESHDS_Document::DriverDAT_R_SMESHDS_Document() { - myFile = string(""); -} - -DriverDAT_R_SMESHDS_Document::~DriverDAT_R_SMESHDS_Document() { -; -} - -//void DriverDAT_R_SMESHDS_Document::SetFile(string aFile) { -//myFile = aFile; -//} - -//void DriverDAT_R_SMESHDS_Document::SetDocument(Handle(SMESHDS_Document)& aDoc) { -//myDocument = aDoc; -//} - -void DriverDAT_R_SMESHDS_Document::Read() { - - int myMeshId; - MESSAGE("in read"); - SCRUTE(myFile); - //Handle(SMESHDS_Document) myDocument = new SMESHDS_Document(1); - - /**************************************************************************** - * OUVERTURE DU FICHIER EN LECTURE * - ****************************************************************************/ - char* file2Read = (char*)myFile.c_str(); - FILE* fid = fopen(file2Read,"r"); - if (fid < 0) - { - fprintf(stderr,">> ERREUR : ouverture du fichier %s \n",file2Read); - exit(EXIT_FAILURE); - } - - /**************************************************************************** - * COMBIEN DE MAILLAGES ? * - ****************************************************************************/ - int nmaa = 1; - - /**************************************************************************** - * FERMETURE DU FICHIER * - ****************************************************************************/ - fclose(fid); - - printf("Nombre de maillages = %d\n",nmaa); - - string myClass = string("SMESHDS_Mesh"); - string myExtension = string("DAT"); - - for (int meshIt=1;meshIt<=nmaa;meshIt++) { - myMeshId = myDocument->NewMesh(); - - Handle(SMDS_Mesh) myMesh = myDocument->GetMesh(myMeshId); - - DriverDAT_R_SMESHDS_Mesh* myReader = new DriverDAT_R_SMESHDS_Mesh; - - - myReader->SetMesh(myMesh); - myReader->SetFile(myFile); - //myReader->SetFileId(fid); - - myReader->Read(); - - } - - -}