Commit a29e625a authored by Oliver Heidmann's avatar Oliver Heidmann
Browse files

added constructor to module_t

parent 4f9abdb6
......@@ -29,14 +29,20 @@ typedef void (*dyn_oper_t)(void *arg);
struct module_t
{
void *(*func)(void *); // Module
std::vector<std::string> help; // Help
std::vector<std::string> operators; // Operator names
short mode; // Module mode: 0:intern 1:extern
short number; // Allowed number type
short streamInCnt; // Number of input streams
short streamOutCnt; // Number of output streams
void *(*func)(void *); // Module
std::vector<std::string> help; // Help
std::vector<std::string> operators; // Operator names
short mode; // Module mode: 0:intern 1:extern
short number; // Allowed number type
short streamInCnt; // Number of input streams
short streamOutCnt; // Number of output streams
bool onlyFirst = false;
module_t(){};
module_t(void *(*p_func)(void *), std::vector<std::string> p_help, std::vector<std::string> p_opers, short p_m, short p_n,
short p_siC, short p_soC, bool p_onlyFirst = false)
: func(p_func), help(p_help), operators(p_opers), mode(p_m),number(p_n), streamInCnt(p_siC), streamOutCnt(p_soC), onlyFirst(p_onlyFirst)
{
}
};
/***
......@@ -59,15 +65,15 @@ static std::map<std::string, module_t> modules;
*/
static std::map<std::string, std::string> aliases;
//void *(*operatorModule(const char *operatorName))(void *);
// void *(*operatorModule(const char *operatorName))(void *);
module_t &getModule(const std::string &operatorName);
void init_modules();
std::vector<std::string> operatorHelp(const std::string &operatorName);
//int operatorStreamInCnt(const char *operatorName);
//int operatorStreamOutCnt(const char *operatorName);
// int operatorStreamInCnt(const char *operatorName);
// int operatorStreamOutCnt(const char *operatorName);
int operatorStreamNumber(const char *operatorName);
void operatorPrintAll(void);
......
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