public override bool Cover( OperationNode patternOp, CoveringInfo coveringInfo) { bool result = false; if (IsCoverableWith(patternOp)) { UnaryOperationNode unaryPatternOp = (UnaryOperationNode) patternOp; if (OperandValue.Cover(unaryPatternOp.OperandValue, coveringInfo)) { coveringInfo.CoveredOperations.Add(this); result = true; } } return result; }
public abstract bool Cover( OperationNode patternOp, CoveringInfo coveringInfo);
public virtual bool IsCoverableWith(OperationNode patternOp) { return this.OperationType == patternOp.OperationType; }
public override bool Cover( OperationNode patternOp, CoveringInfo coveringInfo) { bool result = false; if (IsCoverableWith(patternOp)) { BinaryOperationNode binaryPatternOp = (BinaryOperationNode) patternOp; if (LeftOperandValue.Cover(binaryPatternOp.LeftOperandValue, coveringInfo) && RightOperandValue.Cover(binaryPatternOp.RightOperandValue, coveringInfo)) { coveringInfo.CoveredOperations.Add(this); result = true; } } return result; }