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