Package ptolemy.data.expr
Interface ContainmentExtender
-
- All Known Implementing Classes:
Configurer.ContainmentExtender
,ContainmentExtender
public interface ContainmentExtender
An interface to specify the containment relationship as seen by the model designer. This interface can be implemented by an attribute (such asContainmentExtender
. Such an attribute defines a special containment relationship that is slightly different from the containment relationship defined byNamedObj.getContainer()
. ThegetExtendedContainer()
method returns the container of the object that contains the implementing attribute. The returned container is supposed to be the object that visually contains the object that owns the implementing attribute, as seen by the model designer. In particular, for a modal model (either FSM or Ptera), even though a refinement is visually contained by a state or an event,NamedObj.getContainer()
of that refinement does not return the state or event because of a difference between the visual representation and internal data representation. In that case,getExtendedContainer()
of this interface returns the state or event.When the expression evaluator tries to resolve a variable name starting from an object, it checks whether an attribute implementing this interface is owned by the object if the variable cannot be found in that object. If one such attribute is found, the evaluator considers the container returned by
getExtendedContainer()
, instead of theNamedObj.getContainer()
that it normally uses.- Since:
- Ptolemy II 8.0
- Version:
- $Id$
- Author:
- Thomas Huining Feng
- Pt.AcceptedRating:
- Red (tfeng)
- Pt.ProposedRating:
- Red (tfeng)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NamedObj
getContainedObject(java.lang.String name)
Get an object with the given name within the container.NamedObj
getExtendedContainer()
Get the extended container.
-
-
-
Method Detail
-
getContainedObject
NamedObj getContainedObject(java.lang.String name) throws IllegalActionException
Get an object with the given name within the container.- Parameters:
name
- The name of the object.- Returns:
- The object, or null if not found.
- Throws:
IllegalActionException
- If exception occurs when trying to get the contained object.
-
getExtendedContainer
NamedObj getExtendedContainer() throws IllegalActionException
Get the extended container.- Returns:
- The container.
- Throws:
IllegalActionException
- If exception occurs when trying to get the container.
-
-