Salome HOME
Merge remote-tracking branch 'origin/rnv/vtk_opengl2_backend' into V8_1_BR
[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 vtkMutableDirectedGraph;
29 class vtkInformationDataObjectMetaDataKey;
30
31 class VTK_EXPORT vtkMEDReader : public vtkMultiBlockDataSetAlgorithm
32 {
33  private:
34   vtkMEDReader(const vtkMEDReader&); // Not implemented.
35   void operator=(const vtkMEDReader&); // Not implemented.
36  public:
37   static vtkMEDReader *New();
38   vtkTypeMacro(vtkMEDReader, vtkMultiBlockDataSetAlgorithm);
39   void PrintSelf(ostream& os, vtkIndent indent);
40   virtual void SetFileName(const char*);
41   virtual char *GetFileName();
42   virtual const char *GetFileExtensions() { return ".med .rmed .sauv .sauve"; }
43   virtual const char *GetDescriptiveName() { return "MED file (Data Exchange Model)"; }
44   //
45   virtual void SetFieldsStatus(const char *name, int status);
46   virtual int GetNumberOfFieldsTreeArrays();
47   virtual const char *GetFieldsTreeArrayName(int index);
48   virtual int GetFieldsTreeArrayStatus(const char *name);
49   //
50   virtual int GetTimesFlagsArrayStatus(const char *name);
51   virtual void SetTimesFlagsStatus(const char *name, int status);
52   virtual int GetNumberOfTimesFlagsArrays();
53   virtual const char *GetTimesFlagsArrayName(int index);
54   //! Build the graph used to pass information to the client on the supports
55   virtual std::string BuildSIL(vtkMutableDirectedGraph*);
56
57   // Description
58   // Reload will delete the internal reader and recreate it with default properties
59   virtual void Reload();
60
61   virtual int GetServerModifTime();
62   //
63   virtual void GenerateVectors(int);
64   virtual void ChangeMode(int);
65   static const char *GetSeparator();
66
67   // Description
68   // Static information key used to transfer the meta data graph along the pipeline
69   static vtkInformationDataObjectMetaDataKey* META_DATA();
70
71  protected:
72   vtkMEDReader();
73   virtual ~vtkMEDReader();
74   virtual int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
75   virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
76  private:
77   void UpdateSIL(vtkInformation *request, vtkInformation *info);
78   virtual double PublishTimeStepsIfNeeded(vtkInformation*, bool& isUpdated);
79   virtual void FillMultiBlockDataSetInstance(vtkMultiBlockDataSet *output, double reqTS);
80  private:
81   //BTX
82   //ETX
83
84   class vtkMEDReaderInternal;
85   vtkMEDReaderInternal* Internal;
86 };
87
88 #endif //__vtkMEDReader_h_