001/*
002// This software is subject to the terms of the Eclipse Public License v1.0
003// Agreement, available at the following URL:
004// http://www.eclipse.org/legal/epl-v10.html.
005// You must accept the terms of that agreement to use this software.
006//
007// Copyright (C) 2006-2006 Pentaho
008// All Rights Reserved.
009*/
010package mondrian.mdx;
011
012import mondrian.olap.*;
013
014/**
015 * Interface for a visitor to an MDX parse tree.
016 *
017 * @author jhyde
018 * @since Jul 21, 2006
019 */
020public interface MdxVisitor {
021    /**
022     * @return Indicates whether the visitee should call accept on it's children
023     */
024    boolean shouldVisitChildren();
025
026    /**
027     * Visits a Query.
028     *
029     * @see Query#accept(MdxVisitor)
030     */
031    Object visit(Query query);
032
033    /**
034     * Visits a QueryAxis.
035     *
036     * @see QueryAxis#accept(MdxVisitor)
037     */
038    Object visit(QueryAxis queryAxis);
039
040    /**
041     * Visits a Formula.
042     *
043     * @see Formula#accept(MdxVisitor)
044     */
045    Object visit(Formula formula);
046
047    /**
048     * Visits an UnresolvedFunCall.
049     *
050     * @see UnresolvedFunCall#accept(MdxVisitor)
051     */
052    Object visit(UnresolvedFunCall call);
053
054    /**
055     * Visits a ResolvedFunCall.
056     *
057     * @see ResolvedFunCall#accept(MdxVisitor)
058     */
059    Object visit(ResolvedFunCall call);
060
061    /**
062     * Visits an Id.
063     *
064     * @see Id#accept(MdxVisitor)
065     */
066    Object visit(Id id);
067
068    /**
069     * Visits a Parameter.
070     *
071     * @see ParameterExpr#accept(MdxVisitor)
072     */
073    Object visit(ParameterExpr parameterExpr);
074
075    /**
076     * Visits a DimensionExpr.
077     *
078     * @see DimensionExpr#accept(MdxVisitor)
079     */
080    Object visit(DimensionExpr dimensionExpr);
081
082    /**
083     * Visits a HierarchyExpr.
084     *
085     * @see HierarchyExpr#accept(MdxVisitor)
086     */
087    Object visit(HierarchyExpr hierarchyExpr);
088
089    /**
090     * Visits a LevelExpr.
091     *
092     * @see LevelExpr#accept(MdxVisitor)
093     */
094    Object visit(LevelExpr levelExpr);
095
096    /**
097     * Visits a MemberExpr.
098     *
099     * @see MemberExpr#accept(MdxVisitor)
100     */
101    Object visit(MemberExpr memberExpr);
102
103    /**
104     * Visits a NamedSetExpr.
105     *
106     * @see NamedSetExpr#accept(MdxVisitor)
107     */
108    Object visit(NamedSetExpr namedSetExpr);
109
110    /**
111     * Visits a Literal.
112     *
113     * @see Literal#accept(MdxVisitor)
114     */
115    Object visit(Literal literal);
116}
117
118// End MdxVisitor.java