VTK  9.1.0
VTXvtkBase.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: VTXvtkBase.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 * VTXvtkBase.h : abstract class for schemas of type
18 * [VTK XML file formats schemas]
19 * (https://vtk.org/wp-content/uploads/2015/04/file-formats.pdf)
20 * Provide common functionality.
21 *
22 * Created on: May 6, 2019
23 * Author: William F Godoy godoywf@ornl.gov
24 */
25
26#ifndef VTK_IO_ADIOS2_VTX_SCHEMA_VTK_VTXvtkBase_h
27#define VTK_IO_ADIOS2_VTX_SCHEMA_VTK_VTXvtkBase_h
28
29#include "VTX/common/VTXTypes.h"
31
32#include <map>
33#include <set>
34#include <string>
35#include <vector>
36
37namespace vtx
38{
39namespace schema
40{
41
42class VTXvtkBase : public VTXSchema
43{
44public:
46 const std::string& type, const std::string& schema, adios2::IO& io, adios2::Engine& engine);
47
48 // can't use = default, due to forward class not defined
49 virtual ~VTXvtkBase();
50
51protected:
52 std::vector<types::Piece> Pieces;
53
54 const static std::set<std::string> TIMENames;
55 const static std::set<std::string> SpecialNames;
56 const static std::map<types::DataSetType, std::string> DataSetTypes;
57
58 virtual void DoFill(vtkMultiBlockDataSet* multiBlock, const size_t step) = 0;
59 virtual void ReadPiece(const size_t step, const size_t pieceID) = 0;
60
61 bool ReadDataSets(const types::DataSetType type, const size_t step, const size_t pieceID);
62
63 virtual void Init() = 0;
64 void InitTimes() final;
65
66 std::string DataSetType(const types::DataSetType type) const noexcept;
67};
68
69} // end namespace schema
70} // end namespace vtx
71
72#endif /* VTK_IO_ADIOS2_VTX_SCHEMA_VTK_VTXvtkBase_h */
Composite dataset that organizes datasets into blocks.
Abstract common class to supported ADIOS2 schemas.
Definition: VTXSchema.h:43
std::string DataSetType(const types::DataSetType type) const noexcept
virtual void DoFill(vtkMultiBlockDataSet *multiBlock, const size_t step)=0
virtual void Init()=0
static const std::map< types::DataSetType, std::string > DataSetTypes
Definition: VTXvtkBase.h:56
bool ReadDataSets(const types::DataSetType type, const size_t step, const size_t pieceID)
VTXvtkBase(const std::string &type, const std::string &schema, adios2::IO &io, adios2::Engine &engine)
virtual void ReadPiece(const size_t step, const size_t pieceID)=0
std::vector< types::Piece > Pieces
Definition: VTXvtkBase.h:52
static const std::set< std::string > SpecialNames
Definition: VTXvtkBase.h:55
static const std::set< std::string > TIMENames
Definition: VTXvtkBase.h:54
@ type
Definition: vtkX3D.h:522
@ string
Definition: vtkX3D.h:496