1 // Copyright (C) 2010-2014 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // Author : Anthony Geay
21 #ifndef __vtkMEDReader_h_
22 #define __vtkMEDReader_h_
24 #include "vtkMultiBlockDataSetAlgorithm.h"
26 class vtkMutableDirectedGraph;
28 class VTK_EXPORT vtkMEDReader : public vtkMultiBlockDataSetAlgorithm
31 vtkMEDReader(const vtkMEDReader&); // Not implemented.
32 void operator=(const vtkMEDReader&); // Not implemented.
34 static vtkMEDReader *New();
35 vtkTypeMacro(vtkMEDReader, vtkMultiBlockDataSetAlgorithm);
36 void PrintSelf(ostream& os, vtkIndent indent);
37 virtual void SetFileName(const char*);
38 virtual char *GetFileName();
39 virtual const char *GetFileExtensions() { return ".med .rmed .sauv .sauve"; }
40 virtual const char *GetDescriptiveName() { return "MED file (Data Exchange Model)"; }
42 virtual void SetFieldsStatus(const char *name, int status);
43 virtual int GetNumberOfFieldsTreeArrays();
44 virtual const char *GetFieldsTreeArrayName(int index);
45 virtual int GetFieldsTreeArrayStatus(const char *name);
47 virtual int GetTimesFlagsArrayStatus(const char *name);
48 virtual void SetTimesFlagsStatus(const char *name, int status);
49 virtual int GetNumberOfTimesFlagsArrays();
50 virtual const char *GetTimesFlagsArrayName(int index);
51 //! Build the graph used to pass information to the client on the supports
52 virtual std::string BuildSIL(vtkMutableDirectedGraph*);
53 virtual void Reload(int);
54 virtual void GenerateVectors(int);
55 virtual void ChangeMode(int);
56 virtual const char *GetSeparator();
59 virtual ~vtkMEDReader();
60 virtual int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
61 virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
63 void UpdateSIL(vtkInformation *info);
64 virtual double PublishTimeStepsIfNeeded(vtkInformation*, bool& isUpdated);
65 virtual void FillMultiBlockDataSetInstance(vtkMultiBlockDataSet *output, double reqTS);
69 class vtkMEDReaderInternal;
70 vtkMEDReaderInternal* Internal;
73 #endif //__vtkMEDReader_h_