VTK  9.1.0
VTXSchemaManager.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: VTXSchemaManager.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 =========================================================================*/
15
16/*
17 * VTXSchemaManager.h : reusable class that manages a reader that
18 * is a derived type of VTXSchema
19 *
20 * Created on: May 31, 2019
21 * Author: William F Godoy godoywf@ornl.gov
22 */
23
24#ifndef VTK_IO_ADIOS2_VTX_VTXSchemaManager_H_
25#define VTK_IO_ADIOS2_VTX_VTXSchemaManager_H_
26
27#include <memory>
28#include <set>
29#include <string>
30
32
33#include "schema/VTXSchema.h"
34#include <adios2.h>
35
36namespace vtx
37{
38
40{
41public:
43 double Time = 0.;
45 size_t Step = 0;
46
48 std::unique_ptr<VTXSchema> Reader;
49
50 VTXSchemaManager() = default;
51 ~VTXSchemaManager() = default;
52
60 void Update(const std::string& streamName, const size_t step = 0,
61 const std::string& schemaName = "vtk.xml");
62
68 void Fill(vtkMultiBlockDataSet* multiblock, const size_t step = 0);
69
70private:
72 std::string StreamName;
73
75 std::unique_ptr<adios2::ADIOS> ADIOS;
76
78 adios2::IO IO;
79
81 adios2::Engine Engine;
82
84 std::string SchemaName;
85
86 static const std::set<std::string> SupportedTypes;
87
89 void InitReader();
90
92 bool InitReaderXMLVTK();
93};
94
95} // end namespace adios2vtk
96
97#endif /* VTK_IO_ADIOS2_VTX_VTXSchemaManager_h */
Composite dataset that organizes datasets into blocks.
double Time
current time
VTXSchemaManager()=default
~VTXSchemaManager()=default
void Fill(vtkMultiBlockDataSet *multiblock, const size_t step=0)
Fill multiblock data.
void Update(const std::string &streamName, const size_t step=0, const std::string &schemaName="vtk.xml")
Updates metadata if stream is changed.
std::unique_ptr< VTXSchema > Reader
managed polymorphic reader, could be extended in a container
size_t Step
current adios2 step