Commit 813bf75b authored by Oliver Heidmann's avatar Oliver Heidmann
Browse files

added macro definitions for io types, added toString method for modules_t, added findModule method

parent 94e4d99e
......@@ -23,6 +23,12 @@
#include <array>
#include <vector>
#define OBASE \
-1 // Obase uses input name as base name for files e.g 'test' gets used as test_001 test_002 which are created inside the
// operator
#define INTERNAL 0
#define EXPOSED 1
/***
type definition for module functions loaded from a custom module
*/
......@@ -46,12 +52,13 @@ struct module_t
short streamOutCnt; // Number of output streams
ModuleRestrictions restrictions = NoRestriction;
module_t(){};
module_t(void *(*p_func)(void *), const char **p_help, const std::vector<std::string> &p_opers,
short p_m, short p_n, short p_siC, short p_soC, ModuleRestrictions p_onlyFirst)
module_t(void *(*p_func)(void *), const char **p_help, const std::vector<std::string> &p_opers, short p_m, short p_n, short p_siC,
short p_soC, ModuleRestrictions p_onlyFirst)
: func(p_func), help(p_help), operators(p_opers), mode(p_m), number(p_n), streamInCnt(p_siC), streamOutCnt(p_soC),
restrictions(p_onlyFirst)
{
}
std::string toString();
};
/***
......@@ -78,6 +85,7 @@ void registerOperatorsFromModules();
// void *(*operatorModule(const char *operatorName))(void *);
std::map<std::string, module_t>::iterator findModule(const std::string &operatorName);
module_t &getModule(const std::string &operatorName);
void init_modules();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment