52#define TO_TYPE_KEY(size, xDom, yDom) table3d ## size ## xDom ## yDom ## _key
72 #define TABLE3D_GEN_TYPEKEY(size, xDom, yDom) TO_TYPE_KEY(size, xDom, yDom),
83#define TABLE3D_GEN_TYPE(size, xDom, yDom) \
85 struct TABLE3D_TYPENAME_BASE(size, xDom, yDom) : public table3d_t \
87 typedef TABLE3D_TYPENAME_AXIS(size) xaxis_t; \
88 typedef TABLE3D_TYPENAME_AXIS(size) yaxis_t; \
89 typedef TABLE3D_TYPENAME_VALUE(size, xDom, yDom) value_t; \
91 static constexpr TableType type_key = TableType::TO_TYPE_KEY(size, xDom, yDom); \
92 static constexpr AxisDomain XDomain = AxisDomain::xDom; \
93 static constexpr AxisDomain YDomain = AxisDomain::yDom; \
95 mutable table3DGetValueCache get_value_cache; \
101TABLE3D_GENERATOR(TABLE3D_GEN_TYPE)
105#define TABLE3D_GEN_GET_TABLE_VALUE(size, xDom, yDom) \
106 static inline table3d_value_t get3DTableValue(const TABLE3D_TYPENAME_BASE(size, xDom, yDom) *pTable, const uint16_t y, const uint16_t x) \
108 constexpr uint16_t xFactor = getConversionFactor(AxisDomain::xDom); \
109 constexpr uint16_t yFactor = getConversionFactor(AxisDomain::yDom); \
110 return get3DTableValue<xFactor, yFactor>( &pTable->get_value_cache, \
111 TABLE3D_TYPENAME_BASE(size, xDom, yDom)::value_t::row_size, \
112 pTable->values.values, \
113 pTable->axisX.axis, \
114 pTable->axisY.axis, \
118TABLE3D_GENERATOR(TABLE3D_GEN_GET_TABLE_VALUE)
Iterate over table axis elements.
Definition table3d_axes.h:31
Iterate through a tables values, row by row.
Definition table3d_values.h:87
static TIntegral readSerialIntegralTimeout(void)
Reads an integral type, timing out if necessary.
Definition comms.cpp:175
table_axis_iterator y_rbegin(table3d_t *pTable, TableType key)
Definition table3d.cpp:76
table_axis_iterator x_rbegin(table3d_t *pTable, TableType key)
Definition table3d.cpp:45
TableType
Table type identifiers. Limited compile time RTTI.
Definition table3d.h:69
table_axis_iterator x_begin(table3d_t *pTable, TableType key)
Definition table3d.cpp:29
table_value_iterator rows_begin(table3d_t *pTable, TableType key)
Definition table3d.cpp:14
table_axis_iterator y_begin(table3d_t *pTable, TableType key)
Definition table3d.cpp:60
3D table axis types and iterators
Functions for interpolating values from 3D tables.
3D table value structs and iterators