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-2009 Pentaho 008// All Rights Reserved. 009*/ 010package mondrian.calc.impl; 011 012import mondrian.calc.Calc; 013import mondrian.calc.TupleCalc; 014import mondrian.olap.Evaluator; 015import mondrian.olap.Exp; 016 017/** 018 * Abstract implementation of the {@link mondrian.calc.TupleCalc} interface. 019 * 020 * <p>The derived class must 021 * implement the {@link #evaluateTuple(mondrian.olap.Evaluator)} method, 022 * and the {@link #evaluate(mondrian.olap.Evaluator)} method will call it. 023 * 024 * @author jhyde 025 * @since Sep 27, 2005 026 */ 027public abstract class AbstractTupleCalc 028 extends AbstractCalc 029 implements TupleCalc 030{ 031 /** 032 * Creates an AbstractTupleCalc. 033 * 034 * @param exp Source expression 035 * @param calcs Child compiled expressions 036 */ 037 protected AbstractTupleCalc(Exp exp, Calc[] calcs) { 038 super(exp, calcs); 039 } 040 041 public Object evaluate(Evaluator evaluator) { 042 return evaluateTuple(evaluator); 043 } 044} 045 046// End AbstractTupleCalc.java