VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/IO/ADIOS/vtkADIOSDirTree.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkADIOSDirTree.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00019 #ifndef vtkADIOSDirTree_h
00020 #define vtkADIOSDirTree_h
00021 
00022 #include <map>
00023 #include <string>
00024 #include <vector>
00025 
00026 #include "vtkIndent.h"
00027 
00028 #include "ADIOSReader.h"
00029 #include "ADIOSScalar.h"
00030 #include "ADIOSVarInfo.h"
00031 
00032 class vtkADIOSDirTree
00033 {
00034 public:
00035   vtkADIOSDirTree(const std::string& name);
00036   vtkADIOSDirTree(const ADIOS::Reader &reader);
00037   ~vtkADIOSDirTree();
00038 
00039   const std::string& GetName() const { return this->Name; }
00040   void PrintSelf(std::ostream& os, vtkIndent indent) const;
00041 
00043   const vtkADIOSDirTree* GetDir(const std::string& dirName) const;
00044 
00046 
00047   const ADIOS::Scalar* GetScalar(const std::string& varName) const;
00048   const ADIOS::VarInfo* GetArray(const std::string& varName) const;
00050 
00052 
00053   void GetScalars(std::vector<const ADIOS::Scalar*>& vars) const;
00054   void GetArrays(std::vector<const ADIOS::VarInfo*>& vars) const;
00056 
00057 private:
00058   vtkADIOSDirTree* BuildPath(const std::vector<std::string>& path,
00059     size_t startIdx, size_t numComponents);
00060 
00061   const vtkADIOSDirTree* GetDir(const std::vector<std::string>& path,
00062     size_t pIdx) const;
00063 
00064   const std::string Name;
00065   std::map<std::string, const ADIOS::Scalar*> Scalars;
00066   std::map<std::string, const ADIOS::VarInfo*> Arrays;
00067   std::map<std::string, vtkADIOSDirTree*> SubDirs;
00068 };
00069 
00070 #endif
00071 // VTK-HeaderTest-Exclude: vtkADIOSDirTree.h