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 #ifndef __VTK_WRAP__
23 #ifndef VTK_WRAPPING_CXX
24 
25 #include <map>
26 #include <string>
27 #include <vector>
28 
29 #include "vtkIndent.h"
30 
31 #include "ADIOSReader.h"
32 #include "ADIOSScalar.h"
33 #include "ADIOSVarInfo.h"
34 
36 {
37 public:
39  vtkADIOSDirTree(const ADIOS::Reader &reader);
41 
42  const std::string& GetName() const { return this->Name; }
43  void PrintSelf(std::ostream& os, vtkIndent indent) const;
44 
48  const vtkADIOSDirTree* GetDir(const std::string& dirName) const;
49 
51 
54  const ADIOS::Scalar* GetScalar(const std::string& varName) const;
55  const ADIOS::VarInfo* GetArray(const std::string& varName) const;
57 
59 
62  void GetScalars(std::vector<const ADIOS::Scalar*>& vars) const;
63  void GetArrays(std::vector<const ADIOS::VarInfo*>& vars) const;
65 
66 private:
67  vtkADIOSDirTree* BuildPath(const std::vector<std::string>& path,
68  size_t startIdx, size_t numComponents);
69 
70  const vtkADIOSDirTree* GetDir(const std::vector<std::string>& path,
71  size_t pIdx) const;
72 
73  const std::string Name;
74  std::map<std::string, const ADIOS::Scalar*> Scalars;
75  std::map<std::string, const ADIOS::VarInfo*> Arrays;
76  std::map<std::string, vtkADIOSDirTree*> SubDirs;
77 };
78 
79 #endif
80 #endif
81 #endif
82 // 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.