1 13 14 package mondrian.olap.fun; 15 16 import mondrian.olap.*; 17 import mondrian.olap.type.Type; 18 19 import java.io.PrintWriter ; 20 21 29 class ValueFunDef extends FunDefBase { 30 private final int[] argTypes; 31 32 ValueFunDef(int[] argTypes) { 33 super( 34 "_Value()", 35 "_Value([<Member>, ...])", 36 "Pseudo-function which evaluates a tuple.", 37 Syntax.Parentheses, 38 Category.Numeric, 39 argTypes); 40 this.argTypes = argTypes; 41 } 42 43 public int getReturnCategory() { 44 return Category.Tuple; 45 } 46 47 public int[] getParameterCategories() { 48 return argTypes; 49 } 50 51 public void unparse(Exp[] args, PrintWriter pw) { 52 ExpBase.unparseList(pw, args, "(", ", ", ")"); 53 } 54 55 public Type getResultType(Validator validator, Exp[] args) { 56 return null; 57 } 58 59 } 60 61 | Popular Tags |