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.olap.*; 014 015/** 016 * Expression which yields the value of the current member in the current 017 * dimensional context. 018 * 019 * @see mondrian.calc.impl.MemberValueCalc 020 * 021 * @author jhyde 022 * @since Sep 27, 2005 023 */ 024public class ValueCalc extends GenericCalc { 025 /** 026 * Creates a ValueCalc. 027 * 028 * @param exp Source expression 029 */ 030 public ValueCalc(Exp exp) { 031 super(exp, new Calc[0]); 032 } 033 034 public Object evaluate(Evaluator evaluator) { 035 return evaluator.evaluateCurrent(); 036 } 037 038 public boolean dependsOn(Hierarchy hierarchy) { 039 return true; 040 } 041} 042 043// End ValueCalc.java