Path(3U) InterViews Reference Manual Path(3U)NAME
Path - record of connectors visited during dataflow
SYNOPSIS
#include <Unidraw/path.h>
DESCRIPTION
A Path object stores a record of connectors that have been visited during dataflow. Transfer functions, state variables, connectors, and
other components can use the information in the path to determine whether data should be transmitted, for example, to avoid circular flow.
PUBLIC OPERATIONS
Path(Path* = nil)
Instantiate a new path, optionally with a duplicate of the information contained in the given path.
virtual void Visit(Connector*)
Register a connector as having been visited.
virtual boolean Visited(Connector*)
Return whether or not a connector has been registered previously with the path.
SEE ALSO Connector(3U), StateVar(3U), TransferFunct(3U)Unidraw 6 August 1990 Path(3U)
Check Out this Related Man Page
Connector(3U) InterViews Reference Manual Connector(3U)NAME
Connector, ConnectorView - base classes for connector subjects and views
SYNOPSIS
#include <Unidraw/Components/connector.h>
DESCRIPTION
Connector is an abstract base class for graphical component subjects that enforce different connectivity semantics depending on the partic-
ular connector subclass. ConnectorView is the abstract base class for views of connector subjects. A connector can be connected to one or
more other connectors. Once connected, two connectors can affect each other's position in specific ways as defined by the semantics of the
connection.
Connectors also participate in the propagation of state variable values during dataflow. Two connected connectors with bound state vari-
ables will assign the value of one state variable to other, and the direction of transfer depends on the connectors' transmission method.
For example, if the transmission method of connector C1 with bound state variable S1 is In, and if the transmission method of connector C2
with bound state variable S2 is Out, and if C1 and C2 are connected, then S1 will be assigned the value of S2 during dataflow.
CONNECTOR PUBLIC OPERATIONS
virtual void Interpret(Command*)
virtual void Uninterpret(Command*)
In addition to (un)interpreting the commands GraphicComp (un)interprets, connectors also (un)interpret DeleteCmd and CutCmd to sever
and restore any connections to them.
virtual void Connect(Connector*, CGlue* = nil);
Connect this connector to the given one, optionally with a piece of CGlue interposed. This operation allows redundant connections
by default.
virtual void Disconnect(Connector*)
void DisconnectAll()
Disconnect the given connector from this one, if they are connected. DisconnectAll calls Disconnect on all connected connectors
until no connections remain.
virtual boolean ConnectedTo(Connector*)
Return whether this connector is connected to the given one.
virtual void GetCenter(float&, float&)
Return the coordinates of the connector's center, which defines its position.
virtual void SetBinding(StateVar*)
virtual StateVar* GetBinding()
Assign and return the state variable bound to the connector, if any. Only one state variable can be bound to a connector at a time.
virtual void SetTransMethod(TransMethod)
virtual TransMethod GetTransMethod()
Assign and return the connector's transmission method.
virtual void Transmit(Path* = nil)
Initiate dataflow originating from this connector, optionally based on information supplied in the given path object. Other Unidraw
or application objects call this operation whenever data modifications should be propagated.
CONNECTOR PROTECTED OPERATIONS
Connector(Graphic* = nil)
Initialize the connector instance, optionally with a graphic whose center defines the connector's position.
virtual void ConnectMe(Connector*)
virtual void DisconnectMe(Connector*)
Connectors maintain a list of the connectors to which they are connected. The Connect and Disconnect operations update this connec-
tor's list, while the ConnectMe and DisconnectMe operations inform their argument to update their lists.
void Retransmit(Path*)
void Retransmit(Connector* peer, Path*)
boolean Transferable(Connector* peer)
The Transmit operation uses these operations to propagate state variable values. The first Retransmit function calls the second one
on each of the connector's peers (i.e., the connectors to which it is connected) if the path records that this connector has not
already been visited (otherwise propagation ceases). The first Retransmit copies the path if necessary to avoid accumulating visit
information from multiple branches. The second Retransmit calls Transferable, which returns whether the value of this connector's
state variable can be transferred to the given peer's state variable based on the two connectors' transmission methods. If the val-
ues are transferable, then the Transferable operation carries out the assignment to the peer's state variable as a side-effect. The
second Retransmit also enables further propagation by evaluating the transfer function of the peer's parent and by calling the first
Retransmit operation on the peer.
CONNECTORVIEW PUBLIC OPERATIONS
Connector* GetConnector()
Return the view's subject, if any.
CONNECTORVIEW PROTECTED OPERATIONS
ConnectorView(Connector* = nil)
The constructor takes a subject as an optional argument. The view will attach itself to the subject if one is specified.
SEE ALSO CGlue(3U), GraphicComp(3U), GraphicView(3U), Path(3U), StateVar(3U), edit(3U0, globals(3U)Unidraw 20 August 1990 Connector(3U)