ptolemy.actor.process
Class BoundaryDetector

java.lang.Object
  extended by 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: BoundaryDetector.java 57040 2010-01-27 20:52:32Z cxh $
Author:
John S. Davis II
Accepted Rating:
Red (davisj)
Proposed Rating:
Red (davisj)

Field Summary
private  boolean _connectedBoundaryCacheIsOn
           
private  boolean _connectedInsideOfBoundaryCacheIsOn
           
private  boolean _connectedOutsideOfBoundaryCacheIsOn
           
private  boolean _insideBoundaryCacheIsOn
           
private  boolean _isConnectedBoundaryValue
           
private  boolean _isConnectedInsideOfBoundaryValue
           
private  boolean _isConnectedOutsideOfBoundaryValue
           
private  boolean _isInsideBoundaryValue
           
private  boolean _isOutsideBoundaryValue
           
private  boolean _outsideBoundaryCacheIsOn
           
private  Receiver _receiver
           
 
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
 

Field Detail

_receiver

private Receiver _receiver

_insideBoundaryCacheIsOn

private boolean _insideBoundaryCacheIsOn

_isInsideBoundaryValue

private boolean _isInsideBoundaryValue

_outsideBoundaryCacheIsOn

private boolean _outsideBoundaryCacheIsOn

_isOutsideBoundaryValue

private boolean _isOutsideBoundaryValue

_connectedBoundaryCacheIsOn

private boolean _connectedBoundaryCacheIsOn

_isConnectedBoundaryValue

private boolean _isConnectedBoundaryValue

_connectedInsideOfBoundaryCacheIsOn

private boolean _connectedInsideOfBoundaryCacheIsOn

_isConnectedInsideOfBoundaryValue

private boolean _isConnectedInsideOfBoundaryValue

_connectedOutsideOfBoundaryCacheIsOn

private boolean _connectedOutsideOfBoundaryCacheIsOn

_isConnectedOutsideOfBoundaryValue

private boolean _isConnectedOutsideOfBoundaryValue
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.