]> SALOME platform Git repositories - modules/med.git/blob - src/MEDMEM/MEDMEM_Field.cxx
Salome HOME
Initialisation module MED_SRC de la base MED
[modules/med.git] / src / MEDMEM / MEDMEM_Field.cxx
1 #include "MEDMEM_Field.hxx"
2
3 // ---------------------------------
4 // FIELD_ : Constructors
5 // ---------------------------------
6 FIELD_::FIELD_(): 
7   _name(""), _description(""), _support((SUPPORT *)NULL),
8   _numberOfComponents(0), _componentsTypes((int *)NULL),
9   _componentsNames((string *)NULL), 
10   _componentsDescriptions((string *)NULL),
11   _componentsUnits((UNIT*)NULL),
12   _MEDComponentsUnits((string *)NULL),
13   _iterationNumber(-1),_time(0.0),_orderNumber(-1)
14 {
15   MESSAGE("Constructeur FIELD_ sans parametre");
16 }
17
18 FIELD_::FIELD_(const SUPPORT * Support, const int NumberOfComponents):
19   _name(""), _description(""), _support(Support),
20   _numberOfComponents(NumberOfComponents),
21   _iterationNumber(-1),_time(0.0),_orderNumber(-1)
22 {
23   MESSAGE("FIELD_(const SUPPORT * Support, const int NumberOfComponents)");
24
25   _componentsTypes = new int[NumberOfComponents] ;
26   _componentsNames = new string[NumberOfComponents];
27   _componentsDescriptions = new string[NumberOfComponents];
28   _componentsUnits = new UNIT[NumberOfComponents];
29   _MEDComponentsUnits = new string[NumberOfComponents];
30   for(int i=0;i<NumberOfComponents;i++) {
31     _componentsTypes[i] = 0 ;
32   }
33 }
34
35 FIELD_::FIELD_(const FIELD_ &m)
36 {
37   _name = m._name;
38   _description = m._description;
39   _support = m._support;
40   _numberOfComponents = m._numberOfComponents;
41   _componentsTypes = m._componentsTypes;
42   _componentsNames = m._componentsNames;
43   _componentsDescriptions = m._componentsDescriptions;
44   _componentsUnits = m._componentsUnits;
45   _MEDComponentsUnits = m._MEDComponentsUnits;
46   _iterationNumber = m._iterationNumber;
47   _time = m._time;
48   _orderNumber = m._orderNumber;
49   _valueType = m._valueType;
50 }
51
52 FIELD_::~FIELD_()
53 {   
54   MESSAGE("~FIELD_()");
55   if ( _componentsTypes !=NULL)
56     delete[] _componentsTypes ;
57   if ( _componentsNames !=NULL)
58     delete[] _componentsNames ;
59   if ( _componentsDescriptions !=NULL)
60     delete[] _componentsDescriptions ;
61   if ( _componentsUnits !=NULL)
62     delete[] _componentsUnits ;
63   if ( _MEDComponentsUnits !=NULL)
64     delete[] _MEDComponentsUnits ;
65 }
66
67 //  void     FIELD_::setIterationNumber (int IterationNumber)           {};
68 //  void     FIELD_::setOrderNumber     (int OrderNumber)               {}; 
69 //  void     FIELD_::setFieldName       (string& fieldName)             {}; 
70          
71 void     FIELD_::rmDriver           (int index)                     {};
72 int      FIELD_::addDriver          (driverTypes driverType, 
73                                    const string & fileName,
74                                    const string & driverFieldName) {} ;
75 int      FIELD_::addDriver          (GENDRIVER & driver)            {};
76 void     FIELD_::write              (const GENDRIVER &)             {};
77
78 //  void                     FIELD_::setValueType(med_type_champ ValueType) {};
79 //  med_type_champ FIELD_::getValueType() {};