1 // MED MEDMEM : MED files in memory
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : MEDMEM_SkyLineArray.cxx
28 #include "MEDMEM_SkyLineArray.hxx"
29 #include "utilities.h"
31 MEDSKYLINEARRAY::MEDSKYLINEARRAY(): _count(0), _length(0),
32 _index((med_int*)NULL),_value((med_int*)NULL)
34 MESSAGE("Constructeur MEDSKYLINEARRAY sans parametre");
37 MEDSKYLINEARRAY::MEDSKYLINEARRAY(const MEDSKYLINEARRAY &myArray):
38 _count(myArray._count),_length(myArray._length),
39 _index(_count+1),_value(_length)
41 BEGIN_OF("MEDSKYLINEARRAY(const MEDSKYLINEARRAY &)");
42 memcpy(_index,myArray._index,sizeof(med_int)*(_count+1));
43 memcpy(_value,myArray._value,sizeof(med_int)*_length);
44 END_OF("MEDSKYLINEARRAY(const MEDSKYLINEARRAY &)");
47 MEDSKYLINEARRAY::~MEDSKYLINEARRAY()
49 MESSAGE("Destructeur ~MEDSKYLINEARRAY");
51 //if (_index != NULL) delete [] _index;
52 //if (_value != NULL) delete [] _value;
55 MEDSKYLINEARRAY::MEDSKYLINEARRAY(const med_int count, const med_int length):
56 _count(count), _length(length),
57 _index(_count+1),_value(_length)
59 MESSAGE("Constructeur MEDSKYLINEARRAY(count="<<count<<", length="<<length<<") avec parametres");
62 MEDSKYLINEARRAY::MEDSKYLINEARRAY(const med_int count, const med_int length,
63 const med_int* index, const med_int* value):
64 _count(count), _length(length),
65 _index(_count+1),_value(_length)
67 MESSAGE("Constructeur MEDSKYLINEARRAY(count="<<count<<", length="<<length<<") avec parametres");
68 memcpy((med_int*)_index,index,sizeof(med_int)*(_count+1));
69 memcpy((med_int*)_value,value,sizeof(med_int)*_length);
72 // void MEDSKYLINEARRAY::setMEDSKYLINEARRAY( const med_int count , const med_int length, med_int* index , med_int* value )
74 // MESSAGE("void MEDSKYLINEARRAY::setMEDSKYLINEARRAY(count, length, index, value)");
78 // //if (_index != NULL) delete [] _index;
79 // //if (_value != NULL) delete [] _value;