InstantiableNamedObj
ptolemy.kernel.InstantiableNamedObj

An InstantiableNamedObj is a named object that can be either a class definition or an instance. If it is a class definition, then "instances" of that class definition can be created by the instantiate() method. Those instances are called the "children" of this "parent." Changes to the parent propagate automatically to the children as described in the ptolemy.kernel.util.Instantiable interface.

Note that the instantiate(NamedObj, String) permits instantiating an object into a workspace that is different from the one associated with this object. This means that some care must be exercised when propagating changes from a parent to a child, since they may be in different workspaces. Suppose for example that the change that has to propagate is made via a change request. Although it may be a safe time to execute a change request in the parent, it is not necessarily a safe time to execute a change request in the child. Classes that restrict these safe times should override the propagateExistence(), propagateValue(), and propagateValues() methods to ensure that the destinations of the propagation are in a state that they can accept changes.

Author(s): Edward A. Lee
Version:$Id: InstantiableNamedObj.java,v 1.18 2006/03/29 00:02:43 cxh Exp $
Pt.Proposed Rating:Green (eal)
Pt.Accepted Rating:Green (neuendor)