001    /*
002    // $Id: //open/mondrian-release/3.2/src/main/mondrian/calc/impl/AbstractDateTimeCalc.java#1 $
003    // This software is subject to the terms of the Eclipse Public License v1.0
004    // Agreement, available at the following URL:
005    // http://www.eclipse.org/legal/epl-v10.html.
006    // Copyright (C) 2008-2009 Julian Hyde
007    // All Rights Reserved.
008    // You must accept the terms of that agreement to use this software.
009    */
010    package mondrian.calc.impl;
011    
012    import mondrian.olap.Evaluator;
013    import mondrian.olap.Exp;
014    import mondrian.calc.*;
015    
016    /**
017     * Abstract implementation of the {@link mondrian.calc.DateTimeCalc} interface.
018     *
019     * <p>The derived class must
020     * implement the {@link #evaluateDateTime(mondrian.olap.Evaluator)} method,
021     * and the {@link #evaluate(mondrian.olap.Evaluator)} method will call it.
022     *
023     * @author jhyde
024     * @version $Id: //open/mondrian-release/3.2/src/main/mondrian/calc/impl/AbstractDateTimeCalc.java#1 $
025     * @since Sep 26, 2005
026     */
027    public abstract class AbstractDateTimeCalc
028        extends AbstractCalc
029        implements DateTimeCalc
030    {
031        /**
032         * Creates an AbstractDateTimeCalc.
033         *
034         * @param exp Source expression
035         * @param calcs Child compiled expressions
036         */
037        protected AbstractDateTimeCalc(Exp exp, Calc[] calcs) {
038            super(exp, calcs);
039        }
040    
041        public Object evaluate(Evaluator evaluator) {
042            return evaluateDateTime(evaluator);
043        }
044    }
045    
046    // End AbstractDateTimeCalc.java