small func update

main
Brett 2024-01-22 08:48:51 -05:00
parent 9e083c87fe
commit 91d688bb62
2 changed files with 16 additions and 2 deletions

View File

@ -1,3 +1,3 @@
Start testing: Jan 19 15:13 EST
Start testing: Jan 22 08:33 EST
----------------------------------------------------------
End testing: Jan 19 15:13 EST
End testing: Jan 22 08:33 EST

View File

@ -24,12 +24,16 @@
#include <initializer_list>
#include <vector>
#include "blt/std/hashmap.h"
#include "blt/std/types.h"
template<typename T>
using allowed_funcs = std::vector<T>;
class empty {};
// #define FUNC_DEFINE(NAME, REQUIRED_ARGS, FUNC, ALLOWED)
#define FUNC_ALLOW_ANY std::vector<empty>();
#define FUNC_ALLOW_NONE std::vector<empty>();
@ -47,6 +51,7 @@ class empty {};
FUNC_DEFINE(SQRT, 1, void(), allowed_funcs(FUNC_ALLOW_ANY, FUNC_ALLOW_ANY)) \
#undef FUNC_ALLOW_ANY
#undef FUNC_ALLOW_NONE
#define FUNC_DEFINE(NAME, REQUIRED_ARGS, FUNC, ALLOWED) NAME,
enum class function_t
@ -57,9 +62,18 @@ enum class function_t
#define FUNC_DEFINE(NAME, REQUIRED_ARGS, FUNC, ALLOWED) function_t::NAME,
static inline allowed_funcs<function_t> FUNC_ALLOW_ANY_LIST{FUNC_FUNCTIONS};
static inline allowed_funcs<function_t> FUNC_ALLOW_NONE_LIST{};
#define FUNC_ALLOW_ANY FUNC_ALLOW_ANY_LIST
#define FUNC_ALLOW_NONE FUNC_ALLOW_NONE_LIST
#undef FUNC_DEFINE
#define FUNC_DEFINE(NAME, REQUIRED_ARGS, FUNC, ALLOWED) {REQUIRED_ARGS, function_t::NAME},
HASHMAP<blt::u32, function_t> function_arg_map = {
FUNC_FUNCTIONS
};
#undef FUNC_DEFINE
//enum class function_t
//{
// // FUNC // inputs