Speeduino
Loading...
Searching...
No Matches
table3d_visitor.h
Go to the documentation of this file.
1#pragma once
2
10#include "table3d.h"
11
24template <typename TConcreteVisitor, typename TReturn = void>
25static inline TReturn visitTable3d(table3d_t &table, TableType key, TConcreteVisitor &visitor)
26{
27 switch (key)
28 {
29 // LCOV_EXCL_START
30 default:
32 // LCOV_EXCL_STOP
34 #define VISIT_CASE(size, xDom, yDom) \
35 case TableType::TO_TYPE_KEY(size, xDom, yDom): \
36 return visitor.visit(static_cast<TABLE3D_TYPENAME_BASE(size, xDom, yDom) &>(table));
38
39 TABLE3D_GENERATOR(VISIT_CASE)
40 }
41}
TableType
Table type identifiers. Limited compile time RTTI.
Definition table3d.h:69
#define TABLE3D_GENERATOR(GENERATOR,...)
Core 3d table generation macro.
Definition table3d_typedefs.h:36
Definition table3d.h:79
3D table data types and functions
static TReturn visitTable3d(table3d_t &table, TableType key, TConcreteVisitor &visitor)
Visit a 3D table with a visitor.
Definition table3d_visitor.h:25