Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/paravis.git] / src / Plugins / MedReader / IO / vtkMedVariableAttribute.cxx
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 #include "vtkMedVariableAttribute.h"
21
22 #include "vtkObjectFactory.h"
23 #include "vtkMedUtilities.h"
24 #include "vtkMedStructElement.h"
25 #include "vtkMedFile.h"
26 #include "vtkMedDriver.h"
27
28 #include <map>
29 #include <string>
30 #include <vector>
31 using namespace std;
32
33 vtkCxxRevisionMacro(vtkMedVariableAttribute, "$Revision$")
34 vtkStandardNewMacro(vtkMedVariableAttribute);
35
36 vtkCxxSetObjectMacro(vtkMedVariableAttribute, ParentStructElement, vtkMedStructElement);
37
38 vtkMedVariableAttribute::vtkMedVariableAttribute()
39 {
40   this->Name = NULL;
41   this->AttributeType = MED_ATT_UNDEF;
42   this->NumberOfComponent = 0;
43   this->ParentStructElement = NULL;
44 }
45
46 vtkMedVariableAttribute::~vtkMedVariableAttribute()
47 {
48   this->SetName(NULL);
49   this->SetParentStructElement(NULL);
50 }
51
52 void  vtkMedVariableAttribute::Load(vtkMedEntityArray* array)
53 {
54   this->GetParentStructElement()->GetParentFile()->GetMedDriver()->LoadVariableAttribute(this, array);
55 }
56
57 void vtkMedVariableAttribute::PrintSelf(ostream& os, vtkIndent indent)
58 {
59   this->Superclass::PrintSelf(os, indent);
60 }