| | |
| | | #ifndef PARAMCTRL_H_ |
| | | #define PARAMCTRL_H_ |
| | | |
| | | #include "module_def.h" |
| | | #include "../param_ctrl.h" |
| | | #include "../ModuleExport.h" |
| | | |
| | | class tg_param_ctrl_t : public param_ctrl_t |
| | | { |
| | |
| | | |
| | | public: |
| | | tg_param_ctrl_t(); |
| | | |
| | | template<typename A> |
| | | bool decide_modu_type_equal(A *pmodu, s16 dst_ch, s16 src_ch) |
| | | { |
| | | bool ret = false; |
| | | |
| | | const auto& dst_module = pmodu[dst_ch]; |
| | | const auto& src_module = pmodu[src_ch]; |
| | | |
| | | if (dst_module.proc_type == src_module.proc_type) { |
| | | switch (dst_module.proc_type) { |
| | | case PROC_EQ: { |
| | | ptag_eq dst_eq = (ptag_eq)&dst_module.proc_ins; |
| | | ptag_eq src_eq = (ptag_eq)&src_module.proc_ins; |
| | | ret = (dst_eq->nsection == src_eq->nsection); |
| | | break; |
| | | } |
| | | case PROC_GEQ: { |
| | | ptag_geq dst_geq = (ptag_geq)&dst_module.proc_ins; |
| | | ptag_geq src_geq = (ptag_geq)&src_module.proc_ins; |
| | | ret = (dst_geq->nsections == src_geq->nsections); |
| | | break; |
| | | } |
| | | default: |
| | | ret = true; |
| | | break; |
| | | } |
| | | } |
| | | return ret; |
| | | } |
| | | }; |
| | | |
| | | #endif |