2 #include "MEDMEM_SkyLineArray.hxx"
4 using namespace MEDMEM;
6 MEDSKYLINEARRAY::MEDSKYLINEARRAY(): _count(0), _length(0),
7 _index((med_int*)NULL),_value((med_int*)NULL)
9 MESSAGE("Constructeur MEDSKYLINEARRAY sans parametre");
12 MEDSKYLINEARRAY::MEDSKYLINEARRAY(const MEDSKYLINEARRAY &myArray):
13 _count(myArray._count),_length(myArray._length),
14 _index(_count+1),_value(_length)
16 BEGIN_OF("MEDSKYLINEARRAY(const MEDSKYLINEARRAY &)");
17 memcpy(_index,myArray._index,sizeof(med_int)*(_count+1));
18 memcpy(_value,myArray._value,sizeof(med_int)*_length);
19 END_OF("MEDSKYLINEARRAY(const MEDSKYLINEARRAY &)");
22 MEDSKYLINEARRAY::~MEDSKYLINEARRAY()
24 MESSAGE("Destructeur ~MEDSKYLINEARRAY");
26 //if (_index != NULL) delete [] _index;
27 //if (_value != NULL) delete [] _value;
30 MEDSKYLINEARRAY::MEDSKYLINEARRAY(const med_int count, const med_int length):
31 _count(count), _length(length),
32 _index(_count+1),_value(_length)
34 MESSAGE("Constructeur MEDSKYLINEARRAY(count="<<count<<", length="<<length<<") avec parametres");
37 MEDSKYLINEARRAY::MEDSKYLINEARRAY(const med_int count, const med_int length,
38 const med_int* index, const med_int* value):
39 _count(count), _length(length),
40 _index(_count+1),_value(_length)
42 MESSAGE("Constructeur MEDSKYLINEARRAY(count="<<count<<", length="<<length<<") avec parametres");
43 memcpy((med_int*)_index,index,sizeof(med_int)*(_count+1));
44 memcpy((med_int*)_value,value,sizeof(med_int)*_length);
47 // void MEDSKYLINEARRAY::setMEDSKYLINEARRAY( const med_int count , const med_int length, med_int* index , med_int* value )
49 // MESSAGE("void MEDSKYLINEARRAY::setMEDSKYLINEARRAY(count, length, index, value)");
53 // //if (_index != NULL) delete [] _index;
54 // //if (_value != NULL) delete [] _value;