ICSE 2001 Logo Rigi Logo
rcl_select_common_client
Back to RCL Command Index

Argument Default Description
augment 0 Augment the set of nodes already selected (1 is true)
stayInWin 1 Follow only those arcs to nodes inside the active window (1 is true)

Description:

This command is applied to a set of selected nodes in the active window. For a given node in the selection set, each outgoing arc of the current arc type (see rcl_set_current_arctype), is traversed to its supplier node (destination nodes of the outgoing arcs). The set of supplier nodes is then reviewed. For every incoming arc of the current arc type, the source nodes (clients) are selected. Thus, this command determines which other nodes, in addition to the selected node, are clients to the same set of suppliers, i.e., those clients that have the same suppliers in common. This process is repeated for each node in the original selection set.

The low and high threshold settings are used as criteria for selecting the clients (see rcl_set_low_thresholds and rcl_set_high_thresholds). A client is added to the set of common clients (selected) if and only if its number of suppliers, when intersected with all of the suppliers of the original selection set, are inclusively bounded by the two thresholds.

If the augment parameter is set to false, the original selection set is deselected before the command executes. Thus, if one of the nodes in the original selection set does not meet the selection criteria for one of the other nodes in the original selection set, it will not be reselected.

If stayInWin is set to false, all nodes in the graph are searched, not simply those shown in the active window.

Return Value:

The number of nodes selected is returned.

Exceptions:

At least one node must be selected or a pop-up dialog box displays the error.

Example:

# In the list demo, after opening the window showing all of the
# functions and data types, select the node named "listnext".
# Set the arc type to "data", the low threshold to "0"
# and the high threshold to "1". Then select the set of common
# clients.

rcl_select_name listnext
rcl_set_current_arctype data
rcl_set_low_thresholds 0
rcl_set_high_thresholds 1
rcl_select_common_client

# "listfirst", "listid", "listinit", "listcreate" and "listinsert"
# are selected.

Back to RCL Command Index