VTK  9.4.20241218
VTXSchemaManager.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3
4/*
5 * VTXSchemaManager.h : reusable class that manages a reader that
6 * is a derived type of VTXSchema
7 *
8 * Created on: May 31, 2019
9 * Author: William F Godoy godoywf@ornl.gov
10 */
11
12#ifndef VTK_IO_ADIOS2_VTX_VTXSchemaManager_H_
13#define VTK_IO_ADIOS2_VTX_VTXSchemaManager_H_
14
15#include <memory>
16#include <set>
17#include <string>
18
20
21#include "schema/VTXSchema.h"
22#include <adios2.h>
23
24namespace vtx
25{
26VTK_ABI_NAMESPACE_BEGIN
27
29{
30public:
32 double Time = 0.;
34 size_t Step = 0;
35
37 std::unique_ptr<VTXSchema> Reader;
38
39 VTXSchemaManager() = default;
40 ~VTXSchemaManager() = default;
41
49 void Update(
50 const std::string& streamName, size_t step = 0, const std::string& schemaName = "vtk.xml");
51
57 void Fill(vtkMultiBlockDataSet* multiblock, size_t step = 0);
58
59private:
61 std::string StreamName;
62
64 std::unique_ptr<adios2::ADIOS> ADIOS;
65
67 adios2::IO IO;
68
70 adios2::Engine Engine;
71
73 std::string SchemaName;
74
75 static const std::set<std::string> SupportedTypes;
76
78 void InitReader();
79
81 bool InitReaderXMLVTK();
82};
83
84VTK_ABI_NAMESPACE_END
85} // end namespace adios2vtk
86
87#endif /* VTK_IO_ADIOS2_VTX_VTXSchemaManager_h */
Composite dataset that organizes datasets into blocks.
double Time
current time
VTXSchemaManager()=default
void Fill(vtkMultiBlockDataSet *multiblock, size_t step=0)
Fill multiblock data.
~VTXSchemaManager()=default
void Update(const std::string &streamName, 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