2 #include "DriverUNV_R_SMESHDS_Document.h"
3 #include "DriverUNV_R_SMESHDS_Mesh.h"
15 // Document_Reader* maker() {
16 DriverUNV_R_SMESHDS_Document *maker()
18 fprintf(stdout, "here in maker\n");
19 return new DriverUNV_R_SMESHDS_Document;
23 DriverUNV_R_SMESHDS_Document::DriverUNV_R_SMESHDS_Document()
28 DriverUNV_R_SMESHDS_Document::~DriverUNV_R_SMESHDS_Document()
33 //void DriverUNV_R_SMESHDS_Document::SetFile(string aFile) {
37 //void DriverUNV_R_SMESHDS_Document::SetDocument(Handle(SMESHDS_Document)& aDoc) {
41 void DriverUNV_R_SMESHDS_Document::Read()
46 //Handle(SMESHDS_Document) myDocument = new SMESHDS_Document(1);
48 /****************************************************************************
49 * OUVERTURE DU FICHIER EN LECTURE *
50 ****************************************************************************/
51 char *file2Read = (char *)myFile.c_str();
52 FILE *fid = fopen(file2Read, "r");
55 fprintf(stderr, ">> ERREUR : ouverture du fichier %s \n", file2Read);
59 /****************************************************************************
60 * COMBIEN DE MAILLAGES ? *
61 ****************************************************************************/
64 /****************************************************************************
65 * FERMETURE DU FICHIER *
66 ****************************************************************************/
69 printf("Nombre de maillages = %d\n", nmaa);
71 string myClass = string("SMESHDS_Mesh");
72 string myExtension = string("UNV");
74 for (int meshIt = 1; meshIt <= nmaa; meshIt++)
76 myMeshId = myDocument->NewMesh();
78 SMDS_Mesh * myMesh = myDocument->GetMesh(myMeshId);
80 DriverUNV_R_SMESHDS_Mesh *myReader = new DriverUNV_R_SMESHDS_Mesh;
82 myReader->SetMesh(myMesh);
83 myReader->SetFile(myFile);
84 //myReader->SetFileId(fid);