001/* An entity that implements an explicit change context declares that it modifies variable values. 002 003 Copyright (c) 2003-2013 The Regents of the University of California. 004 All rights reserved. 005 Permission is hereby granted, without written agreement and without 006 license or royalty fees, to use, copy, modify, and distribute this 007 software and its documentation for any purpose, provided that the above 008 copyright notice and the following two paragraphs appear in all copies 009 of this software. 010 011 IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 012 FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 013 ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF 014 THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF 015 SUCH DAMAGE. 016 017 THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, 018 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 019 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE 020 PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF 021 CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, 022 ENHANCEMENTS, OR MODIFICATIONS. 023 024 PT_COPYRIGHT_VERSION_2 025 COPYRIGHTENDKEY 026 027 */ 028package ptolemy.actor.util; 029 030import java.util.List; 031 032import ptolemy.kernel.Entity; 033import ptolemy.kernel.util.IllegalActionException; 034import ptolemy.kernel.util.Nameable; 035 036/////////////////////////////////////////////////////////////////// 037//// ExplicitChangeContext 038 039/** 040 An entity that implements an explicit change context declares a 041 change context, in which parameters are modified. If the 042 ExplicitChangeContext is an Entity, then the change context is 043 assumed to be the entity. If the ExplicitChangeContext is not an 044 entity, but directly contained by an entity, then that entity is 045 considered to be the change context. This capability allows 046 directors to easily declare change contexts. The information 047 declared by this class is used by the ConstVariableModelAnalysis to 048 determine what parameters might be modified by a given entity. 049 050 @author Steve Neuendorffer 051 @version $Id$ 052 @since Ptolemy II 4.0 053 @Pt.ProposedRating Red (neuendor) 054 @Pt.AcceptedRating Red (neuendor) 055 @see ptolemy.actor.util.ConstVariableModelAnalysis 056 */ 057public interface ExplicitChangeContext extends Nameable { 058 /////////////////////////////////////////////////////////////////// 059 //// public methods //// 060 061 /** Return a list of variables that this entity modifies. The 062 * variables are assumed to have a change context of the given 063 * entity. 064 * @return A list of variables. 065 * @exception IllegalActionException If the list of modified 066 * variables cannot be returned. 067 */ 068 public List getModifiedVariables() throws IllegalActionException; 069 070 /** Return the change context being made explicit. In simple cases, this 071 * will simply be the entity implementing this interface. However, in 072 * more complex cases, directors may implement this interface, or entities 073 * may modify parameters according to a different change context (i.e. HDF) 074 * @return The change context being made explicit. 075 * @exception IllegalActionException If the context is not available. 076 */ 077 public Entity getContext() throws IllegalActionException; 078}