1 // Copyright (C) 2010-2011 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef __vtkMedFile_h_
21 #define __vtkMedFile_h_
23 #include "vtkObject.h"
24 #include "vtkMedSetGet.h"
29 class vtkMedLocalization;
32 class vtkMedStructElement;
35 class VTK_EXPORT vtkMedFile: public vtkObject
38 static vtkMedFile* New();
39 vtkTypeMacro(vtkMedFile, vtkObject)
40 void PrintSelf(ostream& os, vtkIndent indent);
43 // Set the file name to read from
44 vtkSetStringMacro(FileName);
45 vtkGetStringMacro(FileName);
48 // This is the description of this file as stored in the med file.
49 vtkGetObjectMacro(MedDriver, vtkMedDriver);
52 // This method tries to create a new driver for this file.
53 // It returns 1 on success, 0 on failure.
54 virtual int CreateDriver();
57 // read information from this file, and create the meta data structure
58 virtual void ReadInformation();
61 // Container of the meshes.
62 vtkGetObjectVectorMacro(Mesh, vtkMedMesh);
63 vtkSetObjectVectorMacro(Mesh, vtkMedMesh);
64 virtual vtkMedMesh* GetMesh(const char*);
67 // Container of the fields.
68 vtkGetObjectVectorMacro(Field, vtkMedField);
69 vtkSetObjectVectorMacro(Field, vtkMedField);
72 // Container of the fields.
73 vtkGetObjectVectorMacro(Link, vtkMedLink);
74 vtkSetObjectVectorMacro(Link, vtkMedLink);
77 // Container of the profiles.
78 vtkGetObjectVectorMacro(Profile, vtkMedProfile);
79 vtkSetObjectVectorMacro(Profile, vtkMedProfile);
80 virtual vtkMedProfile* GetProfile(const char*);
83 // Container of the quadrature definitions.
84 vtkGetObjectVectorMacro(Localization, vtkMedLocalization);
85 vtkSetObjectVectorMacro(Localization, vtkMedLocalization);
86 virtual vtkMedLocalization* GetLocalization(const char*);
89 // This is the description of this file as stored in the med file.
90 vtkSetStringMacro(Comment);
91 vtkGetStringMacro(Comment);
94 // Those 3 numbers describe the version of med used to create this file.
95 vtkSetMacro(VersionMajor, int);
96 vtkGetMacro(VersionMajor, int);
97 vtkSetMacro(VersionMinor, int);
98 vtkGetMacro(VersionMinor, int);
99 vtkSetMacro(VersionRelease, int);
100 vtkGetMacro(VersionRelease, int);
103 // Get the structural elements models
104 vtkGetObjectVectorMacro(StructElement, vtkMedStructElement);
105 vtkSetObjectVectorMacro(StructElement, vtkMedStructElement);
106 vtkMedStructElement* GetStructElement(const vtkMedEntity&);
109 // Get the support mesh informations
110 vtkGetObjectVectorMacro(SupportMesh, vtkMedMesh);
111 vtkSetObjectVectorMacro(SupportMesh, vtkMedMesh);
115 virtual ~vtkMedFile();
118 vtkMedDriver* MedDriver;
119 virtual void SetMedDriver(vtkMedDriver*);
127 vtkObjectVector<vtkMedMesh>* Mesh;
128 vtkObjectVector<vtkMedField>* Field;
129 vtkObjectVector<vtkMedProfile>* Profile;
130 vtkObjectVector<vtkMedLocalization>* Localization;
131 vtkObjectVector<vtkMedLink>* Link;
132 vtkObjectVector<vtkMedStructElement>* StructElement;
133 vtkObjectVector<vtkMedMesh>* SupportMesh;
137 vtkMedFile(const vtkMedFile&); // Not implemented.
138 void operator=(const vtkMedFile&); // Not implemented.
141 #endif //__vtkMedMetaData_h_