Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/paravis.git] / src / Plugins / MedReader / IO / vtkMedConstantAttribute.h
1 // Copyright (C) 2010-2012  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef __vtkMedConstantAttribute_h_
21 #define __vtkMedConstantAttribute_h_
22
23 #include "vtkObject.h"
24 #include "vtkMed.h"
25
26 class vtkAbstractArray;
27 class vtkMedStructElement;
28 class vtkMedProfile;
29
30 class VTK_EXPORT vtkMedConstantAttribute : public vtkObject
31 {
32 public :
33   static vtkMedConstantAttribute* New();
34   vtkTypeRevisionMacro(vtkMedConstantAttribute, vtkObject)
35   void PrintSelf(ostream& os, vtkIndent indent);
36
37   // Description:
38   // This is the name of this attribute
39   vtkSetStringMacro(Name);
40   vtkGetStringMacro(Name);
41
42   // Description:
43   // The iterator in the med file of this constant attribute
44   vtkSetMacro(MedIterator, med_int);
45   vtkGetMacro(MedIterator, med_int);
46
47   // Description:
48   // The Geometry type this structural elements lies on.
49   vtkSetMacro(AttributeType, med_attribute_type);
50   vtkGetMacro(AttributeType, med_attribute_type);
51
52   // Description:
53   // The dimension of this structural elements model
54   vtkSetMacro(NumberOfComponent, med_int);
55   vtkGetMacro(NumberOfComponent, med_int);
56
57   // Description:
58   // MED_CELL if the support mesh has any cell, MED_NODE otherwise
59   vtkSetMacro(SupportEntityType, med_entity_type);
60   vtkGetMacro(SupportEntityType, med_entity_type);
61
62   // Description:
63   // The name of the profile if any, MED_NO_PROFILE by default
64   vtkSetStringMacro(ProfileName);
65   vtkGetStringMacro(ProfileName);
66
67   // Description:
68   // The Size of the profile if any
69   vtkSetMacro(ProfileSize, med_int);
70   vtkGetMacro(ProfileSize, med_int);
71
72   // Description:
73   // This store the values of this attribute
74   virtual void  SetValues(vtkAbstractArray*);
75   vtkGetObjectMacro(Values, vtkAbstractArray);
76
77   // Description:
78   // This is the pointer to the actual profile used by this attribute
79   virtual void  SetProfile(vtkMedProfile*);
80   vtkGetObjectMacro(Profile, vtkMedProfile);
81
82   // Description:
83   // The Structural element on which lies this attribute
84   virtual void  SetParentStructElement(vtkMedStructElement*);
85   vtkGetObjectMacro(ParentStructElement, vtkMedStructElement);
86
87 protected:
88   vtkMedConstantAttribute();
89   virtual ~vtkMedConstantAttribute();
90
91   char *Name;
92   med_int MedIterator;
93   med_attribute_type AttributeType;
94   med_int NumberOfComponent;
95   med_entity_type SupportEntityType;
96   char* ProfileName;
97   med_int ProfileSize;
98   vtkAbstractArray* Values;
99   vtkMedProfile* Profile;
100
101   vtkMedStructElement * ParentStructElement;
102
103 private:
104   vtkMedConstantAttribute(const vtkMedConstantAttribute&); // Not implemented.
105   void operator=(const vtkMedConstantAttribute&); // Not implemented.
106
107 };
108
109 #endif //__vtkMedConstantAttribute_h_