コード例 #1
0
		public void AddLogicalExpression(LogicalExpression newValue)
		{
			AppendDomElement("", "LogicalExpression", newValue);
		}
コード例 #2
0
ファイル: LogicalType.cs プロジェクト: lickey10/u_Behaviors
 public void InsertRHSLogicalExpressionAt(LogicalExpression newValue, int index)
 {
     InsertDomElementAt("", "RHSLogicalExpression", index, newValue);
 }
コード例 #3
0
ファイル: LogicalType.cs プロジェクト: lickey10/u_Behaviors
 public void ReplaceRHSLogicalExpressionAt(LogicalExpression newValue, int index)
 {
     ReplaceDomElementAt("", "RHSLogicalExpression", index, newValue);
 }
コード例 #4
0
		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;
		}
コード例 #5
0
ファイル: LogicalType.cs プロジェクト: lickey10/u_Behaviors
 public void AddRHSLogicalExpression(LogicalExpression newValue)
 {
     AppendDomElement("", "RHSLogicalExpression", newValue);
 }
コード例 #6
0
		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;
		}
コード例 #7
0
ファイル: RuleType.cs プロジェクト: lickey10/u_Behaviors
 public void AddCondition(LogicalExpression newValue)
 {
     AppendDomElement("", "Condition", newValue);
 }
コード例 #8
0
 public UnaryEnumerator(LogicalExpression par)
 {
     parent = par;
     nIndex = -1;
 }
コード例 #9
0
 public RelationalEnumerator(LogicalExpression par)
 {
     parent = par;
     nIndex = -1;
 }
コード例 #10
0
			public RelationalEnumerator(LogicalExpression par) 
			{
				parent = par;
				nIndex = -1;
			}
コード例 #11
0
			public ValueEnumerator(LogicalExpression par) 
			{
				parent = par;
				nIndex = -1;
			}
コード例 #12
0
			public UnaryEnumerator(LogicalExpression par) 
			{
				parent = par;
				nIndex = -1;
			}
コード例 #13
0
		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;
        }
コード例 #14
0
		public LogicalExpression MakeLogical(Value value)
		{
			LogicalExpression logicalExpression = new LogicalExpression();
			
			logicalExpression.AddValue(value);  					   
			
			return logicalExpression;
		}
コード例 #15
0
		public void InsertLogicalExpressionAt(LogicalExpression newValue, int index)
		{
			InsertDomElementAt("", "LogicalExpression", index, newValue);
		}
コード例 #16
0
 public ValueEnumerator(LogicalExpression par)
 {
     parent = par;
     nIndex = -1;
 }
コード例 #17
0
		public void ReplaceLogicalExpressionAt(LogicalExpression newValue, int index)
		{
			ReplaceDomElementAt("", "LogicalExpression", index, newValue);
		}
コード例 #18
0
        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;
        }