From 7ca1bfa69406b4b0d236f82db6b9e4ffa214dff4 Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 20 May 2003 12:16:40 +0000 Subject: [PATCH] This commit was generated by cvs2git to create branch 'IMPORT'. Cherrypick from master 2003-05-20 12:16:39 UTC nri 'NRI : Update 1.1a and New organisation.': idl/Med_Gen.idl src/MEDMEM/MEDMEM_PointerOf.hxx src/MEDMEM/test_affect_medarray.cxx src/MEDMEM/test_copie_connectivity.cxx src/MEDMEM/test_copie_coordinate.cxx src/MEDMEM/test_copie_family.cxx src/MEDMEM/test_copie_fieldT.cxx src/MEDMEM/test_copie_field_.cxx src/MEDMEM/test_copie_group.cxx src/MEDMEM/test_copie_medarray.cxx src/MEDMEM/test_copie_support.cxx src/MEDMEM_SWIG/MEDMEM_SWIG_MedFieldDoubleDriver.cxx src/MEDMEM_SWIG/MEDMEM_SWIG_MedFieldDoubleDriver.hxx src/MEDMEM_SWIG/MEDMEM_SWIG_MedFieldIntDriver.cxx src/MEDMEM_SWIG/MEDMEM_SWIG_MedFieldIntDriver.hxx --- idl/Med_Gen.idl | 41 +++++ src/MEDMEM/MEDMEM_PointerOf.hxx | 118 +++++++++++++ src/MEDMEM/test_affect_medarray.cxx | 106 ++++++++++++ src/MEDMEM/test_copie_connectivity.cxx | 144 ++++++++++++++++ src/MEDMEM/test_copie_coordinate.cxx | 110 ++++++++++++ src/MEDMEM/test_copie_family.cxx | 126 ++++++++++++++ src/MEDMEM/test_copie_fieldT.cxx | 118 +++++++++++++ src/MEDMEM/test_copie_field_.cxx | 125 ++++++++++++++ src/MEDMEM/test_copie_group.cxx | 95 +++++++++++ src/MEDMEM/test_copie_medarray.cxx | 105 ++++++++++++ src/MEDMEM/test_copie_support.cxx | 161 ++++++++++++++++++ .../MEDMEM_SWIG_MedFieldDoubleDriver.cxx | 147 ++++++++++++++++ .../MEDMEM_SWIG_MedFieldDoubleDriver.hxx | 51 ++++++ .../MEDMEM_SWIG_MedFieldIntDriver.cxx | 147 ++++++++++++++++ .../MEDMEM_SWIG_MedFieldIntDriver.hxx | 51 ++++++ 15 files changed, 1645 insertions(+) create mode 100644 idl/Med_Gen.idl create mode 100644 src/MEDMEM/MEDMEM_PointerOf.hxx create mode 100644 src/MEDMEM/test_affect_medarray.cxx create mode 100644 src/MEDMEM/test_copie_connectivity.cxx create mode 100644 src/MEDMEM/test_copie_coordinate.cxx create mode 100644 src/MEDMEM/test_copie_family.cxx create mode 100644 src/MEDMEM/test_copie_fieldT.cxx create mode 100644 src/MEDMEM/test_copie_field_.cxx create mode 100644 src/MEDMEM/test_copie_group.cxx create mode 100644 src/MEDMEM/test_copie_medarray.cxx create mode 100644 src/MEDMEM/test_copie_support.cxx create mode 100644 src/MEDMEM_SWIG/MEDMEM_SWIG_MedFieldDoubleDriver.cxx create mode 100644 src/MEDMEM_SWIG/MEDMEM_SWIG_MedFieldDoubleDriver.hxx create mode 100644 src/MEDMEM_SWIG/MEDMEM_SWIG_MedFieldIntDriver.cxx create mode 100644 src/MEDMEM_SWIG/MEDMEM_SWIG_MedFieldIntDriver.hxx diff --git a/idl/Med_Gen.idl b/idl/Med_Gen.idl new file mode 100644 index 000000000..5b0ebf458 --- /dev/null +++ b/idl/Med_Gen.idl @@ -0,0 +1,41 @@ +//============================================================================= +// File : Med_Gen.idl +// Project : SALOME +// Copyright : EDF 2001 +//============================================================================= + +#ifndef _Med_GEN_IDL_ +#define _Med_GEN_IDL_ + + +#include "SALOME_Exception.idl" +#include "SALOME_Component.idl" +#include "SALOMEDS.idl" +#include "MED.idl" + +module Engines +{ + interface Med_Gen : Engines::Component, SALOMEDS::Driver + { + SALOME_MED::MESH readMeshInFile(in string fileName, + in string studyName, + in string meshName ) + raises (SALOME::SALOME_Exception); + SALOME_MED::FIELD readFieldInFile(in string fileName, + in string studyName, + in string fieldName, + in long ordre, + in long iter ) + raises (SALOME::SALOME_Exception); + SALOME_MED::MED readStructFile(in string fileName, + in string studyName ) + raises (SALOME::SALOME_Exception); + + void readStructFileWithFieldType(in string fileName, + in string studyName ) + raises (SALOME::SALOME_Exception); + }; + +}; + +#endif diff --git a/src/MEDMEM/MEDMEM_PointerOf.hxx b/src/MEDMEM/MEDMEM_PointerOf.hxx new file mode 100644 index 000000000..dc5744547 --- /dev/null +++ b/src/MEDMEM/MEDMEM_PointerOf.hxx @@ -0,0 +1,118 @@ +# if ! defined( __PointerOf_HXX__ ) +# define __PointerOf_HXX__ + +#include +#include "utilities.h" + +/*! + The template class PointerOf embedding a standard pointer (_pointer) is in charge of + managing a the pointed memory. +*/ + +template class PointerOf +{ +protected : + T* _pointer ; + bool _done ; +public : + PointerOf() ; // + PointerOf( const int &size ) ; + PointerOf( const T *pointer ) ; + ~PointerOf() ; + operator T*() ; + operator const T*() const ; + + //operator T*() const ; + + void set( const int &size ) ; + void set( const T *pointer ) ; + PointerOf& operator=( const PointerOf &pointer ) ; +} ; + +template PointerOf& PointerOf::operator=( const PointerOf &pointer ) +{ + BEGIN_OF("PointerOf::operator=( const PointerOf &pointer )") ; + if ( &pointer != this ) + { + this->set( pointer._pointer ) ; + } + END_OF("PointerOf::operator=( const PointerOf &pointer )") ; + return *this ; +} + +template PointerOf::PointerOf() : _pointer(0), _done(false) +{ +} + +template PointerOf::PointerOf( const int &size ) : _pointer( new T[ size ]), _done(true) +{ +} + +template PointerOf::PointerOf( const T* pointer ) : _pointer( (T*)pointer ), _done(false) +{ +} + +template PointerOf::~PointerOf() +{ + if ( _pointer ) + { + if( _done ) + { + MESSAGE("PointerOf::~PointerOf() --> deleting _pointer") ; + delete [] _pointer ; + _done = false ; + } + else + { + MESSAGE("_pointer is only nullified") ; + } + _pointer = 0 ; + } +} + +template PointerOf::operator T*() +{ + return _pointer ; +} + +template PointerOf::operator const T*() const +{ + return _pointer ; +} + +// template PointerOf::operator T*() const +// { +// return _pointer ; +// } + +template void PointerOf::set( const int &size ) +{ + ASSERT(size>0) ; + if ( _pointer && _done ) + { + delete [] _pointer ; + _pointer=0 ; + } + _pointer = new T[ size ] ; + _done = true ; + return ; +} +template void PointerOf::set( const T *pointer ) +{ + MESSAGE( "PointerOf::set( const T *pointer )" ) ; + SCRUTE(pointer) ; + SCRUTE(_done) ; + if ( _pointer && _done ) + { + MESSAGE("PointerOf::set --> deleting _pointer") ; + delete [] _pointer ; + _pointer=0 ; + _done=false ; + } + _pointer=(T*)pointer ; + _done=false ; + MESSAGE( "PointerOf::set( const T *pointer )" ) ; + return ; +} + +# endif /* # if ! defined( __PointerOf_HXX__ ) */ diff --git a/src/MEDMEM/test_affect_medarray.cxx b/src/MEDMEM/test_affect_medarray.cxx new file mode 100644 index 000000000..b5043f1bb --- /dev/null +++ b/src/MEDMEM/test_affect_medarray.cxx @@ -0,0 +1,106 @@ +using namespace std; +/* Programme de test du constructeur de copies de la classe MEDARRAY de MEDMEM + jroy - 16/12/2002 */ + +#include + +#include +#include + +#include "MEDMEM_Exception.hxx" +#include "MEDMEM_Mesh.hxx" +#include "MEDMEM_Family.hxx" +#include "MEDMEM_Group.hxx" + +#include "MEDMEM_MedMeshDriver.hxx" +#include "MEDMEM_MedFieldDriver.hxx" +#include "MEDMEM_Support.hxx" +#include "MEDMEM_Field.hxx" +#include "MEDMEM_define.hxx" + + +void affiche_medarray(MEDARRAY & myMedArray) +{ + int numberof ; + MESSAGE("Show all 1 :"); + numberof = myMedArray.getLeadingValue() ; + for (int i=1; i<=myMedArray.getLengthValue() ; i++) { + double * node = myMedArray.getI(MED_FULL_INTERLACE,i) ; + cout << " - " ; + for (int j=0;j * myMedArray = new MEDARRAY(dimension,nb_noeuds,mode); + for (med_int i=1; i<=myMedArray->getLengthValue(); i++) { + for (med_int j=1; j<=myMedArray->getLeadingValue(); j++) + myMedArray->setIJ(i,j,(double) random()); + }; + + affiche_medarray(* myMedArray); + MEDARRAY * myMedArray2 = new MEDARRAY(); + * myMedArray2 = * myMedArray; + delete myMedArray; + affiche_medarray(* myMedArray2); + delete myMedArray2; + + return 0; +} diff --git a/src/MEDMEM/test_copie_connectivity.cxx b/src/MEDMEM/test_copie_connectivity.cxx new file mode 100644 index 000000000..4b94dcb17 --- /dev/null +++ b/src/MEDMEM/test_copie_connectivity.cxx @@ -0,0 +1,144 @@ +using namespace std; +/* Programme de test du constructeur de copies de la classe CONNECTIVITY de MEDMEM + jroy - 19/12/2002 */ + +#include + +#include +#include + +#include "MEDMEM_Exception.hxx" +#include "MEDMEM_Mesh.hxx" +#include "MEDMEM_Family.hxx" +#include "MEDMEM_Group.hxx" + +#include "MEDMEM_MedMeshDriver.hxx" +#include "MEDMEM_MedFieldDriver.hxx" +#include "MEDMEM_Support.hxx" +#include "MEDMEM_Field.hxx" +#include "MEDMEM_define.hxx" + +void affiche_connectivity(CONNECTIVITY * myConnectivity, MESH * myMesh) +{ + int SpaceDimension = myMesh->getSpaceDimension() ; + int MeshDimension = myMesh->getMeshDimension() ; + int NumberOfNodes = myMesh->getNumberOfNodes() ; + + int NumberOfTypes = myMesh->getNumberOfTypes(MED_CELL) ; + medGeometryElement * Types = myMesh->getTypes(MED_CELL) ; + + cout << "Show Connectivity (Nodal) :" << endl ; + for (int i=0; igetNumberOfElements(MED_CELL,Types[i]); + int * connectivity = myMesh->getConnectivity(MED_FULL_INTERLACE,MED_NODAL,MED_CELL,Types[i]); + int NomberOfNodesPerCell = Types[i]%100 ; + for (int j=0;jgetReverseConnectivity(MED_NODAL) ; + int * ReverseNodalConnectivityIndex = myMesh->getReverseConnectivityIndex(MED_NODAL) ; + for (int i=0; icalculateConnectivity(MED_FULL_INTERLACE,MED_DESCENDING,MED_CELL); + try { + NumberOfElements = myMesh->getNumberOfElements(MED_CELL,MED_ALL_ELEMENTS); + connectivity = myMesh->getConnectivity(MED_FULL_INTERLACE,MED_DESCENDING,MED_CELL,MED_ALL_ELEMENTS); + connectivity_index = myMesh->getConnectivityIndex(MED_DESCENDING,MED_CELL); + } + catch (MEDEXCEPTION m) { + cout << m.what() << endl ; + exit (-1) ; + } + for (int j=0;jgetReverseConnectivity(MED_DESCENDING) ; + int * ReverseDescendingConnectivityIndex = myMesh->getReverseConnectivityIndex(MED_DESCENDING) ; + + int NumberOfConstituents = 0; + string constituent ; + medEntityMesh constituentEntity ; + + if (MeshDimension==3) { + constituent = "Face" ; + constituentEntity = MED_FACE ; + } + + if (MeshDimension==2) { + constituent = "Edge" ; + constituentEntity = MED_EDGE ; + } + + if (MeshDimension==1) { + MESSAGE("ERROR : MeshDimension = 1 !"); + MESSAGE("We could not see Reverse Descending Connectivity.") ; + } else { + NumberOfConstituents = myMesh->getNumberOfElements (constituentEntity,MED_ALL_ELEMENTS); + for (int i=0; igetConnectivity(MED_FULL_INTERLACE,MED_NODAL,constituentEntity,MED_ALL_ELEMENTS); + int * face_connectivity_index = myMesh->getConnectivityIndex(MED_NODAL,constituentEntity); + for (int i=0; isetName(meshname); + MED_MESH_RDONLY_DRIVER myMeshDriver(filename,myMesh) ; + myMeshDriver.setMeshName(meshname); + myMeshDriver.open() ; + myMeshDriver.read() ; //A partir d'ici la connectivité est construite + myMeshDriver.close() ; + + CONNECTIVITY * myConnectivity = myMesh->getConnectivityptr(); + affiche_connectivity(myConnectivity, myMesh); + CONNECTIVITY * myConnectivity2 = new CONNECTIVITY(* myConnectivity); + affiche_connectivity(myConnectivity2, myMesh); + delete myConnectivity;//myConnectivity utile pour afficher myConnectivity2 via myMesh! + + return 0; +} diff --git a/src/MEDMEM/test_copie_coordinate.cxx b/src/MEDMEM/test_copie_coordinate.cxx new file mode 100644 index 000000000..56e2ea1e2 --- /dev/null +++ b/src/MEDMEM/test_copie_coordinate.cxx @@ -0,0 +1,110 @@ +using namespace std; +/* Programme de test du constructeur de copies de la classe COORDINATE de MEDMEM + jroy - 17/12/2002 */ + +#include + +#include +#include + +#include "MEDMEM_Exception.hxx" +#include "MEDMEM_Mesh.hxx" +#include "MEDMEM_Family.hxx" +#include "MEDMEM_Group.hxx" + +#include "MEDMEM_MedMeshDriver.hxx" +#include "MEDMEM_MedFieldDriver.hxx" +#include "MEDMEM_Support.hxx" +#include "MEDMEM_Field.hxx" +#include "MEDMEM_define.hxx" + + +void affiche_tableau(const double * myArray, int nb_lignes, int nb_colonnes) +{ + cout << "Nombre de lignes : " << nb_lignes << endl; + cout << "Nombre de colonnes : " << nb_colonnes << endl; + cout << "Valeurs :" << endl; + + for (int i=0; igetLeadingValue(); + //int _numberofNodes = (int) myCoordinate.getCoordinatePtr()->getLengthValue(); + cout << "- Nom des coordonnées : " << endl; + for (int i=1; i<=_spaceDimension; i++) + cout << i << " " << myCoordinate.getCoordinateName(i) << endl; + // cout< * myMedArray = new MEDARRAY(spaceDimension,numberofNodes,mode); + for (med_int i=1; i<=myMedArray->getLengthValue(); i++) { + for (med_int j=1; j<=myMedArray->getLeadingValue(); j++) + myMedArray->setIJ(i,j,(double) random()); + }; + + //construction noms des coordonnées + string * myCoordinatesNames = new string[spaceDimension]; + if (spaceDimension >= 1) myCoordinatesNames[0] = "x"; + if (spaceDimension >= 2) myCoordinatesNames[1] = "y"; + if (spaceDimension >= 3) myCoordinatesNames[2] = "z"; + + //construction unités des coordonnées + string * myCoordinatesUnits = new string[spaceDimension]; + if (spaceDimension >= 1) myCoordinatesUnits[0] = "m"; + if (spaceDimension >= 2) myCoordinatesUnits[1] = "m"; + if (spaceDimension >= 3) myCoordinatesUnits[2] = "m"; + + //construction des indices des noeuds + int * myNodeNumber = new int[numberofNodes]; + for (int i=0; isetCoordinates(myMedArray); + myCoordinate->setCoordinatesNames(myCoordinatesNames); + myCoordinate->setCoordinatesUnits(myCoordinatesUnits); + myCoordinate->setNodesNumbers(myNodeNumber); + + // myCoordinate->setCoordinatesNames((string *)NULL); + // myCoordinate->setNodesNumbers((int *) NULL); + + affiche_coordinate(* myCoordinate,numberofNodes,spaceDimension); + COORDINATE * myCoordinate2 = new COORDINATE(* myCoordinate); + delete myCoordinate; + affiche_coordinate(* myCoordinate2,numberofNodes,spaceDimension); + + return 0; +} diff --git a/src/MEDMEM/test_copie_family.cxx b/src/MEDMEM/test_copie_family.cxx new file mode 100644 index 000000000..047ef2c94 --- /dev/null +++ b/src/MEDMEM/test_copie_family.cxx @@ -0,0 +1,126 @@ +using namespace std; +#include + +#include +#include + +#include "MEDMEM_Exception.hxx" +#include "MEDMEM_Mesh.hxx" +#include "MEDMEM_Family.hxx" +#include "MEDMEM_Group.hxx" + +#include "MEDMEM_MedMeshDriver.hxx" +#include "MEDMEM_MedFieldDriver.hxx" +#include "MEDMEM_Support.hxx" +#include "MEDMEM_Field.hxx" +#include "MEDMEM_define.hxx" + + +void affiche_support(SUPPORT * mySupport) +{ + cout << " - Name : "<getName().c_str()<getDescription().c_str()<getEntity()<isOnAllElements())) { + int NumberOfTypes = mySupport->getNumberOfTypes() ; + cout<<" - NumberOfTypes : "<getTypes() ; + for (int j=0;jgetNumberOfElements(Types[j]) ; + int * Number = mySupport->getNumber(Types[j]) ; + for (int k=0; kgetIdentifier()<getNumberOfAttributes() ; + cout << " - Attributes ("<getAttributeIdentifier(j)<<" : "<getAttributeValue(j)<<", "<getAttributeDescription(j).c_str()<getNumberOfGroups() ; + cout << " - Groups ("<getGroupName(j).c_str()<getNumberOfGroups(Entity) ; + cout << "NumberOfGroups : "<getGroup(Entity,i); + affiche_support(myGroup); + int NumberOfFamillies = myGroup->getNumberOfFamilies() ; + cout << " - Families ("<getFamily(j)->getName().c_str()<setName(meshname); + MED_MESH_RDONLY_DRIVER myMeshDriver(filename,myMesh) ; + myMeshDriver.setMeshName(meshname); + myMeshDriver.open() ; + myMeshDriver.read() ; + myMeshDriver.close() ; + + FAMILY * myFamily = myMesh->getFamily(MED_NODE,1); + //On renseigne les attributs spécifiques à FAMILY (p/r à SUPPORT) et non renseignés lors de la lecture du maillage + int NumberOfAttribute = 3; + int *AttributeIdentifier = new int[NumberOfAttribute]; + int *AttributeValue = new int[NumberOfAttribute]; + string *AttributeDescription = new string[NumberOfAttribute]; + char *tmp; + for (int i=0;isetNumberOfAttributes(NumberOfAttribute); + myFamily->setAttributesIdentifiers (AttributeIdentifier); + myFamily->setAttributesValues (AttributeValue); + myFamily->setAttributesDescriptions (AttributeDescription); + + cout << "Show Family :"< + +#include +#include + +#include "MEDMEM_Exception.hxx" +#include "MEDMEM_Mesh.hxx" +#include "MEDMEM_Family.hxx" +#include "MEDMEM_Group.hxx" + +#include "MEDMEM_MedMeshDriver.hxx" +#include "MEDMEM_MedFieldDriver.hxx" +#include "MEDMEM_Support.hxx" +#include "MEDMEM_Field.hxx" +#include "MEDMEM_define.hxx" + + +void affiche_field_(FIELD_ * myField, const SUPPORT * mySupport) +{ + cout << "Field "<< myField->getName() << " : " <getDescription() << endl ; + int NumberOfComponents = myField->getNumberOfComponents() ; + cout << "- Nombre de composantes : "<< NumberOfComponents << endl ; + for (int i=1; igetComponentName(i)<< endl; + cout << " - description : "<getComponentDescription(i) << endl; + cout << " - units : "<getMEDComponentUnit(i) << endl; + } + cout << "- iteration :" << endl ; + cout << " - numero : " << myField->getIterationNumber()<< endl ; + cout << " - ordre : " << myField->getOrderNumber()<< endl ; + cout << " - temps : " << myField->getTime()<< endl ; + + cout << "- Type : " << myField->getValueType()<< endl; + + cout << "- Adresse support : " << mySupport << endl; +} + +void affiche_fieldT(FIELD * myField, const SUPPORT * mySupport) +{ + affiche_field_((FIELD_ *) myField, mySupport); + + cout << "- Valeurs :"<getNumberOfElements(MED_ALL_ELEMENTS); + int NumberOfComponents = myField->getNumberOfComponents() ; + + for (int i=1; igetValueI(MED_FULL_INTERLACE,i) ; + for (int j=0; jsetName(meshname); + MED_MESH_RDONLY_DRIVER myMeshDriver(filename,myMesh) ; + myMeshDriver.setMeshName(meshname); + myMeshDriver.open() ; + myMeshDriver.read() ; + myMeshDriver.close() ; + + // read field : + if (argc != 4) exit(0) ; + // else we have a field ! + string fieldname = argv[3]; + + // SUPPORT * mySupport = new SUPPORT(myMesh,"On_all_node",MED_NODE); + SUPPORT * mySupport = new SUPPORT(myMesh,"On_all_cell",MED_CELL); + FIELD * myField = new FIELD() ; + + myField->setName(fieldname); + myField->setSupport(mySupport); + MED_FIELD_RDONLY_DRIVER myFieldDriver(filename,myField) ; + myFieldDriver.setFieldName(fieldname); + myFieldDriver.open() ; + + try { + myFieldDriver.read() ; + } catch (...) { + delete mySupport ; + mySupport = new SUPPORT(myMesh,"On_all_node",MED_NODE); + myField->setSupport(mySupport); + try { + myFieldDriver.read() ; + } catch (...) { + cout << "Field " << fieldname << " not found !!!" << endl ; + exit (-1) ; + } + } + + myFieldDriver.close() ; + + affiche_fieldT(myField, mySupport); + FIELD * myField2 = new FIELD(* myField); + delete myField; + affiche_fieldT(myField2, myField2->getSupport()); + delete myField2; + + return 0; +} diff --git a/src/MEDMEM/test_copie_field_.cxx b/src/MEDMEM/test_copie_field_.cxx new file mode 100644 index 000000000..ac68a0b25 --- /dev/null +++ b/src/MEDMEM/test_copie_field_.cxx @@ -0,0 +1,125 @@ +using namespace std; +/* Programme de test du constructeur de copies de la classe FIELD_ de MEDMEM + jroy - 12/12/2002 */ + +#include + +#include +#include + +#include "MEDMEM_Exception.hxx" +#include "MEDMEM_Mesh.hxx" +#include "MEDMEM_Family.hxx" +#include "MEDMEM_Group.hxx" + +#include "MEDMEM_MedMeshDriver.hxx" +#include "MEDMEM_MedFieldDriver.hxx" +#include "MEDMEM_Support.hxx" +#include "MEDMEM_Field.hxx" +#include "MEDMEM_define.hxx" + + +void affiche_field(FIELD_ * myField, const SUPPORT * mySupport) +{ + cout << "Field "<< myField->getName() << " : " <getDescription() << endl ; + int NumberOfComponents = myField->getNumberOfComponents() ; + cout << "- Nombre de composantes : "<< NumberOfComponents << endl ; + for (int i=1; igetComponentName(i)<< endl; + cout << " - description : "<getComponentDescription(i) << endl; + cout << " - units : "<getMEDComponentUnit(i) << endl; + } + cout << "- iteration :" << endl ; + cout << " - numero : " << myField->getIterationNumber()<< endl ; + cout << " - ordre : " << myField->getOrderNumber()<< endl ; + cout << " - temps : " << myField->getTime()<< endl ; + + cout << "- Type : " << myField->getValueType()<< endl; + /* + cout << "- Valeurs :"<getNumberOfElements(MED_ALL_ELEMENTS); + + for (int i=1; igetValueI(MED_FULL_INTERLACE,i) ; + for (int j=0; jsetName(meshname); + MED_MESH_RDONLY_DRIVER myMeshDriver(filename,myMesh) ; + myMeshDriver.setMeshName(meshname); + myMeshDriver.open() ; + myMeshDriver.read() ; + myMeshDriver.close() ; + + // int drv = myMesh->addDriver(MED_DRIVER,"sortie.med",meshname); + // myMesh->write(drv); + + + + + // if (argc < 4) return 0; + + // read field : + + if (argc != 4) exit(0) ; + // else we have a field ! + + string fieldname = argv[3]; + + + // SUPPORT * mySupport = new SUPPORT(myMesh,"On_all_node",MED_NODE); + SUPPORT * mySupport = new SUPPORT(myMesh,"On_all_cell",MED_CELL); + FIELD * myField = new FIELD() ; + + myField->setName(fieldname); + myField->setSupport(mySupport); + MED_FIELD_RDONLY_DRIVER myFieldDriver(filename,myField) ; + myFieldDriver.setFieldName(fieldname); + myFieldDriver.open() ; + + try { + myFieldDriver.read() ; + } catch (...) { + delete mySupport ; + mySupport = new SUPPORT(myMesh,"On_all_node",MED_NODE); + myField->setSupport(mySupport); + try { + myFieldDriver.read() ; + } catch (...) { + cout << "Field " << fieldname << " not found !!!" << endl ; + exit (-1) ; + } + } + + myFieldDriver.close() ; + + FIELD_ * pt_field_ = myField; + affiche_field(pt_field_, mySupport); + FIELD_ * pt_field_2 = new FIELD_(* pt_field_); + delete myField; + affiche_field(pt_field_2, pt_field_2->getSupport()); + + return 0; +} diff --git a/src/MEDMEM/test_copie_group.cxx b/src/MEDMEM/test_copie_group.cxx new file mode 100644 index 000000000..3238ea150 --- /dev/null +++ b/src/MEDMEM/test_copie_group.cxx @@ -0,0 +1,95 @@ +using namespace std; +#include + +#include +#include + +#include "MEDMEM_Exception.hxx" +#include "MEDMEM_Mesh.hxx" +#include "MEDMEM_Family.hxx" +#include "MEDMEM_Group.hxx" + +#include "MEDMEM_MedMeshDriver.hxx" +#include "MEDMEM_MedFieldDriver.hxx" +#include "MEDMEM_Support.hxx" +#include "MEDMEM_Field.hxx" +#include "MEDMEM_define.hxx" + + +void affiche_support(SUPPORT * mySupport) +{ + cout << " - Name : "<getName().c_str()<getDescription().c_str()<getEntity()<isOnAllElements())) { + int NumberOfTypes = mySupport->getNumberOfTypes() ; + cout<<" - NumberOfTypes : "<getTypes() ; + for (int j=0;jgetNumberOfElements(Types[j]) ; + int * Number = mySupport->getNumber(Types[j]) ; + for (int k=0; kgetIdentifier()<getNumberOfAttributes() ; + cout << " - Attributes ("<getAttributeIdentifier(j)<<" : "<getAttributeValue(j)<<", "<getAttributeDescription(j).c_str()<getNumberOfGroups() ; + cout << " - Groups ("<getGroupName(j).c_str()<getNumberOfFamilies() ; + cout << " - Families ("<getFamily(j)->getName().c_str()<setName(meshname); + MED_MESH_RDONLY_DRIVER myMeshDriver(filename,myMesh) ; + myMeshDriver.setMeshName(meshname); + myMeshDriver.open() ; + myMeshDriver.read() ; + myMeshDriver.close() ; + + GROUP * myGroup = myMesh->getGroup(MED_NODE,1); + cout << "Show Group :"< + +#include +#include + +#include "MEDMEM_Exception.hxx" +#include "MEDMEM_Mesh.hxx" +#include "MEDMEM_Family.hxx" +#include "MEDMEM_Group.hxx" + +#include "MEDMEM_MedMeshDriver.hxx" +#include "MEDMEM_MedFieldDriver.hxx" +#include "MEDMEM_Support.hxx" +#include "MEDMEM_Field.hxx" +#include "MEDMEM_define.hxx" + + +void affiche_medarray(MEDARRAY & myMedArray) +{ + int numberof ; + MESSAGE("Show all 1 :"); + numberof = myMedArray.getLeadingValue() ; + for (int i=1; i<=myMedArray.getLengthValue() ; i++) { + double * node = myMedArray.getI(MED_FULL_INTERLACE,i) ; + cout << " - " ; + for (int j=0;j * myMedArray = new MEDARRAY(dimension,nb_noeuds,mode); + for (med_int i=1; i<=myMedArray->getLengthValue(); i++) { + for (med_int j=1; j<=myMedArray->getLeadingValue(); j++) + myMedArray->setIJ(i,j,(double) random()); + }; + + affiche_medarray(* myMedArray); + MEDARRAY * myMedArray2 = new MEDARRAY(* myMedArray); + delete myMedArray; + affiche_medarray(* myMedArray2); + delete myMedArray2; + + return 0; +} diff --git a/src/MEDMEM/test_copie_support.cxx b/src/MEDMEM/test_copie_support.cxx new file mode 100644 index 000000000..7256e5e67 --- /dev/null +++ b/src/MEDMEM/test_copie_support.cxx @@ -0,0 +1,161 @@ +using namespace std; +#include + +#include +#include + +#include "MEDMEM_Exception.hxx" +#include "MEDMEM_Mesh.hxx" +#include "MEDMEM_Family.hxx" +#include "MEDMEM_Group.hxx" + +#include "MEDMEM_MedMeshDriver.hxx" +#include "MEDMEM_MedFieldDriver.hxx" +#include "MEDMEM_Support.hxx" +#include "MEDMEM_Field.hxx" +#include "MEDMEM_define.hxx" + + +void affiche_support(SUPPORT * mySupport) +{ + cout << " - Name : "<getName().c_str()<getDescription().c_str()<getEntity()<isOnAllElements())) { + int NumberOfTypes = mySupport->getNumberOfTypes() ; + cout<<" - NumberOfTypes : "<getTypes() ; + for (int j=0;jgetNumberOfElements(Types[j]) ; + int * Number = mySupport->getNumber(Types[j]) ; + for (int k=0; kgetNumberOfFamilies(Entity) ; + cout << "NumberOfFamilies : "<getFamily(Entity,i); + affiche_support(myFamily); + cout << " - Identifier : "<getIdentifier()<getNumberOfAttributes() ; + cout << " - Attributes ("<getAttributeIdentifier(j)<<" : "<getAttributeValue(j)<<", "<getAttributeDescription(j).c_str()<getNumberOfGroups() ; + cout << " - Groups ("<getGroupName(j).c_str()<getNumberOfGroups(Entity) ; + cout << "NumberOfGroups : "<getGroup(Entity,i); + affiche_support(myGroup); + int NumberOfFamillies = myGroup->getNumberOfFamilies() ; + cout << " - Families ("<getFamily(j)->getName().c_str()<setName(meshname); + MED_MESH_RDONLY_DRIVER myMeshDriver(filename,myMesh) ; + myMeshDriver.setMeshName(meshname); + myMeshDriver.open() ; + myMeshDriver.read() ; + myMeshDriver.close() ; + + //Construction d'un support total + SUPPORT * mySupport = new SUPPORT(myMesh,"Support on CELLs",MED_CELL); + + cout << "Show Support on all :"<setAll(false); + + // int NumberOfGeometricType = 1; + int NumberOfGeometricType = 0; + // int TotalNumberOfEntity = 2; + // medGeometryElement * GeometricTypePartial = new medGeometryElement[NumberOfGeometricType]; + // GeometricTypePartial[0] = MED_HEXA8; + medGeometryElement * GeometricType = myMesh->getTypes(MED_CELL); + int TotalNumberOfEntity = 0; + int * NumberOfEntity = new int[myMesh->getNumberOfTypes(MED_CELL)]; + // NumberOfEntity[0] = 2; + // int * NumberValue = new int[TotalNumberOfEntity]; + int * NumberValue = new int[myMesh->getGlobalNumberingIndex(MED_CELL)[myMesh->getNumberOfTypes(MED_CELL)]-1]; + // NumberValue[0] = 14; + // NumberValue[1] = 15; + int cmp = 0; + medGeometryElement * GeometricTypePartial = new medGeometryElement[myMesh->getNumberOfTypes(MED_CELL)]; + for (int i=0;igetNumberOfTypes(MED_CELL);i=i+2) + { + NumberOfGeometricType=NumberOfGeometricType+1; + TotalNumberOfEntity=TotalNumberOfEntity+myMesh->getNumberOfElements(MED_CELL,GeometricType[i]); + NumberOfEntity[i/2]=myMesh->getNumberOfElements(MED_CELL,GeometricType[i]); + for (int j=0;jgetNumberOfElements(MED_CELL,GeometricType[i]);j++) + { + NumberValue[cmp]=myMesh->getGlobalNumberingIndex(MED_CELL)[i]+j; + cmp=cmp+1; + } + GeometricTypePartial[i/2]=GeometricType[i]; + } + + mySupport->setpartial("Support partiel",NumberOfGeometricType,TotalNumberOfEntity,GeometricTypePartial,NumberOfEntity,NumberValue); + + cout << "Show Partial Support :"<() +{ + BEGIN_OF("Default Constructor (for Python API) MED_FIELDDOUBLE_DRIVER"); + + END_OF("Default Constructor (for Python API) MED_FIELDDOUBLE_DRIVER"); +} +//============================================================================= +/*! + * Constructor with arguments + */ +//============================================================================= +MED_FIELDDOUBLE_DRIVER::MED_FIELDDOUBLE_DRIVER(const string & fileName, + FIELDDOUBLE * ptrField, + med_mode_acces accessMode) : + MED_FIELD_DRIVER(fileName,(FIELD *) ptrField,accessMode) +{ + BEGIN_OF("Constructor with arguments (for Python API) MED_FIELDDOUBLE_DRIVER"); + + END_OF("Constructor with arguments (for Python API) MED_FIELDDOUBLE_DRIVER"); +} +//============================================================================= +/*! + * Destructor + */ +//============================================================================= +MED_FIELDDOUBLE_DRIVER::~MED_FIELDDOUBLE_DRIVER() +{ + BEGIN_OF("Default Destructor (for Python API) MED_FIELDDOUBLE_DRIVER"); + + END_OF("Default Destructor (for Python API) MED_FIELDDOUBLE_DRIVER"); +} +//============================================================================= +/*! + * Default constructor + */ +//============================================================================= +MED_FIELDDOUBLE_RDONLY_DRIVER::MED_FIELDDOUBLE_RDONLY_DRIVER() : + MED_FIELD_RDONLY_DRIVER() +{ + BEGIN_OF("Default Constructor (for Python API) MED_FIELDDOUBLE_RDONLY_DRIVER"); + + END_OF("Default Constructor (for Python API) MED_FIELDDOUBLE_RDONLY_DRIVER"); +} +//============================================================================= +/*! + * Constructor with arguments + */ +//============================================================================= +MED_FIELDDOUBLE_RDONLY_DRIVER::MED_FIELDDOUBLE_RDONLY_DRIVER(const string & fileName, + FIELDDOUBLE * ptrField) : + MED_FIELD_RDONLY_DRIVER(fileName,(FIELD *) ptrField) +{ + BEGIN_OF("Constructor with arguments (for Python API) MED_FIELDDOUBLE_RDONLY_DRIVER"); + + END_OF("Constructor with arguments (for Python API) MED_FIELDDOUBLE_RDONLY_DRIVER"); +} +//============================================================================= +/*! + * Destructor + */ +//============================================================================= +MED_FIELDDOUBLE_RDONLY_DRIVER::~MED_FIELDDOUBLE_RDONLY_DRIVER() +{ + BEGIN_OF("Default Destructor (for Python API) MED_FIELDDOUBLE_RDONLY_DRIVER"); + + END_OF("Default Destructor (for Python API) MED_FIELDDOUBLE_RDONLY_DRIVER"); +} +//============================================================================= +/*! + * Default constructor + */ +//============================================================================= +MED_FIELDDOUBLE_WRONLY_DRIVER::MED_FIELDDOUBLE_WRONLY_DRIVER() : + MED_FIELD_WRONLY_DRIVER() +{ + BEGIN_OF("Default Constructor (for Python API) MED_FIELDDOUBLE_WRONLY_DRIVER"); + + END_OF("Default Constructor (for Python API) MED_FIELDDOUBLE_WRONLY_DRIVER"); +} +//============================================================================= +/*! + * Constructor with arguments + */ +//============================================================================= +MED_FIELDDOUBLE_WRONLY_DRIVER::MED_FIELDDOUBLE_WRONLY_DRIVER(const string & fileName, + FIELDDOUBLE * ptrField) : + MED_FIELD_WRONLY_DRIVER(fileName,(FIELD *) ptrField) +{ + BEGIN_OF("Constructor with arguments (for Python API) MED_FIELDDOUBLE_WRONLY_DRIVER"); + + END_OF("Constructor with arguments (for Python API) MED_FIELDDOUBLE_WRONLY_DRIVER"); +} +//============================================================================= +/*! + * Destructor + */ +//============================================================================= +MED_FIELDDOUBLE_WRONLY_DRIVER::~MED_FIELDDOUBLE_WRONLY_DRIVER() +{ + BEGIN_OF("Default Destructor (for Python API) MED_FIELDDOUBLE_WRONLY_DRIVER"); + + END_OF("Default Destructor (for Python API) MED_FIELDDOUBLE_WRONLY_DRIVER"); +} +//============================================================================= +/*! + * Default constructor + */ +//============================================================================= +MED_FIELDDOUBLE_RDWR_DRIVER::MED_FIELDDOUBLE_RDWR_DRIVER() : + MED_FIELD_RDWR_DRIVER() +{ + BEGIN_OF("Default Constructor (for Python API) MED_FIELDDOUBLE_RDWR_DRIVER"); + + END_OF("Default Constructor (for Python API) MED_FIELDDOUBLE_RDWR_DRIVER"); +} +//============================================================================= +/*! + * Constructor with arguments + */ +//============================================================================= +MED_FIELDDOUBLE_RDWR_DRIVER::MED_FIELDDOUBLE_RDWR_DRIVER(const string & fileName, + FIELDDOUBLE * ptrField) : + MED_FIELD_RDWR_DRIVER(fileName,(FIELD *) ptrField) +{ + BEGIN_OF("Constructor with arguments (for Python API) MED_FIELDDOUBLE_RDWR_DRIVER"); + + END_OF("Constructor with arguments (for Python API) MED_FIELDDOUBLE_RDWR_DRIVER"); +} +//============================================================================= +/*! + * Destructor + */ +//============================================================================= +MED_FIELDDOUBLE_RDWR_DRIVER::~MED_FIELDDOUBLE_RDWR_DRIVER() +{ + BEGIN_OF("Default Destructor (for Python API) MED_FIELDDOUBLE_RDWR_DRIVER"); + + END_OF("Default Destructor (for Python API) MED_FIELDDOUBLE_RDWR_DRIVER"); +} diff --git a/src/MEDMEM_SWIG/MEDMEM_SWIG_MedFieldDoubleDriver.hxx b/src/MEDMEM_SWIG/MEDMEM_SWIG_MedFieldDoubleDriver.hxx new file mode 100644 index 000000000..65e5d6573 --- /dev/null +++ b/src/MEDMEM_SWIG/MEDMEM_SWIG_MedFieldDoubleDriver.hxx @@ -0,0 +1,51 @@ +#ifndef MEDMEM_SWIG_MEDFIELDDOUBLEDRIVER_HXX_ +#define MEDMEM_SWIG_MEDFIELDDOUBLEDRIVER_HXX_ + +#include "MEDMEM_MedFieldDriver.hxx" +#include "MEDMEM_SWIG_FieldDouble.hxx" + +class MED_FIELDDOUBLE_DRIVER : public MED_FIELD_DRIVER +{ +public: + MED_FIELDDOUBLE_DRIVER(); + + MED_FIELDDOUBLE_DRIVER(const string & fileName, FIELDDOUBLE * ptrField, + med_mode_acces accessMode); + + ~MED_FIELDDOUBLE_DRIVER(); +}; + +class MED_FIELDDOUBLE_RDONLY_DRIVER : public MED_FIELD_RDONLY_DRIVER +{ +public: + MED_FIELDDOUBLE_RDONLY_DRIVER(); + + MED_FIELDDOUBLE_RDONLY_DRIVER(const string & fileName, + FIELDDOUBLE * ptrField); + + ~MED_FIELDDOUBLE_RDONLY_DRIVER(); +}; + +class MED_FIELDDOUBLE_WRONLY_DRIVER : public MED_FIELD_WRONLY_DRIVER +{ +public: + MED_FIELDDOUBLE_WRONLY_DRIVER(); + + MED_FIELDDOUBLE_WRONLY_DRIVER(const string & fileName, + FIELDDOUBLE * ptrField); + + ~MED_FIELDDOUBLE_WRONLY_DRIVER(); +}; + +class MED_FIELDDOUBLE_RDWR_DRIVER : public MED_FIELD_RDWR_DRIVER +{ +public: + MED_FIELDDOUBLE_RDWR_DRIVER(); + + MED_FIELDDOUBLE_RDWR_DRIVER(const string & fileName, + FIELDDOUBLE * ptrField); + + ~MED_FIELDDOUBLE_RDWR_DRIVER(); +}; + +#endif /* MEDMEM_SWIG_MEDFIELDDOUBLEDRIVER_HXX_ */ diff --git a/src/MEDMEM_SWIG/MEDMEM_SWIG_MedFieldIntDriver.cxx b/src/MEDMEM_SWIG/MEDMEM_SWIG_MedFieldIntDriver.cxx new file mode 100644 index 000000000..87b25165d --- /dev/null +++ b/src/MEDMEM_SWIG/MEDMEM_SWIG_MedFieldIntDriver.cxx @@ -0,0 +1,147 @@ +using namespace std; +#include "MEDMEM_SWIG_MedFieldIntDriver.hxx" + +//============================================================================= +/*! + * Default constructor + */ +//============================================================================= +MED_FIELDINT_DRIVER::MED_FIELDINT_DRIVER() : MED_FIELD_DRIVER() +{ + BEGIN_OF("Default Constructor (for Python API) MED_FIELDINT_DRIVER"); + + END_OF("Default Constructor (for Python API) MED_FIELDINT_DRIVER"); +} +//============================================================================= +/*! + * Constructor with arguments + */ +//============================================================================= +MED_FIELDINT_DRIVER::MED_FIELDINT_DRIVER(const string & fileName, + FIELDINT * ptrField, + med_mode_acces accessMode) : + MED_FIELD_DRIVER(fileName,(FIELD *) ptrField,accessMode) +{ + BEGIN_OF("Constructor with arguments (for Python API) MED_FIELDINT_DRIVER"); + + END_OF("Constructor with arguments (for Python API) MED_FIELDINT_DRIVER"); +} +//============================================================================= +/*! + * Destructor + */ +//============================================================================= +MED_FIELDINT_DRIVER::~MED_FIELDINT_DRIVER() +{ + BEGIN_OF("Default Destructor (for Python API) MED_FIELDINT_DRIVER"); + + END_OF("Default Destructor (for Python API) MED_FIELDINT_DRIVER"); +} +//============================================================================= +/*! + * Default constructor + */ +//============================================================================= +MED_FIELDINT_RDONLY_DRIVER::MED_FIELDINT_RDONLY_DRIVER() : + MED_FIELD_RDONLY_DRIVER() +{ + BEGIN_OF("Default Constructor (for Python API) MED_FIELDINT_RDONLY_DRIVER"); + + END_OF("Default Constructor (for Python API) MED_FIELDINT_RDONLY_DRIVER"); +} +//============================================================================= +/*! + * Constructor with arguments + */ +//============================================================================= +MED_FIELDINT_RDONLY_DRIVER::MED_FIELDINT_RDONLY_DRIVER(const string & fileName, + FIELDINT * ptrField) : + MED_FIELD_RDONLY_DRIVER(fileName,(FIELD *) ptrField) +{ + BEGIN_OF("Constructor with arguments (for Python API) MED_FIELDINT_RDONLY_DRIVER"); + + END_OF("Constructor with arguments (for Python API) MED_FIELDINT_RDONLY_DRIVER"); +} +//============================================================================= +/*! + * Destructor + */ +//============================================================================= +MED_FIELDINT_RDONLY_DRIVER::~MED_FIELDINT_RDONLY_DRIVER() +{ + BEGIN_OF("Default Destructor (for Python API) MED_FIELDINT_RDONLY_DRIVER"); + + END_OF("Default Destructor (for Python API) MED_FIELDINT_RDONLY_DRIVER"); +} +//============================================================================= +/*! + * Default constructor + */ +//============================================================================= +MED_FIELDINT_WRONLY_DRIVER::MED_FIELDINT_WRONLY_DRIVER() : + MED_FIELD_WRONLY_DRIVER() +{ + BEGIN_OF("Default Constructor (for Python API) MED_FIELDINT_WRONLY_DRIVER"); + + END_OF("Default Constructor (for Python API) MED_FIELDINT_WRONLY_DRIVER"); +} +//============================================================================= +/*! + * Constructor with arguments + */ +//============================================================================= +MED_FIELDINT_WRONLY_DRIVER::MED_FIELDINT_WRONLY_DRIVER(const string & fileName, + FIELDINT * ptrField) : + MED_FIELD_WRONLY_DRIVER(fileName,(FIELD *) ptrField) +{ + BEGIN_OF("Constructor with arguments (for Python API) MED_FIELDINT_WRONLY_DRIVER"); + + END_OF("Constructor with arguments (for Python API) MED_FIELDINT_WRONLY_DRIVER"); +} +//============================================================================= +/*! + * Destructor + */ +//============================================================================= +MED_FIELDINT_WRONLY_DRIVER::~MED_FIELDINT_WRONLY_DRIVER() +{ + BEGIN_OF("Default Destructor (for Python API) MED_FIELDINT_WRONLY_DRIVER"); + + END_OF("Default Destructor (for Python API) MED_FIELDINT_WRONLY_DRIVER"); +} +//============================================================================= +/*! + * Default constructor + */ +//============================================================================= +MED_FIELDINT_RDWR_DRIVER::MED_FIELDINT_RDWR_DRIVER() : + MED_FIELD_RDWR_DRIVER() +{ + BEGIN_OF("Default Constructor (for Python API) MED_FIELDINT_RDWR_DRIVER"); + + END_OF("Default Constructor (for Python API) MED_FIELDINT_RDWR_DRIVER"); +} +//============================================================================= +/*! + * Constructor with arguments + */ +//============================================================================= +MED_FIELDINT_RDWR_DRIVER::MED_FIELDINT_RDWR_DRIVER(const string & fileName, + FIELDINT * ptrField) : + MED_FIELD_RDWR_DRIVER(fileName,(FIELD *) ptrField) +{ + BEGIN_OF("Constructor with arguments (for Python API) MED_FIELDINT_RDWR_DRIVER"); + + END_OF("Constructor with arguments (for Python API) MED_FIELDINT_RDWR_DRIVER"); +} +//============================================================================= +/*! + * Destructor + */ +//============================================================================= +MED_FIELDINT_RDWR_DRIVER::~MED_FIELDINT_RDWR_DRIVER() +{ + BEGIN_OF("Default Destructor (for Python API) MED_FIELDINT_RDWR_DRIVER"); + + END_OF("Default Destructor (for Python API) MED_FIELDINT_RDWR_DRIVER"); +} diff --git a/src/MEDMEM_SWIG/MEDMEM_SWIG_MedFieldIntDriver.hxx b/src/MEDMEM_SWIG/MEDMEM_SWIG_MedFieldIntDriver.hxx new file mode 100644 index 000000000..bb43c893f --- /dev/null +++ b/src/MEDMEM_SWIG/MEDMEM_SWIG_MedFieldIntDriver.hxx @@ -0,0 +1,51 @@ +#ifndef MEDMEM_SWIG_MEDFIELDINTDRIVER_HXX_ +#define MEDMEM_SWIG_MEDFIELDINTDRIVER_HXX_ + +#include "MEDMEM_MedFieldDriver.hxx" +#include "MEDMEM_SWIG_FieldInt.hxx" + +class MED_FIELDINT_DRIVER : public MED_FIELD_DRIVER +{ +public: + MED_FIELDINT_DRIVER(); + + MED_FIELDINT_DRIVER(const string & fileName, FIELDINT * ptrField, + med_mode_acces accessMode); + + ~MED_FIELDINT_DRIVER(); +}; + +class MED_FIELDINT_RDONLY_DRIVER : public MED_FIELD_RDONLY_DRIVER +{ +public: + MED_FIELDINT_RDONLY_DRIVER(); + + MED_FIELDINT_RDONLY_DRIVER(const string & fileName, + FIELDINT * ptrField); + + ~MED_FIELDINT_RDONLY_DRIVER(); +}; + +class MED_FIELDINT_WRONLY_DRIVER : public MED_FIELD_WRONLY_DRIVER +{ +public: + MED_FIELDINT_WRONLY_DRIVER(); + + MED_FIELDINT_WRONLY_DRIVER(const string & fileName, + FIELDINT * ptrField); + + ~MED_FIELDINT_WRONLY_DRIVER(); +}; + +class MED_FIELDINT_RDWR_DRIVER : public MED_FIELD_RDWR_DRIVER +{ +public: + MED_FIELDINT_RDWR_DRIVER(); + + MED_FIELDINT_RDWR_DRIVER(const string & fileName, + FIELDINT * ptrField); + + ~MED_FIELDINT_RDWR_DRIVER(); +}; + +#endif /* MEDMEM_SWIG_MEDFIELDINTDRIVER_HXX_ */ -- 2.39.2