1 #include "MEDMEM_SkyLineArray.hxx"
4 MEDSKYLINEARRAY::MEDSKYLINEARRAY(): _count(0), _length(0),
5 _index((med_int*)NULL),_value((med_int*)NULL)
7 MESSAGE("Constructeur MEDSKYLINEARRAY sans parametre");
10 MEDSKYLINEARRAY::MEDSKYLINEARRAY(const MEDSKYLINEARRAY &myArray)
12 MESSAGE("MEDSKYLINEARRAY(const MEDSKYLINEARRAY &)");
13 _count = myArray._count ;
14 _length = myArray._length ;
15 _index = new med_int[_count+1] ;
16 _value = new med_int[_length] ;
17 memcpy(_index,myArray._index,sizeof(med_int)*(_count+1));
18 memcpy(_value,myArray._value,sizeof(med_int)*_length);
21 MEDSKYLINEARRAY::~MEDSKYLINEARRAY()
23 MESSAGE("Destructeur ~MEDSKYLINEARRAY");
25 if (_index != NULL) delete [] _index;
26 if (_value != NULL) delete [] _value;
29 MEDSKYLINEARRAY::MEDSKYLINEARRAY(const med_int count , const med_int length ) :
30 _count(count), _length(length)
32 MESSAGE("Constructeur MEDSKYLINEARRAY(count="<<count<<", length="<<length<<") avec parametres");
34 _index = new med_int[count+1] ;
35 _value = new med_int[length] ;
38 void MEDSKYLINEARRAY::setMEDSKYLINEARRAY( const med_int count , const med_int length, med_int* index , med_int* value )
40 MESSAGE("void MEDSKYLINEARRAY::setMEDSKYLINEARRAY(count, length, index, value)");
44 if (_index != NULL) delete [] _index;
45 if (_value != NULL) delete [] _value;