VTK
vtkADIOSDirTree.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkADIOSDirTree.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 =========================================================================*/
19 #ifndef vtkADIOSDirTree_h
20 #define vtkADIOSDirTree_h
21 
22 #include <map>
23 #include <string>
24 #include <vector>
25 
26 #include "vtkIndent.h"
27 
28 #include "ADIOSReader.h"
29 #include "ADIOSScalar.h"
30 #include "ADIOSVarInfo.h"
31 
33 {
34 public:
36  vtkADIOSDirTree(const ADIOS::Reader &reader);
38 
39  const std::string& GetName() const { return this->Name; }
40  void PrintSelf(std::ostream& os, vtkIndent indent) const;
41 
43  const vtkADIOSDirTree* GetDir(const std::string& dirName) const;
44 
46 
47  const ADIOS::Scalar* GetScalar(const std::string& varName) const;
48  const ADIOS::VarInfo* GetArray(const std::string& varName) const;
50 
52 
53  void GetScalars(std::vector<const ADIOS::Scalar*>& vars) const;
54  void GetArrays(std::vector<const ADIOS::VarInfo*>& vars) const;
56 
57 private:
58  vtkADIOSDirTree* BuildPath(const std::vector<std::string>& path,
59  size_t startIdx, size_t numComponents);
60 
61  const vtkADIOSDirTree* GetDir(const std::vector<std::string>& path,
62  size_t pIdx) const;
63 
64  const std::string Name;
65  std::map<std::string, const ADIOS::Scalar*> Scalars;
66  std::map<std::string, const ADIOS::VarInfo*> Arrays;
67  std::map<std::string, vtkADIOSDirTree*> SubDirs;
68 };
69 
70 #endif
71 // VTK-HeaderTest-Exclude: vtkADIOSDirTree.h
void GetArrays(std::vector< const ADIOS::VarInfo * > &vars) const
const vtkADIOSDirTree * GetDir(const std::string &dirName) const
vtkADIOSDirTree(const std::string &name)
a simple class to control print indentation
Definition: vtkIndent.h:38
const ADIOS::Scalar * GetScalar(const std::string &varName) const
const ADIOS::VarInfo * GetArray(const std::string &varName) const
A directory tree structure holding ADIOS data.
void PrintSelf(std::ostream &os, vtkIndent indent) const
const std::string & GetName() const
void GetScalars(std::vector< const ADIOS::Scalar * > &vars) const