| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.monad.homerun.base.DataObject
com.monad.homerun.wiring.Circuit
public class Circuit
A Circuit is a collection of Wires - 
 which are connections between signal sources (controls, emitters)
 and sinks (models) This is a very limited implementation supporting
 only intra-object wiring & templates
| Constructor Summary | |
|---|---|
| Circuit() | |
| Circuit(Circuit circuit) | |
| Circuit(java.lang.String name) | |
| Circuit(java.lang.String domain,
        java.lang.String object,
        java.lang.String srcType,
        java.lang.String source,
        java.lang.String sinkType,
        java.lang.String sink) | |
| Method Summary | |
|---|---|
|  void | addWire(Wire wire)Adds a wire to the circuit | 
|  void | clearWires()Removes all the wires | 
|  java.lang.String | getDomain()Returns the domain name | 
|  int | getNumWires()Returns the number of wires in the circuit | 
|  java.lang.String | getObjectName()Returns the object name | 
|  java.lang.String | getSinkComponent()Returns the name of the sink component | 
|  java.lang.String | getSinkType()Returns the type of the sink component (model, controls, etc) | 
|  java.lang.String | getSourceComponent()Returns the name of the source component | 
|  java.lang.String | getSourceType()Returns the type of the source component (model, control, etc) | 
|  Wire | getWire(int index)Returns a wire at designated index | 
|  Wire[] | getWires()Returns the wires in the circuit | 
|  boolean | homologous(Circuit circuit)Returns similarity measure between this object and another circuit | 
|  boolean | isTemplate()Is the circuit concrete or a template? | 
|  boolean | matches(Instance instance)Returns true if circuit matches the passed object | 
|  void | promote()Changes this circuit from a concrete circuit to a template | 
|  void | removeWire(Wire wire)Removes wire from the circuit | 
|  void | setDomain(java.lang.String domain)Sets the domain name | 
|  void | setObjectName(java.lang.String name)Sets the circuit object name | 
|  void | setSinkComponent(java.lang.String comp)Assigns the sink component | 
|  void | setSinkType(java.lang.String type)Assigns the type of the sink component | 
|  void | setSourceComponent(java.lang.String comp)Assigns the source component | 
|  void | setSourceType(java.lang.String type)Assigns the type of the source component | 
|  void | setWires(Wire[] wireList)Assigns the circuit wires | 
|  java.lang.String | templateName()Constructs a unique template name for the circuit | 
|  java.lang.String | uniqueName()Constructs a unique name for the circuit based on its parts | 
| Methods inherited from class com.monad.homerun.base.DataObject | 
|---|
| getCategory, getModificationTime, getName, getNote, setCategory, setModificationTime, setName, setNote | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public Circuit()
public Circuit(java.lang.String name)
public Circuit(java.lang.String domain,
               java.lang.String object,
               java.lang.String srcType,
               java.lang.String source,
               java.lang.String sinkType,
               java.lang.String sink)
public Circuit(Circuit circuit)
| Method Detail | 
|---|
public java.lang.String getDomain()
public void setDomain(java.lang.String domain)
domain - the domain namepublic java.lang.String getObjectName()
public void setObjectName(java.lang.String name)
name - the name of the object or '*' for templatepublic java.lang.String getSourceComponent()
public void setSourceComponent(java.lang.String comp)
comp - the name of the component (not binding name)public java.lang.String getSourceType()
public void setSourceType(java.lang.String type)
type - the type of the source component: control, emitter, modelpublic java.lang.String getSinkComponent()
public void setSinkComponent(java.lang.String comp)
comp - the name of the sink component (not binding name)public java.lang.String getSinkType()
public void setSinkType(java.lang.String type)
type - the type of the sink component: control, emitter, modelpublic Wire[] getWires()
public Wire getWire(int index)
index - the index in the list of wires
public int getNumWires()
public boolean isTemplate()
public void promote()
public void addWire(Wire wire)
wire - the wire to addpublic void removeWire(Wire wire)
wire - the wire to removepublic void setWires(Wire[] wireList)
wireList - the list of wirespublic void clearWires()
public boolean matches(Instance instance)
instance - the object instance to compare
public boolean homologous(Circuit circuit)
circuit - the circuit to compare
public java.lang.String uniqueName()
public java.lang.String templateName()
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||