001    /*
002    // $Id: //open/mondrian/src/main/mondrian/olap/FunCall.java#22 $
003    // This software is subject to the terms of the Common Public License
004    // Agreement, available at the following URL:
005    // http://www.opensource.org/licenses/cpl.html.
006    // Copyright (C) 1998-2002 Kana Software, Inc.
007    // Copyright (C) 2001-2006 Julian Hyde and others
008    // All Rights Reserved.
009    // You must accept the terms of that agreement to use this software.
010    */
011    package mondrian.olap;
012    
013    /**
014     * A <code>FunCall</code> is a function applied to a list of operands.
015     *
016     * <p>The parser creates function calls as an
017     * {@link mondrian.mdx.UnresolvedFunCall unresolved  function call}.
018     * The validator converts it to a
019     * {@link  mondrian.mdx.ResolvedFunCall resolved function call},
020     * which has a {@link FunDef function definition} and extra type information.
021     *
022     * @author jhyde
023     * @version $Id: //open/mondrian/src/main/mondrian/olap/FunCall.java#22 $
024     * @since Jan 6, 2006
025     */
026    public interface FunCall extends Exp {
027        /**
028         * Returns the <code>index</code><sup>th</sup> argument to this function
029         * call.
030         *
031         * @param index Ordinal of the argument
032         * @return <code>index</code><sup>th</sup> argument to this function call
033         */
034        Exp getArg(int index);
035    
036        /**
037         * Returns the arguments to this function.
038         *
039         * @return array of arguments
040         */
041        Exp[] getArgs();
042    
043        /**
044         * Returns the number of arguments to this function.
045         *
046         * @return number of arguments
047         */
048        int getArgCount();
049    
050        /**
051         * Returns the name of the function.
052         */
053        String getFunName();
054    
055        /**
056         * Returns the syntax of the call.
057         */
058        Syntax getSyntax();
059    }
060    
061    // End FunCall.java