public void AddLogicalExpression(LogicalExpression newValue) { AppendDomElement("", "LogicalExpression", newValue); }
public void InsertRHSLogicalExpressionAt(LogicalExpression newValue, int index) { InsertDomElementAt("", "RHSLogicalExpression", index, newValue); }
public void ReplaceRHSLogicalExpressionAt(LogicalExpression newValue, int index) { ReplaceDomElementAt("", "RHSLogicalExpression", index, newValue); }
NodeBase CreateLogicalNode(LogicalExpression exp) { NodeBase node = null; if (exp.HasUnary()) { node = new LogicalNode(m_Container); ((LogicalNode)node).m_LogicalType = LogicalOperatorType.NOT; node.AddChild(CreateLogicalNode(exp.GetUnary().GetLogicalExpression())); } else if (exp.HasRelational()) { node = new RelationalNode(m_Container); RelationalOperator op = exp.GetRelational().GetRelationalOperator(); if (op.HasEquals()) ((RelationalNode)node).m_RelationType = RelationType.EQUAL; else if (op.HasGreaterThan()) ((RelationalNode)node).m_RelationType = RelationType.GREATERTHAN; else if (op.HasGreaterThanOrEquals()) ((RelationalNode)node).m_RelationType = RelationType.GREATERTHANOREQUAL; else if (op.HasLessThan()) ((RelationalNode)node).m_RelationType = RelationType.LESSTHAN; else if (op.HasLessThanOrEquals()) ((RelationalNode)node).m_RelationType = RelationType.LESSTHANOREQUAL; else if (op.HasNotEquals()) ((RelationalNode)node).m_RelationType = RelationType.NOTEQUAL; node.AddChild(CreateArithmeticNode(exp.GetRelational().GetLHSArithmeticExpression())); node.AddChild(CreateArithmeticNode(exp.GetRelational().GetRHSArithmeticExpression())); } else if (exp.HasLogical()) { node = new LogicalNode(m_Container); if (exp.GetLogical().GetLogicalOperator().HasAnd()) ((LogicalNode)node).m_LogicalType = LogicalOperatorType.AND; else ((LogicalNode)node).m_LogicalType = LogicalOperatorType.OR; node.AddChild(CreateLogicalNode(exp.GetLogical().GetLHSLogicalExpression())); node.AddChild(CreateLogicalNode(exp.GetLogical().GetRHSLogicalExpression())); } else if (exp.HasValue()) { if (exp.GetValue().HasConstant()) { node = new ConstantNode(m_Container); ((ConstantNode)node).m_ConstantValue = exp.GetValue().GetConstant().GetBoolean().Value; ((ConstantNode)node).m_ConstantType = VariableType.BOOLEAN; } else { node = new VariableNode(m_Container); ((VariableNode)node).m_VariableName = exp.GetValue().GetVariable().GetName().Value; ((VariableNode)node).m_VariableType = VariableType.BOOLEAN; } } return node; }
public void AddRHSLogicalExpression(LogicalExpression newValue) { AppendDomElement("", "RHSLogicalExpression", newValue); }
public LogicalExpression MakeLogical(LogicalExpression rhs) { UnaryOperator logicalOp = new UnaryOperator(); logicalOp.AddNot(new Altova.Types.SchemaString("Not")); UnaryType newUnaryExpression = new UnaryType(); newUnaryExpression.AddUnaryOperator(logicalOp); newUnaryExpression.AddLogicalExpression(rhs); LogicalExpression newLogical = new LogicalExpression(); newLogical.AddUnary(newUnaryExpression); return newLogical; }
public void AddCondition(LogicalExpression newValue) { AppendDomElement("", "Condition", newValue); }
public UnaryEnumerator(LogicalExpression par) { parent = par; nIndex = -1; }
public RelationalEnumerator(LogicalExpression par) { parent = par; nIndex = -1; }
public ValueEnumerator(LogicalExpression par) { parent = par; nIndex = -1; }
public LogicalExpression MakeRelationalExperssion(string op, ArithmeticExpression lhs, ArithmeticExpression rhs) { RelationalOperator relationalOp = new RelationalOperator(); if (op == "==") relationalOp.AddEquals(new Altova.Types.SchemaString("Equals")); else if (op == "!=") relationalOp.AddNotEquals(new Altova.Types.SchemaString("NotEquals")); else if (op == "<") relationalOp.AddLessThan(new Altova.Types.SchemaString("LessThan")); else if (op == "<=") relationalOp.AddLessThanOrEquals(new Altova.Types.SchemaString("LessThanOrEquals")); else if (op == ">") relationalOp.AddGreaterThan(new Altova.Types.SchemaString("GreaterThan")); else if (op == "<=") relationalOp.AddGreaterThanOrEquals(new Altova.Types.SchemaString("GreaterThanOrEquals")); RelationalType relationalExpression = MakeRelational(relationalOp, lhs, rhs); LogicalExpression newLogical = new LogicalExpression(); newLogical.AddRelational(relationalExpression); return newLogical; }
public LogicalExpression MakeLogical(Value value) { LogicalExpression logicalExpression = new LogicalExpression(); logicalExpression.AddValue(value); return logicalExpression; }
public void InsertLogicalExpressionAt(LogicalExpression newValue, int index) { InsertDomElementAt("", "LogicalExpression", index, newValue); }
public void ReplaceLogicalExpressionAt(LogicalExpression newValue, int index) { ReplaceDomElementAt("", "LogicalExpression", index, newValue); }
public LogicalExpression MakeLogical(string op, LogicalExpression lhs, LogicalExpression rhs) { LogicalOperator logicalOp = new LogicalOperator(); if (op == "And") logicalOp.AddAnd(new Altova.Types.SchemaString("And")); else logicalOp.AddOr(new Altova.Types.SchemaString("Or")); LogicalType newLogicalExpression = new LogicalType(); newLogicalExpression.AddLHSLogicalExpression(lhs); newLogicalExpression.AddLogicalOperator(logicalOp); newLogicalExpression.AddRHSLogicalExpression(rhs); LogicalExpression newLogical = new LogicalExpression(); newLogical.AddLogical(newLogicalExpression); return newLogical; }