ptolemy.actor.util
Class FunctionDependencyOfAtomicActor

java.lang.Object
  extended byptolemy.actor.util.FunctionDependency
      extended byptolemy.actor.util.FunctionDependencyOfAtomicActor

public class FunctionDependencyOfAtomicActor
extends FunctionDependency

An instance of FunctionDependencyOfAtomicActor describes the function dependency of an atomic actor. By default, each output port of an atomic actor depends on all input ports of the actor. For some atomic actors, such as the TimedDelay actor, an output in a firing does not depend on an input port. (See FunctionDependency for the definition of dependency.) Such actors should override the pruneDependencies() method of AtomicActor to remove dependencies between these ports. For example, TimedDelay declares that its output port is independent of its input port by defining this method:

        public void pruneDependencies() {
            super.pruneDependencies();
            removeDependency(input, output);
        }
   

Since:
Ptolemy II 4.0
Version:
$Id: FunctionDependencyOfAtomicActor.java,v 1.2 2004/02/21 07:57:24 hyzheng Exp $
Author:
Haiyang Zheng
See Also:
FunctionDependency, TimedDelay, AtomicActor.pruneDependencies()
Accepted Rating:
Green (eal)
Proposed Rating:
Green (hyzheng)

Field Summary
 
Fields inherited from class ptolemy.actor.util.FunctionDependency
_dependencyGraph
 
Constructor Summary
FunctionDependencyOfAtomicActor(Actor actor)
          Construct a FunctionDependencyOfAtomicActor in the given actor.
 
Method Summary
protected  void _constructDependencyGraph()
          Construct a dependency graph.
 void removeDependency(IOPort inputPort, IOPort outputPort)
          Remove the dependency that the specified output port has, by default, on the specified input port.
 
Methods inherited from class ptolemy.actor.util.FunctionDependency
_constructConnectedDependencyGraph, _constructDisconnectedDependencyGraph, _validate, getActor, getDependencyGraph, getDependentOutputPorts, getInputPortsDependentOn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FunctionDependencyOfAtomicActor

public FunctionDependencyOfAtomicActor(Actor actor)
Construct a FunctionDependencyOfAtomicActor in the given actor.

Parameters:
actor - The actor.
Method Detail

removeDependency

public void removeDependency(IOPort inputPort,
                             IOPort outputPort)
Remove the dependency that the specified output port has, by default, on the specified input port. By default, each output port is assumed to have a dependency on all input ports. This method is called by the removeDependency() method of AtomicActor, which in turn is called by actors in their pruneDependencies() method.

Parameters:
inputPort - The input port.
outputPort - The output port that does not depend on the input port.
See Also:
AtomicActor.removeDependency(IOPort, IOPort), AtomicActor.pruneDependencies()

_constructDependencyGraph

protected void _constructDependencyGraph()
Construct a dependency graph. This method first constructs the default dependency graph, which asserts that each output depends on all inputs, and then calls the AtomicActor.pruneDependencies() method.

Overrides:
_constructDependencyGraph in class FunctionDependency