Move data field sorting to NamedField

This commit is contained in:
2023-05-24 01:01:48 +02:00
parent 9466290ff3
commit 1bbac4537d
5 changed files with 55 additions and 26 deletions

View File

@ -1,6 +1,7 @@
#ifndef NAMEDFIELD_HPP
#define NAMEDFIELD_HPP
#include "params.h"
#include "touchgfx/TypedText.hpp"
#include "touchgfx/Unicode.hpp"
#include <stddef.h>
@ -29,6 +30,13 @@ struct NamedFieldDescription {
extern NamedFieldDescription dataFieldDescs[];
extern NamedFieldDescription paramFieldDescs[];
extern DataFieldType dataFieldByAlphaIndex[];
extern size_t dataFieldAlphaIndexByField[];
extern ParamType paramByAlphaIndex[];
extern size_t paramAlphaIndexByParam[];
void namedFieldSort();
template <class T> class NamedField {
public:
NamedField(const NamedFieldDescription *fieldDescs);