Package reportgen.math.reference.operator

Examples of reportgen.math.reference.operator.MathExpressionOperatorRef


    public static final ContextGroup GROUP = new UnaryCondContextGroup();
    public static final String TAG = "unarynull";

    public MathExpressionConditionUnaryNull(Context context) {
        super(context);
        MathExpressionOperatorRef operator = new MathExpressionOperatorRef(
                MathOperatorUnary.ISNULL,
                getChildContext(MathExpressionOperatorRef.GROUP)
        );
        setOperator(operator);
    }
View Full Code Here


    public MathExpressionConditionBinary(Context context) {
        super(context);
        left = new MathExpresionConditionLeft(getChildContext(MathExpresionConditionLeft.GROUP));
        right = new MathExpresionConditionRight(getChildContext(MathExpresionConditionRight.GROUP));
        operator = new MathExpressionOperatorRef(MathOperatorBinary.EQUAL,
                getChildContext(MathExpressionOperatorRef.GROUP));
    }
View Full Code Here

    public MathExpressionConditionBinary (Element element,
            Context context) throws ReportException {
        super(element, context);

        operator = new MathExpressionOperatorRef(
                get(element, MathExpressionOperatorRef.TAG),
                getChildContext(MathExpressionOperatorRef.GROUP)
        );
        right = new MathExpresionConditionRight(
                get(element, MathExpresionConditionRight.RIGHT),
View Full Code Here

        if(tag.equals(MathExpressionSubReportColumnRef.TAG)) {
            express = new MathExpressionSubReportColumnRef(element,
                    cf.getChildContext(MathExpressionSubReportColumnRef.GROUP));

        } else if(tag.equals(MathExpressionOperatorRef.TAG)) {
            express = new MathExpressionOperatorRef(element,
                    cf.getChildContext(MathExpressionOperatorRef.GROUP));

        } else if(tag.equals(MathExpressionFunction.TAG)) {
            express = new MathExpressionFunction(element,
                    cf.getChildContext(MathExpressionFunction.GROUP));
View Full Code Here

        Class eax = ((MathExpressionOperand) calcstack.pop()).getCls();
        while (!calcstack.empty()) {
            Object express1 = calcstack.pop();
            Object express2 = calcstack.pop();
            if (express2 instanceof MathExpressionOperatorRef) {
                MathExpressionOperatorRef operator = (MathExpressionOperatorRef) express2;
                Class op2Class = getExpressionClass(express1);
                MathOperatorBinary opcode = (MathOperatorBinary) operator.getRef();
                eax = opcode.checkAvailiable(eax, op2Class);
            } else {
                MathExpressionOperatorRef operator = (MathExpressionOperatorRef) calcstack.pop();
                Class op1Class = getExpressionClass(express1);
                Class op2Class = getExpressionClass(express2);
                MathOperatorBinary opcode = (MathOperatorBinary) operator.getRef();
                Class res = opcode.checkAvailiable(op1Class, op2Class);
                calcstack.push(res);
            }
        }
        return eax;
View Full Code Here

        Object eax = ((MathExpressionOperand) calcstack.pop()).getValue(constants);
        while (!calcstack.empty()) {
            Object express1 = calcstack.pop();
            Object express2 = calcstack.pop();
            if (express2 instanceof MathExpressionOperatorRef) {
                MathExpressionOperatorRef operator = (MathExpressionOperatorRef) express2;
                Object op2Value = getExpressionValue(express1, constants);
                MathOperatorBinary opcode = (MathOperatorBinary) operator.getRef();
                eax = opcode.getValue(eax, op2Value);
            } else {
                MathExpressionOperatorRef operator = (MathExpressionOperatorRef) calcstack.pop();
                Object op1Value = getExpressionValue(express1, constants);
                Object op2Value = getExpressionValue(express2, constants);
                MathOperatorBinary opcode = (MathOperatorBinary) operator.getRef();
                Object res = opcode.getValue(op1Value, op2Value);
                calcstack.push(res);
            }
        }
View Full Code Here

            throw new ReportException("Пустое выражение");
        }
        //get min priority operand
        int pos = -1;
        int priority = Integer.MAX_VALUE;
        MathExpressionOperatorRef operator = null;
        for(int j=end; j>=beg; j--) {
            MathExpression element = elem.get(j);
            if(element instanceof MathExpressionOperatorRef) {
                MathExpressionOperatorRef iOperator = (MathExpressionOperatorRef) element;
                int prior = iOperator.getRef().getPriority();
                if(prior < priority) {
                    priority = prior;
                    pos = j;
                    operator = iOperator;
                }
View Full Code Here

    }

    public MathExpressionConditionUnary(Element element, Context context) throws ReportException {
        super(element, context);

        operator = new MathExpressionOperatorRef(
                get(element, MathExpressionOperatorRef.TAG),
                getChildContext(MathExpressionOperatorRef.GROUP)
        );

        Iterator children = element.getChildren().iterator();
View Full Code Here

    public static final ContextGroup GROUP = new UnaryExistCondContextGroup();
    public static final String TAG = "unaryexist";

    public MathExpressionConditionUnaryExist(Context context) {
        super(context);
        MathExpressionOperatorRef operator = new MathExpressionOperatorRef(
                MathOperatorUnary.EXISTS,
                getChildContext(MathExpressionOperatorRef.GROUP)
        );
        setOperator(operator);
    }
View Full Code Here

TOP

Related Classes of reportgen.math.reference.operator.MathExpressionOperatorRef

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.