Class CacheFunDef

  • All Implemented Interfaces:
    FunDef

    public class CacheFunDef
    extends FunDefBase
    Definition of the Cache system function, which is smart enough to evaluate its argument only once.
    Since:
    2005/8/14
    Author:
    jhyde
    • Constructor Detail

      • CacheFunDef

        CacheFunDef​(java.lang.String name,
                    java.lang.String signature,
                    java.lang.String description,
                    Syntax syntax,
                    int category,
                    Type type)
    • Method Detail

      • unparse

        public void unparse​(Exp[] args,
                            java.io.PrintWriter pw)
        Description copied from interface: FunDef
        Converts a function call into MDX source code.
        Specified by:
        unparse in interface FunDef
        Overrides:
        unparse in class FunDefBase
      • compileCall

        public Calc compileCall​(ResolvedFunCall call,
                                ExpCompiler compiler)
        Description copied from interface: FunDef
        Converts a call to this function into executable objects.

        The result must implement the appropriate interface for the result type. For example, a function which returns an integer must return an object which implements IntegerCalc.

        Specified by:
        compileCall in interface FunDef
        Overrides:
        compileCall in class FunDefBase