ptolemy.actor.process
Class BoundaryDetector

java.lang.Object
  extended byptolemy.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: BoundaryDetector.java,v 1.28 2004/04/13 05:12:35 cxh Exp $
Author:
John S. Davis II
Accepted Rating:
Red (davisj)
Proposed Rating:
Red (davisj)

Constructor Summary
BoundaryDetector(Receiver receiver)
          Construct a BoundaryDetector with the specified containing receiver.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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()
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.

isConnectedToBoundaryInside

public boolean isConnectedToBoundaryInside()
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.

isConnectedToBoundaryOutside

public boolean isConnectedToBoundaryOutside()
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.

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.