A mutation request specified in MoML. This class provides the preferred mechanism for implementing mutations on a model while it is executing. To use it, create an instance of this class, specifying MoML code as an argument to the constructor. Then queue the instance of this class with a composite entity by calling its requestChange() method.
If a context is given to the constructor, then the MoML will be executed in that context. If that context has other objects that defer their MoML definitions to it (i.e., it is a class definition and there are instances of the class), then the MoML will also be executed in the context of those objects that defer to it. Thus, the change to a class will propagate to instances. If the context is (deeply) contained by another object that has objects that defer their MoML definitions to it, then the changes are also propagated to those objects. Thus, even when class definitions are nested within class definitions, a change within a class definition will propagate to all instances of the class(es).
The parser used to implement the change will be the parser contained by a ParserAttribute of the top-level element of the context. If no context is given, or there is no ParserAttribute in its top level, then a new parser is created, and a new ParserAttribute is placed in the top level.
Note that if a context is specified that is above a class definition, and a change within the class definition is made by referencing the contents of the class definition using dotted names, then the change will not propagate. Thus, changes should be made in the most specific context (lowest level in the hierarchy) possible.
@author Edward A. Lee
@version $Id: MoMLChangeRequest.java,v 1.71 2006/02/27 22:24:53 cxh Exp $
@since Ptolemy II 1.0
@Pt.ProposedRating Yellow (eal)
@Pt.AcceptedRating Red (neuendor)