VTK: IO/ADIOS2/VTX/schema/vtk/VTXvtkBase.h Source File

| VTK 9.3.1

VTXvtkBase.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 * VTXvtkBase.h : abstract class for schemas of type
6 * [VTK XML file formats schemas]
7 * (https://vtk.org/wp-content/uploads/2015/04/file-formats.pdf)
8 * Provide common functionality.
9 *
10 * Created on: May 6, 2019
11 * Author: William F Godoy godoywf@ornl.gov
12 */
13
14 #ifndef VTK_IO_ADIOS2_VTX_SCHEMA_VTK_VTXvtkBase_h
15 #define VTK_IO_ADIOS2_VTX_SCHEMA_VTK_VTXvtkBase_h
16
17 #include "VTX/common/VTXTypes.h"
18 #include "VTX/schema/VTXSchema.h"
19
20 #include <map>
21 #include <set>
22 #include <string>
23 #include <vector>
24
25 namespace vtx
26 {
27 namespace schema
28 {
29 VTK_ABI_NAMESPACE_BEGIN
30
31 class VTXvtkBase : public VTXSchema
32 {
33 public:
34 VTXvtkBase(
35 const std::string& type, const std::string& schema, adios2::IO& io, adios2::Engine& engine);
36
37 // can't use = default, due to forward class not defined
38 ~VTXvtkBase() override;
39
40 protected:
41 std::vector<types::Piece> Pieces;
42
43 const static std::set<std::string> TIMENames;
44 const static std::set<std::string> SpecialNames;
45 const static std::map<types::DataSetType, std::string> DataSetTypes;
46
47 void DoFill(vtkMultiBlockDataSet* multiBlock, size_t step) override = 0;
48 void ReadPiece(size_t step, size_t pieceID) override = 0;
49
50 bool ReadDataSets(types::DataSetType type, size_t step, size_t pieceID);
51
52 void Init() override = 0;
53 void InitTimes() final;
54
55 std::string DataSetType(types::DataSetType type) const noexcept;
56 };
57
58 VTK_ABI_NAMESPACE_END
59 } // end namespace schema
60 } // end namespace vtx
61
62 #endif /* VTK_IO_ADIOS2_VTX_SCHEMA_VTK_VTXvtkBase_h */
VTXSchema.h
VTXTypes.h
vtkMultiBlockDataSet
Composite dataset that organizes datasets into blocks.
Definition: vtkMultiBlockDataSet.h:50
vtx::VTXSchema
Abstract common class to supported ADIOS2 schemas.
Definition: VTXSchema.h:32
vtx::schema::VTXvtkBase
Definition: VTXvtkBase.h:32
vtx::schema::VTXvtkBase::ReadPiece
void ReadPiece(size_t step, size_t pieceID) override=0
vtx::schema::VTXvtkBase::DoFill
void DoFill(vtkMultiBlockDataSet *multiBlock, size_t step) override=0
vtx::schema::VTXvtkBase::Init
void Init() override=0
vtx::schema::VTXvtkBase::InitTimes
void InitTimes() final
vtx::schema::VTXvtkBase::DataSetTypes
static const std::map< types::DataSetType, std::string > DataSetTypes
Definition: VTXvtkBase.h:45
vtx::schema::VTXvtkBase::VTXvtkBase
VTXvtkBase(const std::string &type, const std::string &schema, adios2::IO &io, adios2::Engine &engine)
vtx::schema::VTXvtkBase::ReadDataSets
bool ReadDataSets(types::DataSetType type, size_t step, size_t pieceID)
vtx::schema::VTXvtkBase::DataSetType
std::string DataSetType(types::DataSetType type) const noexcept
vtx::schema::VTXvtkBase::Pieces
std::vector< types::Piece > Pieces
Definition: VTXvtkBase.h:41
vtx::schema::VTXvtkBase::SpecialNames
static const std::set< std::string > SpecialNames
Definition: VTXvtkBase.h:44
vtx::schema::VTXvtkBase::~VTXvtkBase
~VTXvtkBase() override
vtx::schema::VTXvtkBase::TIMENames
static const std::set< std::string > TIMENames
Definition: VTXvtkBase.h:43
std
Definition: vtkSmartPointer.h:310
vtkX3D::type
@ type
Definition: vtkX3D.h:516
vtkX3D::string
@ string
Definition: vtkX3D.h:490
vtx::types::DataSetType
DataSetType
Definition: VTXTypes.h:31
vtx
Definition: vtkADIOS2VTXReader.h:24