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 =========================================================================*/
20 #ifndef vtkADIOSDirTree_h
21 #define vtkADIOSDirTree_h
22 
23 #include <map>
24 #include <string>
25 #include <vector>
26 
27 #include "vtkIndent.h"
28 
29 #include "ADIOSReader.h"
30 #include "ADIOSScalar.h"
31 #include "ADIOSVarInfo.h"
32 
34 {
35 public:
37  vtkADIOSDirTree(const ADIOS::Reader &reader);
39 
40  const std::string& GetName() const { return this->Name; }
41  void PrintSelf(std::ostream& os, vtkIndent indent) const;
42 
46  const vtkADIOSDirTree* GetDir(const std::string& dirName) const;
47 
49 
52  const ADIOS::Scalar* GetScalar(const std::string& varName) const;
53  const ADIOS::VarInfo* GetArray(const std::string& varName) const;
55 
57 
60  void GetScalars(std::vector<const ADIOS::Scalar*>& vars) const;
61  void GetArrays(std::vector<const ADIOS::VarInfo*>& vars) const;
63 
64 private:
65  vtkADIOSDirTree* BuildPath(const std::vector<std::string>& path,
66  size_t startIdx, size_t numComponents);
67 
68  const vtkADIOSDirTree* GetDir(const std::vector<std::string>& path,
69  size_t pIdx) const;
70 
71  const std::string Name;
72  std::map<std::string, const ADIOS::Scalar*> Scalars;
73  std::map<std::string, const ADIOS::VarInfo*> Arrays;
74  std::map<std::string, vtkADIOSDirTree*> SubDirs;
75 };
76 
77 #endif
78 // VTK-HeaderTest-Exclude: vtkADIOSDirTree.h
void GetArrays(std::vector< const ADIOS::VarInfo * > &vars) const
Access variables all at once.
const vtkADIOSDirTree * GetDir(const std::string &dirName) const
Access a subdirectory.
vtkADIOSDirTree(const std::string &name)
a simple class to control print indentation
Definition: vtkIndent.h:39
const ADIOS::Scalar * GetScalar(const std::string &varName) const
Access variables by name.
const ADIOS::VarInfo * GetArray(const std::string &varName) const
Access variables by name.
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
Access variables all at once.