4#include <h5gt/H5DataType.hpp>
18 void setX(
const double& x) { p[0] = x; }
20 double& getX() {
return p[0]; }
22 void setName(
const std::string& s){
23 size_t nChar2copy = std::min(s.size(),
size_t(H5GEO_CHAR_ARRAY_SIZE - 1));
27 s.copy(this->name, nChar2copy);
28 this->name[nChar2copy] =
'\0';
32 std::string getName() {
return this->name; }
36 char name[H5GEO_CHAR_ARRAY_SIZE];
39typedef std::vector<h5geo::Point1> Point1Array;
46 void setX(
const double& x) { p[0] = x; }
47 void setY(
const double& y) { p[1] = y; }
49 double& getX() {
return p[0]; }
50 double& getY() {
return p[1]; }
52 void setName(
const std::string& s){
53 size_t nChar2copy = std::min(s.size(),
size_t(H5GEO_CHAR_ARRAY_SIZE - 1));
57 s.copy(this->name, nChar2copy);
58 this->name[nChar2copy] =
'\0';
62 std::string getName() {
return this->name; }
66 char name[H5GEO_CHAR_ARRAY_SIZE];
69typedef std::vector<h5geo::Point2> Point2Array;
76 void setX(
const double& x) { p[0] = x; }
77 void setY(
const double& y) { p[1] = y; }
78 void setZ(
const double& z) { p[2] = z; }
80 double& getX() {
return p[0]; }
81 double& getY() {
return p[1]; }
82 double& getZ() {
return p[2]; }
84 void setName(
const std::string& s){
85 size_t nChar2copy = std::min(s.size(),
size_t(H5GEO_CHAR_ARRAY_SIZE - 1));
89 s.copy(this->name, nChar2copy);
90 this->name[nChar2copy] =
'\0';
94 std::string getName() {
return this->name; }
97 char name[H5GEO_CHAR_ARRAY_SIZE];
100typedef std::vector<h5geo::Point3> Point3Array;
107 void setX(
const double& x) { p[0] = x; }
108 void setY(
const double& y) { p[1] = y; }
109 void setZ(
const double& z) { p[2] = z; }
110 void setVal(
const double& val) { p[3] = val; }
112 double& getX() {
return p[0]; }
113 double& getY() {
return p[1]; }
114 double& getZ() {
return p[2]; }
115 double& getVal() {
return p[3]; }
117 void setName(
const std::string& s){
118 size_t nChar2copy = std::min(s.size(),
size_t(H5GEO_CHAR_ARRAY_SIZE - 1));
120 this->name[0] =
'\0';
122 s.copy(this->name, nChar2copy);
123 this->name[nChar2copy] =
'\0';
127 std::string getName() {
return this->name; }
130 char name[H5GEO_CHAR_ARRAY_SIZE];
133typedef std::vector<h5geo::Point4> Point4Array;
137inline h5gt::CompoundType create_compound_Point1() {
138 h5gt::CompoundType t(
140 {
"x", h5gt::AtomicType<double>{}, offsetof(
Point1, p[0])},
141 {
"name", h5gt::AtomicType<h5gt::FixedLenStringArray<H5GEO_CHAR_ARRAY_SIZE>>{}, offsetof(
Point1, name)}
147inline h5gt::CompoundType create_compound_Point2() {
148 h5gt::CompoundType t(
150 {
"x", h5gt::AtomicType<double>{}, offsetof(
Point2, p[0])},
151 {
"y", h5gt::AtomicType<double>{}, offsetof(
Point2, p[1])},
152 {
"name", h5gt::AtomicType<h5gt::FixedLenStringArray<H5GEO_CHAR_ARRAY_SIZE>>{}, offsetof(
Point2, name)}
158inline h5gt::CompoundType create_compound_Point3() {
159 h5gt::CompoundType t(
161 {
"x", h5gt::AtomicType<double>{}, offsetof(
Point3, p[0])},
162 {
"y", h5gt::AtomicType<double>{}, offsetof(
Point3, p[1])},
163 {
"z", h5gt::AtomicType<double>{}, offsetof(
Point3, p[2])},
164 {
"name", h5gt::AtomicType<h5gt::FixedLenStringArray<H5GEO_CHAR_ARRAY_SIZE>>{}, offsetof(
Point3, name)}
170inline h5gt::CompoundType create_compound_Point4() {
171 h5gt::CompoundType t(
173 {
"x", h5gt::AtomicType<double>{}, offsetof(
Point4, p[0])},
174 {
"y", h5gt::AtomicType<double>{}, offsetof(
Point4, p[1])},
175 {
"z", h5gt::AtomicType<double>{}, offsetof(
Point4, p[2])},
176 {
"val", h5gt::AtomicType<double>{}, offsetof(
Point4, p[3])},
177 {
"name", h5gt::AtomicType<h5gt::FixedLenStringArray<H5GEO_CHAR_ARRAY_SIZE>>{}, offsetof(
Point4, name)}
187H5GT_REGISTER_TYPE(
h5geo::Point1, h5geo::create_compound_Point1);
188H5GT_REGISTER_TYPE(
h5geo::Point2, h5geo::create_compound_Point2);
189H5GT_REGISTER_TYPE(
h5geo::Point3, h5geo::create_compound_Point3);
190H5GT_REGISTER_TYPE(
h5geo::Point4, h5geo::create_compound_Point4);
Basic namespace.
Definition h5base.h:29
struct h5geo::Point2 Point2
X, Y are always length.
struct h5geo::Point4 Point4
struct h5geo::Point3 Point3
X, Y are always length, Z either length or time (depending on Domain)
struct h5geo::Point1 Point1
X maybe length or time (depending on Domain)
X maybe length or time (depending on Domain)
Definition h5point.h:17
X, Y are always length.
Definition h5point.h:45
X, Y are always length, Z either length or time (depending on Domain)
Definition h5point.h:75