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:
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
vtkADIOSDirTree::GetScalars
void GetScalars(std::vector< const ADIOS::Scalar * > &vars) const
Access variables all at once.
vtkADIOSDirTree::vtkADIOSDirTree
vtkADIOSDirTree(const ADIOS::Reader &reader)
ADIOSVarInfo.h
vtkADIOSDirTree::GetScalar
const ADIOS::Scalar * GetScalar(const std::string &varName) const
Access variables by name.
vtkADIOSDirTree::GetArray
const ADIOS::VarInfo * GetArray(const std::string &varName) const
ADIOS::Reader
Definition: ADIOSReader.h:35
vtkADIOSDirTree
A directory tree structure holding ADIOS data.
Definition: vtkADIOSDirTree.h:34
vtkADIOSDirTree::PrintSelf
void PrintSelf(std::ostream &os, vtkIndent indent) const
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkADIOSDirTree::vtkADIOSDirTree
vtkADIOSDirTree(const std::string &name)
vtkX3D::name
@ name
Definition: vtkX3D.h:219
vtkIndent.h
vtkX3D::string
@ string
Definition: vtkX3D.h:490
vtkADIOSDirTree::GetDir
const vtkADIOSDirTree * GetDir(const std::string &dirName) const
Access a subdirectory.
ADIOS::VarInfo
Definition: ADIOSVarInfo.h:30
ADIOSReader.h
vtkADIOSDirTree::~vtkADIOSDirTree
~vtkADIOSDirTree()
vtkADIOSDirTree::GetArrays
void GetArrays(std::vector< const ADIOS::VarInfo * > &vars) const
ADIOSScalar.h
vtkADIOSDirTree::GetName
const std::string & GetName() const
Definition: vtkADIOSDirTree.h:40
ADIOS::Scalar
Definition: ADIOSScalar.h:32