Salome HOME
Merge branch 'master' of https://git.salome-platform.org/git/modules/paravis
[modules/paravis.git] / src / Plugins / MEDReader / IO / vtkMEDReader.h
1 // Copyright (C) 2010-2014  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
30 class VTK_EXPORT vtkMEDReader : public vtkMultiBlockDataSetAlgorithm
31 {
32  private:
33   vtkMEDReader(const vtkMEDReader&); // Not implemented.
34   void operator=(const vtkMEDReader&); // Not implemented.
35  public:
36   static vtkMEDReader *New();
37   vtkTypeMacro(vtkMEDReader, vtkMultiBlockDataSetAlgorithm);
38   void PrintSelf(ostream& os, vtkIndent indent);
39   virtual void SetFileName(const char*);
40   virtual char *GetFileName();
41   virtual const char *GetFileExtensions() { return ".med .rmed .sauv .sauve"; }
42   virtual const char *GetDescriptiveName() { return "MED file (Data Exchange Model)"; }
43   //
44   virtual void SetFieldsStatus(const char *name, int status);
45   virtual int GetNumberOfFieldsTreeArrays();
46   virtual const char *GetFieldsTreeArrayName(int index);
47   virtual int GetFieldsTreeArrayStatus(const char *name);
48   //
49   virtual int GetTimesFlagsArrayStatus(const char *name);
50   virtual void SetTimesFlagsStatus(const char *name, int status);
51   virtual int GetNumberOfTimesFlagsArrays();
52   virtual const char *GetTimesFlagsArrayName(int index);
53   //! Build the graph used to pass information to the client on the supports
54   virtual std::string BuildSIL(vtkMutableDirectedGraph*);
55   virtual void Reload(int);
56   virtual void GenerateVectors(int);
57   virtual void ChangeMode(int);
58   virtual const char *GetSeparator();
59  protected:
60   vtkMEDReader();
61   virtual ~vtkMEDReader();
62   virtual int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
63   virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
64  private:
65   void UpdateSIL(vtkInformation *info);
66   virtual double PublishTimeStepsIfNeeded(vtkInformation*, bool& isUpdated);
67   virtual void FillMultiBlockDataSetInstance(vtkMultiBlockDataSet *output, double reqTS);
68  private:
69   //BTX
70   //ETX
71   class vtkMEDReaderInternal;
72   vtkMEDReaderInternal* Internal;
73 };
74
75 #endif //__vtkMEDReader_h_