refactor: 切换 build_algorithm 工厂到算法子类 + CMake 更新
This commit is contained in:
parent
ae7834adaa
commit
032f0d0978
@ -1,13 +1,15 @@
|
||||
#include <eqpalg/algs/roller2.h>
|
||||
#include <eqpalg/algs/trend_slope2.h>
|
||||
#include <eqpalg/build_algorithm.h>
|
||||
// for default case
|
||||
#include <eqpalg/algs/exp_base.h>
|
||||
#include <eqpalg/algs/bound_alg.h>
|
||||
#include <eqpalg/algs/bound_hold_alg.h>
|
||||
#include <eqpalg/algs/exp_bound.h>
|
||||
#include <eqpalg/algs/exp_sample2D.h>
|
||||
#include <eqpalg/algs/exp_times.h>
|
||||
#include <eqpalg/algs/fault_code.h>
|
||||
#include <eqpalg/algs/feedback_alg.h>
|
||||
#include <eqpalg/algs/glitch_detection.h>
|
||||
#include <eqpalg/algs/logic_alg.h>
|
||||
#include <eqpalg/algs/null.h>
|
||||
#include <eqpalg/algs/roller3.h>
|
||||
#include <eqpalg/algs/trend_slope3.h>
|
||||
@ -19,11 +21,19 @@ std::unique_ptr<AlgBase> build_algorithm(int algId, const string &ruleId,
|
||||
LOG d("build_algorithm");
|
||||
switch (algId) {
|
||||
case 1:
|
||||
return std::make_unique<LogicAlg>(name, rule_json, ruleId);
|
||||
break;
|
||||
case 2:
|
||||
return std::make_unique<BoundAlg>(name, rule_json, ruleId);
|
||||
break;
|
||||
case 3:
|
||||
return std::make_unique<FeedbackAlg>(name, rule_json, ruleId, algId);
|
||||
break;
|
||||
case 4:
|
||||
return std::make_unique<FeedbackAlg>(name, rule_json, ruleId, algId);
|
||||
break;
|
||||
case 5:
|
||||
return std::make_unique<ExpBase>(name, rule_json, ruleId, algId);
|
||||
return std::make_unique<BoundHoldAlg>(name, rule_json, ruleId);
|
||||
break;
|
||||
case 6:
|
||||
case 7:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user