vtkSpyPlotReaderMap.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkSpyPlotReaderMap.h
5 
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
24 #ifndef vtkSpyPlotReaderMap_h
25 #define vtkSpyPlotReaderMap_h
26 
27 #include "vtkPVVTKExtensionsIOSPCTHModule.h" //needed for exports
28 #include "vtkSystemIncludes.h"
29 
30 #include <map>
31 #include <string>
32 #include <vector>
33 
35 class vtkSpyPlotReader;
37 
39 {
40 public:
41  typedef std::map<std::string, vtkSpyPlotUniReader*> MapOfStringToSPCTH;
42  typedef std::vector<std::string> VectorOfStrings;
43  MapOfStringToSPCTH Files;
44 
45  // Initialize the file-map. The filename can either be a case file or a spcth
46  // file. In case of later, we detect fileseries automatically.
47  // This method should ideally be called only on the 0th node to avoid reading
48  // reads for meta-data on all the nodes.
49  bool Initialize(const char* filename);
50 
51  void Clean(vtkSpyPlotUniReader* save);
52  vtkSpyPlotUniReader* GetReader(MapOfStringToSPCTH::iterator& it, vtkSpyPlotReader* parent);
53  void TellReadersToCheck(vtkSpyPlotReader* parent);
54 
55  bool Save(vtkMultiProcessStream& stream);
56  bool Load(vtkMultiProcessStream& stream);
57 
58 private:
64  bool InitializeFromSpyFile(const char*);
65 
67 
72  bool InitializeFromCaseFile(const char*);
73 };
75 
76 #endif
77 
78 // VTK-HeaderTest-Exclude: vtkSpyPlotReaderMap.h
std::map< std::string, vtkSpyPlotUniReader * > MapOfStringToSPCTH
Maps strings to vtkSpyPlotUniReaders.
std::vector< std::string > VectorOfStrings
MapOfStringToSPCTH Files
Read SPCTH Spy Plot file format.
#define VTKPVVTKEXTENSIONSIOSPCTH_EXPORT
gio::GenericIOReader * GetReader(MPI_Comm comm, bool posix, int distribution, const std::string &fileName)
This method constructs and returns the underlying GenericIO reader.
Read SPCTH Spy Plot file format.