Package ptolemy.actor.process
Class BoundaryDetector
- java.lang.Object
-
- ptolemy.actor.process.BoundaryDetector
-
public class BoundaryDetector extends java.lang.Object
A BoundaryDetector determines the topological relationship of a Receiver with respect to boundary ports.- Since:
- Ptolemy II 1.0
- Version:
- $Id$
- Author:
- John S. Davis II
- Pt.AcceptedRating:
- Red (davisj)
- Pt.ProposedRating:
- Red (davisj)
-
-
Constructor Summary
Constructors Constructor Description BoundaryDetector(Receiver receiver)
Construct a BoundaryDetector with the specified containing receiver.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isConnectedToBoundary()
Return true if the receiver containing this boundary detector is connected to a boundary port.boolean
isConnectedToBoundaryInside()
Return true if the receiver containing this boundary detector is connected to the inside of an input boundary port; return false otherwise.boolean
isConnectedToBoundaryOutside()
Return true if the receiver containing this boundary detector is connected to the outside of an output boundary port; return false otherwise.boolean
isInsideBoundary()
Return true if the receiver containing this boundary detector is contained on the inside of a boundary port.boolean
isOutsideBoundary()
Return true if the receiver containing this boundary detector is contained on the outside of a boundary port.void
reset()
Reset the cache variables in boundary detector.
-
-
-
Constructor Detail
-
BoundaryDetector
public BoundaryDetector(Receiver receiver)
Construct a BoundaryDetector with the specified containing receiver.- Parameters:
receiver
- The receiver containing this BoundaryDetector.
-
-
Method Detail
-
isConnectedToBoundary
public boolean isConnectedToBoundary() throws IllegalActionException
Return true if the receiver containing this boundary detector is connected to a boundary port. A boundary port is an opaque port that is contained by a composite actor. If the containing receiver is connected to a boundary port, then return true; otherwise return false. This method is not synchronized so the caller should be.- Returns:
- True if the containing receiver is connected to boundary port; return false otherwise.
- Throws:
IllegalActionException
-
isConnectedToBoundaryInside
public boolean isConnectedToBoundaryInside() throws InvalidStateException, IllegalActionException
Return true if the receiver containing this boundary detector is connected to the inside of an input boundary port; return false otherwise. A boundary port is an opaque port that is contained by a composite actor. This method is not synchronized so the caller should be.- Returns:
- True if the containing receiver is connected to the inside of a boundary port; return false otherwise.
- Throws:
IllegalActionException
InvalidStateException
-
isConnectedToBoundaryOutside
public boolean isConnectedToBoundaryOutside() throws IllegalActionException
Return true if the receiver containing this boundary detector is connected to the outside of an output boundary port; return false otherwise. A boundary port is an opaque port that is contained by a composite actor. If the receiver containing this boundary detector is contained on the inside of a boundary port, then return false. This method is not synchronized so the caller should be.- Returns:
- True if the containing receiver is connected to the outside of a boundary port; return false otherwise.
- Throws:
IllegalActionException
-
isInsideBoundary
public boolean isInsideBoundary()
Return true if the receiver containing this boundary detector is contained on the inside of a boundary port. A boundary port is an opaque port that is contained by a composite actor. If the containing receiver is contained on the inside of a boundary port then return true; otherwise return false. This method is not synchronized so the caller should be.- Returns:
- True if the containing receiver is contained on the inside of a boundary port; return false otherwise.
-
isOutsideBoundary
public boolean isOutsideBoundary()
Return true if the receiver containing this boundary detector is contained on the outside of a boundary port. A boundary port is an opaque port that is contained by a composite actor. If the containing receiver is contained on the outside of a boundary port then return true; otherwise return false. This method is not synchronized so the caller should be.- Returns:
- True if the containing receiver is contained on the outside of a boundary port; return false otherwise.
-
reset
public void reset()
Reset the cache variables in boundary detector.
-
-