Articles in this section
Category / Section

What are connections and how do they work?

2 mins read

 

Essential Diagram supports connecting symbols and links together. Typically, symbols and links are connected together using the interactive LinkTool. Connections can also be created programmatically.

Here is some terminology that is important to know in order to understand connections:

Connection - An object that binds together two ports

Port - A location on a symbol or link at which connections to other ports can be established

Port Container - Any object that contains ports and supports connections to those ports (symbols and links are port containers)

Symbol - A node in a diagram that has child nodes and that supports ports and labels (symbols are port containers)

Link - A special type of symbol that has two endpoints, a direction, and a port anchored to each endpoint to support connections to symbols (links are port containers)

Ports determine where on a symbol or link that connections can be docked. All symbols have a center port that can either be enabled or disabled. Symbols can also have any number of ports elsewhere within their bounds. Each port can have zero or more connections on it at any given time.

Connections are the glue that hold ports together. Each connection has a reference to two ports. Port containers keep track of both ports and the connections to those ports. Both port containers involved in a given connection keep a reference to the connection object. Removing the connection from one port container will automatically remove it from the other port container.

A port container refers to its own port on a given connection as the local port. That simply means it is the port that it owns and not the port belonging to the other port container involved in the connection. The port belonging to the other port container involved in the connection is referred to as the foreign port. The terms "local" and "foreign" are simply a way to identify one of the two ports on a connection with respect to one of the port containers involved in the connection.

The IPortContainer interface contains many useful methods for navigating the ports and connections belonging to a symbol or link. Both the symbol and link classes implement this interface.

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied