Speeduino
Loading...
Searching...
No Matches
Functions
table3d_visitor.h File Reference

Visitor pattern for the 3D table types. More...

#include "table3d.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename TConcreteVisitor , typename TReturn = void>
static TReturn visitTable3d (table3d_t &table, TableType key, TConcreteVisitor &visitor)
 Visit a 3D table with a visitor.
 

Detailed Description

Visitor pattern for the 3D table types.

This allows us to write code that operates on the tables without having to know the concrete type of the table.

Function Documentation

◆ visitTable3d()

static TReturn visitTable3d ( table3d_t table,
TableType  key,
TConcreteVisitor visitor 
)
inlinestatic

Visit a 3D table with a visitor.

The visitor is a struct that has a visit() method for each concrete table type, and a default visit() method for the case where the table type is not recognised.

Parameters
table3d table instance to visit
visitorVisitor to apply to the table
Returns
TReturn Return value from the visitor, if any
Here is the call graph for this function: