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