Tatooine
piece.h
Go to the documentation of this file.
1#ifndef TATOOINE_GEOMETRY_VTK_XML_PIECE_H
2#define TATOOINE_GEOMETRY_VTK_XML_PIECE_H
3//==============================================================================
5
6#include <map>
7#include <optional>
8#include <rapidxml.hpp>
9#include <vector>
10//==============================================================================
11namespace tatooine::vtk::xml {
12//==============================================================================
13struct reader;
14struct piece {
15 std::size_t num_points = {};
16 std::size_t num_vertices = {};
17 std::size_t num_lines = {};
18 std::size_t num_cells = {};
19 std::size_t num_strips = {};
20 std::size_t num_polygons = {};
21
22 std::optional<std::array<std::size_t, 3>> extent1 = {};
23 std::optional<std::array<std::size_t, 3>> extent2 = {};
24
26 std::map<std::string, data_array> vertices = {};
27 std::map<std::string, data_array> lines = {};
28 std::map<std::string, data_array> cells = {};
29 std::map<std::string, data_array> strips = {};
30 std::map<std::string, data_array> polygons = {};
31 std::map<std::string, data_array> point_data = {};
32 std::map<std::string, data_array> cell_data = {};
33
34 explicit piece(reader& r, rapidxml::xml_node<>* node);
35 auto read_data_array_set(reader& r, rapidxml::xml_node<>* node,
36 std::map<std::string, data_array>& set) -> void;
37 auto read_points(reader& r, rapidxml::xml_node<>* node) -> void;
38 auto read_vertices(reader& r, rapidxml::xml_node<>* node) -> void;
39 auto read_lines(reader& r, rapidxml::xml_node<>* node) -> void;
40 auto read_cells(reader& r, rapidxml::xml_node<>* node) -> void;
41 auto read_strips(reader& r, rapidxml::xml_node<>* node) -> void;
42 auto read_polygons(reader& r, rapidxml::xml_node<>* node) -> void;
43 auto read_point_data(reader& r, rapidxml::xml_node<>* node) -> void;
44 auto read_cell_data(reader& r, rapidxml::xml_node<>* node) -> void;
45};
46//==============================================================================
47} // namespace tatooine::vtk::xml
48//==============================================================================
49#endif
Definition: byte_order.h:6
Definition: data_array.h:19
Definition: piece.h:14
auto read_strips(reader &r, rapidxml::xml_node<> *node) -> void
std::map< std::string, data_array > cells
Definition: piece.h:28
auto read_lines(reader &r, rapidxml::xml_node<> *node) -> void
std::optional< std::array< std::size_t, 3 > > extent1
Definition: piece.h:22
std::size_t num_lines
Definition: piece.h:17
std::map< std::string, data_array > strips
Definition: piece.h:29
std::size_t num_polygons
Definition: piece.h:20
auto read_cells(reader &r, rapidxml::xml_node<> *node) -> void
std::optional< std::array< std::size_t, 3 > > extent2
Definition: piece.h:23
std::map< std::string, data_array > cell_data
Definition: piece.h:32
std::size_t num_strips
Definition: piece.h:19
std::map< std::string, data_array > vertices
Definition: piece.h:26
auto read_polygons(reader &r, rapidxml::xml_node<> *node) -> void
auto read_data_array_set(reader &r, rapidxml::xml_node<> *node, std::map< std::string, data_array > &set) -> void
piece(reader &r, rapidxml::xml_node<> *node)
std::size_t num_vertices
Definition: piece.h:16
std::size_t num_cells
Definition: piece.h:18
auto read_cell_data(reader &r, rapidxml::xml_node<> *node) -> void
std::map< std::string, data_array > polygons
Definition: piece.h:30
auto read_vertices(reader &r, rapidxml::xml_node<> *node) -> void
std::map< std::string, data_array > lines
Definition: piece.h:27
std::map< std::string, data_array > point_data
Definition: piece.h:31
auto read_point_data(reader &r, rapidxml::xml_node<> *node) -> void
data_array points
Definition: piece.h:25
std::size_t num_points
Definition: piece.h:15
auto read_points(reader &r, rapidxml::xml_node<> *node) -> void
Definition: reader.h:25