mondrian.calc.impl
Class BetterExpCompiler

java.lang.Object
  extended by mondrian.calc.impl.AbstractExpCompiler
      extended by mondrian.calc.impl.BetterExpCompiler
All Implemented Interfaces:
ExpCompiler

public class BetterExpCompiler
extends AbstractExpCompiler

Enhanced expression compiler. It can generate code to convert between scalar types.

Since:
Sep 29, 2005
Author:
jhyde
 

Nested Class Summary
 
Nested classes/interfaces inherited from interface mondrian.calc.ExpCompiler
ExpCompiler.Factory
 
Constructor Summary
BetterExpCompiler(Evaluator evaluator, Validator validator)
           
BetterExpCompiler(Evaluator evaluator, Validator validator, List<ResultStyle> resultStyles)
           
 
Method Summary
 DoubleCalc compileDouble(Exp exp)
          Compiles an expression which yields a double result.
 ListCalc compileList(Exp exp, boolean mutable)
          Compiles an expression which yields List result.
 TupleCalc compileTuple(Exp exp)
          Compiles an expression which yields a tuple result.
 
Methods inherited from class mondrian.calc.impl.AbstractExpCompiler
compile, compileAs, compileBoolean, compileDateTime, compileDimension, compileHierarchy, compileInteger, compileIter, compileLevel, compileList, compileMember, compileScalar, compileString, getAcceptableResultStyles, getEvaluator, getValidator, registerParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BetterExpCompiler

public BetterExpCompiler(Evaluator evaluator,
                         Validator validator)

BetterExpCompiler

public BetterExpCompiler(Evaluator evaluator,
                         Validator validator,
                         List<ResultStyle> resultStyles)
Method Detail

compileDouble

public DoubleCalc compileDouble(Exp exp)
Description copied from interface: ExpCompiler
Compiles an expression which yields a double result.

Specified by:
compileDouble in interface ExpCompiler
Overrides:
compileDouble in class AbstractExpCompiler
Parameters:
exp - Expression
Returns:
Calculator which yields a double

compileTuple

public TupleCalc compileTuple(Exp exp)
Description copied from interface: ExpCompiler
Compiles an expression which yields a tuple result.

Specified by:
compileTuple in interface ExpCompiler
Overrides:
compileTuple in class AbstractExpCompiler
Parameters:
exp - Expression
Returns:
Calculator which yields a tuple

compileList

public ListCalc compileList(Exp exp,
                            boolean mutable)
Description copied from interface: ExpCompiler
Compiles an expression which yields List result.

Such an expression is generally a list of Member objects or a list of tuples (each represented by a Member array).

See ExpCompiler.compileList(mondrian.olap.Exp).

Specified by:
compileList in interface ExpCompiler
Overrides:
compileList in class AbstractExpCompiler
Parameters:
exp - Expression
mutable - Whether resulting list is mutable

SourceForge.net_Logo