small func update
parent
9e083c87fe
commit
91d688bb62
|
@ -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
|
||||||
|
|
|
@ -24,12 +24,16 @@
|
||||||
|
|
||||||
#include <initializer_list>
|
#include <initializer_list>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include "blt/std/hashmap.h"
|
||||||
|
#include "blt/std/types.h"
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
using allowed_funcs = std::vector<T>;
|
using allowed_funcs = std::vector<T>;
|
||||||
|
|
||||||
class empty {};
|
class empty {};
|
||||||
|
|
||||||
|
// #define FUNC_DEFINE(NAME, REQUIRED_ARGS, FUNC, ALLOWED)
|
||||||
|
|
||||||
#define FUNC_ALLOW_ANY std::vector<empty>();
|
#define FUNC_ALLOW_ANY std::vector<empty>();
|
||||||
#define FUNC_ALLOW_NONE 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)) \
|
FUNC_DEFINE(SQRT, 1, void(), allowed_funcs(FUNC_ALLOW_ANY, FUNC_ALLOW_ANY)) \
|
||||||
|
|
||||||
#undef FUNC_ALLOW_ANY
|
#undef FUNC_ALLOW_ANY
|
||||||
|
#undef FUNC_ALLOW_NONE
|
||||||
|
|
||||||
#define FUNC_DEFINE(NAME, REQUIRED_ARGS, FUNC, ALLOWED) NAME,
|
#define FUNC_DEFINE(NAME, REQUIRED_ARGS, FUNC, ALLOWED) NAME,
|
||||||
enum class function_t
|
enum class function_t
|
||||||
|
@ -57,9 +62,18 @@ enum class function_t
|
||||||
|
|
||||||
#define FUNC_DEFINE(NAME, REQUIRED_ARGS, FUNC, ALLOWED) function_t::NAME,
|
#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_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_ANY FUNC_ALLOW_ANY_LIST
|
||||||
|
#define FUNC_ALLOW_NONE FUNC_ALLOW_NONE_LIST
|
||||||
#undef FUNC_DEFINE
|
#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
|
//enum class function_t
|
||||||
//{
|
//{
|
||||||
// // FUNC // inputs
|
// // FUNC // inputs
|
||||||
|
|
Loading…
Reference in New Issue