From 6923bec28959c5a4e94045b70b71386c003e4c2b Mon Sep 17 00:00:00 2001 From: JailDoctor Date: Thu, 29 Apr 2021 18:59:08 +0200 Subject: [PATCH] function module' interface defined --- function.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/function.h b/function.h index 9b3214f..b826441 100644 --- a/function.h +++ b/function.h @@ -2,5 +2,18 @@ #include #include -const uint32_t function_create(const std::string name); -void function_parameter_add(const uint32_t id, const std::string name, const ) \ No newline at end of file +// Register a new function. Returns false if a function with the same name already exists +const bool function_register(const std::string name, const uint32_t address); + +// Add a parameter to the last registered function +void function_parameter_add(const std::string name, const int type); + + +// Retrieve the address of the specified function, or zero if there's no such function +const uint32_t function_get_address(const std::string name); + +// Retrieve the number of parameters of the last searched function +const int function_get_num_parameters(); + +// Retrieve the type of the nth parameter of the last searched function +const int function_get_parameter_type(const int index);