Back to index

salome-paravis  6.5.0
vtkMedFile.h
Go to the documentation of this file.
00001 // Copyright (C) 2010-2012  CEA/DEN, EDF R&D
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 #ifndef __vtkMedFile_h_
00021 #define __vtkMedFile_h_
00022 
00023 #include "vtkObject.h"
00024 #include "vtkMedSetGet.h"
00025 
00026 class vtkMedMesh;
00027 class vtkMedField;
00028 class vtkMedProfile;
00029 class vtkMedLocalization;
00030 class vtkMedLink;
00031 class vtkMedDriver;
00032 class vtkMedStructElement;
00033 class vtkMedEntity;
00034 
00035 class VTK_EXPORT vtkMedFile: public vtkObject
00036 {
00037 public:
00038   static vtkMedFile* New();
00039   vtkTypeRevisionMacro(vtkMedFile, vtkObject)
00040   void PrintSelf(ostream& os, vtkIndent indent);
00041 
00042   // Description:
00043   // Set the file name to read from
00044   vtkSetStringMacro(FileName);
00045   vtkGetStringMacro(FileName);
00046 
00047   // Description:
00048   // This is the description of this file as stored in the med file.
00049   vtkGetObjectMacro(MedDriver, vtkMedDriver);
00050 
00051   // Description:
00052   // This method tries to create a new driver for this file.
00053   // It returns 1 on success, 0 on failure.
00054   virtual int CreateDriver();
00055 
00056   // Description:
00057   // read information from this file, and create the meta data structure
00058   virtual void  ReadInformation();
00059 
00060   // Description:
00061   // Container of the meshes.
00062   vtkGetObjectVectorMacro(Mesh, vtkMedMesh);
00063   vtkSetObjectVectorMacro(Mesh, vtkMedMesh);
00064   virtual vtkMedMesh* GetMesh(const char*);
00065 
00066   // Description:
00067   // Container of the fields.
00068   vtkGetObjectVectorMacro(Field, vtkMedField);
00069   vtkSetObjectVectorMacro(Field, vtkMedField);
00070 
00071   // Description:
00072   // Container of the fields.
00073   vtkGetObjectVectorMacro(Link, vtkMedLink);
00074   vtkSetObjectVectorMacro(Link, vtkMedLink);
00075 
00076   // Description:
00077   // Container of the profiles.
00078   vtkGetObjectVectorMacro(Profile, vtkMedProfile);
00079   vtkSetObjectVectorMacro(Profile, vtkMedProfile);
00080   virtual vtkMedProfile*  GetProfile(const char*);
00081 
00082   // Description:
00083   // Container of the quadrature definitions.
00084   vtkGetObjectVectorMacro(Localization, vtkMedLocalization);
00085   vtkSetObjectVectorMacro(Localization, vtkMedLocalization);
00086   virtual vtkMedLocalization* GetLocalization(const char*);
00087 
00088   // Description:
00089   // This is the description of this file as stored in the med file.
00090   vtkSetStringMacro(Comment);
00091   vtkGetStringMacro(Comment);
00092 
00093   // Description:
00094   // Those 3 numbers describe the version of med used to create this file.
00095   vtkSetMacro(VersionMajor, int);
00096   vtkGetMacro(VersionMajor, int);
00097   vtkSetMacro(VersionMinor, int);
00098   vtkGetMacro(VersionMinor, int);
00099   vtkSetMacro(VersionRelease, int);
00100   vtkGetMacro(VersionRelease, int);
00101 
00102   // Description:
00103   // Get the structural elements models
00104   vtkGetObjectVectorMacro(StructElement, vtkMedStructElement);
00105   vtkSetObjectVectorMacro(StructElement, vtkMedStructElement);
00106   vtkMedStructElement* GetStructElement(const vtkMedEntity&);
00107 
00108   // Description:
00109   // Get the support mesh informations
00110   vtkGetObjectVectorMacro(SupportMesh, vtkMedMesh);
00111   vtkSetObjectVectorMacro(SupportMesh, vtkMedMesh);
00112 
00113 protected:
00114   vtkMedFile();
00115   virtual ~vtkMedFile();
00116 
00117   char * FileName;
00118   vtkMedDriver* MedDriver;
00119   virtual void  SetMedDriver(vtkMedDriver*);
00120 
00121   int VersionMajor;
00122   int VersionMinor;
00123   int VersionRelease;
00124 
00125   char* Comment;
00126   //BTX
00127   vtkObjectVector<vtkMedMesh>* Mesh;
00128   vtkObjectVector<vtkMedField>* Field;
00129   vtkObjectVector<vtkMedProfile>* Profile;
00130   vtkObjectVector<vtkMedLocalization>* Localization;
00131   vtkObjectVector<vtkMedLink>* Link;
00132   vtkObjectVector<vtkMedStructElement>* StructElement;
00133   vtkObjectVector<vtkMedMesh>* SupportMesh;
00134   //ETX
00135 
00136 private:
00137   vtkMedFile(const vtkMedFile&); // Not implemented.
00138   void operator=(const vtkMedFile&); // Not implemented.
00139 };
00140 
00141 #endif //__vtkMedMetaData_h_