コード例 #1
0
ファイル: axis.cs プロジェクト: cornelius90/InnovatorAdmin
 // constructor
 internal Axis(AxisType axistype, AstNode input) {
     _axistype = axistype;
     _input = input;
     _prefix = String.Empty;
     _name = String.Empty;
     _nodetype =  XPathNodeType.All;
     this.abbrAxis = true;
 }
コード例 #2
0
ファイル: axis.cs プロジェクト: cornelius90/InnovatorAdmin
 // constructor
 internal Axis(
              AxisType axistype,
              AstNode input,
              String prefix,
              String name,
              XPathNodeType nodetype) {
     _axistype = axistype;
     _input = input;
     _prefix = prefix;
     _name = name;
     _nodetype = nodetype;
 }
コード例 #3
0
 internal Function(FunctionType ftype, AstNode arg) {
     _functionType = ftype;
     _argumentList = new ArrayList();
     _argumentList.Add(arg);
 }
コード例 #4
0
 internal Operator(Op op, AstNode opnd1, AstNode opnd2) {
     _operatorType = op;    
     _opnd1 = opnd1;
     _opnd2 = opnd2;
 }
コード例 #5
0
        private IQuery ProcessNode(AstNode root, IQuery qyInput) {
            IQuery result = null;

            if (root == null)
                return null;

            switch (root.TypeOfAst) {

                case AstNode.QueryType.Axis:
                    Axis axis = (Axis)root;
                    result = ProcessAxis(axis, ProcessNode(axis.Input, qyInput));
                    break;

                case AstNode.QueryType.Operator:
                    result = ProcessOperator((Operator)root, null);
                    break;

                case AstNode.QueryType.Filter:
                    result = ProcessFilter((Filter)root);
                    break;

                case AstNode.QueryType.ConstantOperand:
                    result = ProcessOperand((Operand)root);
                    break;

                case AstNode.QueryType.Function:
                    result = ProcessFunction((Function)root, qyInput);
                    break;

                case AstNode.QueryType.Root:
                    result = new AbsoluteQuery();
                    break;

                case AstNode.QueryType.Group:
                    result = new GroupQuery(ProcessNode(((Group)root).GroupNode, qyInput));
                    break;
                default:
                    Debug.Assert(false, "Unknown QueryType encountered!!");
                    break;
            }
            return result;
        }