Example #1
0
        static SimpleType()
        {
            NumericalEquals    eq    = new NumericalEquals();
            NumericalNotEquals noteq = new NumericalNotEquals();

            NumericalGreaterOrEqualThan greq = new NumericalGreaterOrEqualThan();
            NumericalLessOrEqualThan    leeq = new NumericalLessOrEqualThan();
            NumericalGreaterThan        gre  = new NumericalGreaterThan();
            NumericalLessThan           leq  = new NumericalLessThan();

            Integer.AddBinaryOperator(OperatorType.Addition, new IntegerAddition());
            Integer.AddBinaryOperator(OperatorType.Multiplication, new IntegerMultiplication());
            Integer.AddBinaryOperator(OperatorType.Substraction, new IntegerSubstraction());
            Integer.AddBinaryOperator(OperatorType.Division, new IntegerDivision());

            Integer.AddBinaryOperator(OperatorType.Equals, eq);
            Integer.AddBinaryOperator(OperatorType.NotEquals, noteq);
            Integer.AddBinaryOperator(OperatorType.Modulo, new IntegerModulo());

            Integer.AddBinaryOperator(OperatorType.GreaterOrEqualThan, greq);
            Integer.AddBinaryOperator(OperatorType.GreaterThan, gre);
            Integer.AddBinaryOperator(OperatorType.LessOrEqualThan, leeq);
            Integer.AddBinaryOperator(OperatorType.LessThan, leq);

            Real.AddBinaryOperator(OperatorType.Addition, new RealAddition());
            Real.AddBinaryOperator(OperatorType.Multiplication, new RealMultiplication());
            Real.AddBinaryOperator(OperatorType.Substraction, new RealSubstraction());
            Real.AddBinaryOperator(OperatorType.Division, new RealDivision());

            Real.AddBinaryOperator(OperatorType.Equals, eq);
            Real.AddBinaryOperator(OperatorType.NotEquals, noteq);

            Real.AddBinaryOperator(OperatorType.GreaterOrEqualThan, greq);
            Real.AddBinaryOperator(OperatorType.GreaterThan, gre);
            Real.AddBinaryOperator(OperatorType.LessOrEqualThan, leeq);
            Real.AddBinaryOperator(OperatorType.LessThan, leq);

            String.AddBinaryOperator(OperatorType.Addition, new StringConcatenation());
            String.AddBinaryOperator(OperatorType.Equals, new StringEquals());
            String.AddBinaryOperator(OperatorType.NotEquals, new StringNotEquals());
            String.AddBinaryOperator(OperatorType.GreaterThan, new StringGreaterThan());
            String.AddBinaryOperator(OperatorType.GreaterOrEqualThan, new StringGreaterOrEqualThan());
            String.AddBinaryOperator(OperatorType.LessThan, new StringLessThan());
            String.AddBinaryOperator(OperatorType.LessOrEqualThan, new StringLessOrEqualThan());

            Boolean.AddUnaryOperator(OperatorType.Not, new BooleanNegation());
            Boolean.AddBinaryOperator(OperatorType.And, new BooleanAnd());
            Boolean.AddBinaryOperator(OperatorType.Or, new BooleanOr());

            Boolean.AddBinaryOperator(OperatorType.Equals, eq);
            Boolean.AddBinaryOperator(OperatorType.NotEquals, noteq);

            Boolean.AddBinaryOperator(OperatorType.GreaterOrEqualThan, greq);
            Boolean.AddBinaryOperator(OperatorType.GreaterThan, gre);
            Boolean.AddBinaryOperator(OperatorType.LessOrEqualThan, leeq);
            Boolean.AddBinaryOperator(OperatorType.LessThan, leq);
        }