private void loadCSPConstraints(MocaNode actNode) { MocaNode constraintsNode = actNode.getChildNodeWithName(ConstraintsChildNodeName); if (constraintsNode != null) { Constraints.Clear(); foreach (MocaNode constraintNode in actNode.getChildNodeWithName(ConstraintsChildNodeName).Children) { if (constraintNode.Name == DeclarationsChildNodeName) { foreach (MocaNode constraintNodeReal in constraintNode.Children) { CSPConstraint newConstr = new CSPConstraint(); newConstr.deserializeFromMocaTree(constraintNodeReal); this.Constraints.Add(newConstr); } } else if (constraintNode.Name == ConstraintInstancesChildNodeName) { } else { CSPConstraint newConstr = new CSPConstraint(); newConstr.deserializeFromMocaTree(constraintNode); this.Constraints.Add(newConstr); } } } CSPUtil.addDefaultConstraints(Constraints); this.Constraints.Sort(new CSPConstraintComparer()); CSPUtil.recomputeConstraintIndizes(Constraints); }
internal void recomputeConstraintIndizes() { CSPUtil.recomputeConstraintIndizes(getConstraints()); }