actions: Compute the rule association during rules load

This commit is contained in:
Felipe Zimmerle
2020-05-18 15:08:17 -03:00
parent 374203b000
commit eb3e05646d
83 changed files with 842 additions and 415 deletions

View File

@@ -51,7 +51,15 @@ class RuleWithOperator : public RuleWithActions {
RuleWithOperator(const RuleWithOperator &op)
: RuleWithActions(op),
m_variables(op.m_variables),
m_operator(op.m_operator) { };
m_operator(op.m_operator)
{
for (auto &a : *m_variables.get()) {
variables::RuleVariable *vrule = dynamic_cast<variables::RuleVariable *>(a);
if (vrule != nullptr) {
vrule->populate(this);
}
}
};
RuleWithOperator &operator=(const RuleWithOperator& r) {
RuleWithActions::operator = (r);