|
|
@@ -45,10 +45,6 @@ template <class T> class ctx_Controller { |
|
|
|
isProcessingQueue = false; |
|
|
|
} |
|
|
|
|
|
|
|
void registerFunction(std::function<T(T)> f) { |
|
|
|
functions.push_back(f); |
|
|
|
} |
|
|
|
|
|
|
|
void registerCallback(std::function<void(T)> cb) { |
|
|
|
callbacks.push_back(cb); |
|
|
|
} |
|
|
@@ -65,6 +61,16 @@ template <class T> class ctx_Controller { |
|
|
|
callbacks.push_back(execCB); |
|
|
|
} |
|
|
|
|
|
|
|
void registerFunction(std::function<T(T)> f) { |
|
|
|
functions.push_back(f); |
|
|
|
} |
|
|
|
|
|
|
|
void registerFunctions(std::list<std::function<T(T)> > funcs) { |
|
|
|
for (const auto &f : funcs) { |
|
|
|
functions.push_back(f); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void reportContext() { |
|
|
|
for (const auto &cb : callbacks) { |
|
|
|
cb(context); |
|
|
|