コード例 #1
0
ファイル: AndOr.cs プロジェクト: chubbyerror/BpmNet
        /// <summary>
        /// Recursively pop operators and operands
        /// </summary>
        /// <param name="operands"></param>
        /// <param name="operators"></param>
        private void Pop(Stack operands, Stack operators)
        {
            operators.Pop();

            AndOrElement andOrChild = MyLeftChild as AndOrElement;

            if (andOrChild == null)
            {
                operands.Pop();
            }
            else
            {
                andOrChild.Pop(operands, operators);
            }

            andOrChild = MyRightChild as AndOrElement;

            if (andOrChild == null)
            {
                operands.Pop();
            }
            else
            {
                andOrChild.Pop(operands, operators);
            }
        }
コード例 #2
0
ファイル: AndOr.cs プロジェクト: chubbyerror/BpmNet
        private void PopRightChild(Stack operands, Stack operators)
        {
            AndOrElement andOrChild = MyRightChild as AndOrElement;

            // What kind of child do we have?
            if ((andOrChild != null))
            {
                // Another and/or expression so recurse
                andOrChild.Pop(operands, operators);
            }
            else
            {
                // A terminal so pop it off the operands stack
                operands.Pop();
            }
        }