]> SALOME platform Git repositories - modules/paravis.git/blob - src/Plugins/MEDReader/IO/vtkMEDReader.h
Salome HOME
More standart code
[modules/paravis.git] / src / Plugins / MEDReader / IO / vtkMEDReader.h
1 // Copyright (C) 2010-2016  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, or (at your option) any later version.
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 // Author : Anthony Geay
20
21 #ifndef __vtkMEDReader_h_
22 #define __vtkMEDReader_h_
23
24 #include <string>
25
26 #include "vtkMultiBlockDataSetAlgorithm.h"
27
28 class vtkDataSet;
29 class vtkMutableDirectedGraph;
30 class vtkInformationDataObjectMetaDataKey;
31 class vtkInformationDoubleVectorKey;
32 class ExportedTinyInfo;
33
34 class VTK_EXPORT vtkMEDReader : public vtkMultiBlockDataSetAlgorithm
35 {
36  private:
37   vtkMEDReader(const vtkMEDReader&); // Not implemented.
38   void operator=(const vtkMEDReader&); // Not implemented.
39  public:
40   static vtkMEDReader *New();
41   vtkTypeMacro(vtkMEDReader, vtkMultiBlockDataSetAlgorithm);
42   void PrintSelf(ostream& os, vtkIndent indent);
43   virtual void SetFileName(const char*);
44   virtual char *GetFileName();
45   virtual const char *GetFileExtensions() { return ".med .rmed .sauv .sauve"; }
46   virtual const char *GetDescriptiveName() { return "MED file (Data Exchange Model)"; }
47   //
48   virtual void SetFieldsStatus(const char *name, int status);
49   virtual int GetNumberOfFieldsTreeArrays();
50   virtual const char *GetFieldsTreeArrayName(int index);
51   virtual int GetFieldsTreeArrayStatus(const char *name);
52   //
53   virtual int GetTimesFlagsArrayStatus(const char *name);
54   virtual void SetTimesFlagsStatus(const char *name, int status);
55   virtual int GetNumberOfTimesFlagsArrays();
56   virtual const char *GetTimesFlagsArrayName(int index);
57   //! Build the graph used to pass information to the client on the supports
58   virtual std::string BuildSIL(vtkMutableDirectedGraph*);
59
60   // Description
61   // Reload will delete the internal reader and recreate it with default properties
62   virtual void Reload();
63
64   virtual int GetServerModifTime();
65   //
66   virtual void GenerateVectors(int);
67   virtual void ChangeMode(int);
68   virtual void GhostCellGeneratorCallForPara(int);
69   static const char *GetSeparator();
70
71   // Description
72   // Static information key used to transfer the meta data graph along the pipeline
73   static vtkInformationDataObjectMetaDataKey* META_DATA();
74   static vtkInformationDoubleVectorKey* GAUSS_DATA();
75
76  protected:
77   vtkMEDReader();
78   virtual ~vtkMEDReader();
79   virtual int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
80   virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
81  private:
82   void UpdateSIL(vtkInformation *request, vtkInformation *info);
83   virtual double PublishTimeStepsIfNeeded(vtkInformation*, bool& isUpdated);
84   virtual void FillMultiBlockDataSetInstance(vtkMultiBlockDataSet *output, double reqTS, ExportedTinyInfo *internalInfo=0);
85   vtkDataSet *RetrieveDataSetAtTime(double reqTS, ExportedTinyInfo *internalInfo);
86  private:
87   //BTX
88   //ETX
89
90   class vtkMEDReaderInternal;
91   vtkMEDReaderInternal* Internal;
92 };
93
94 #endif //__vtkMEDReader_h_