UML Diagram Views

The Unified Modeling Language has overwhelmingly become the method of choice for forward engineering of object-oriented systems. Within this method, class diagrams are the primary representation of the static design of a system. The UML Class Diagram view applies this representation to help you understand the classes, interfaces, and collaborations and their relationships as they currently exist in your software.

Imagix 4D's UML Class Diagrams use standard UML notation. Each class is represented by a box; each box is partitioned into three compartments. At the top is the name of the class. Next, attributes (non-function members) are listed. And in the bottom compartment are the operations (member functions or methods).

The names of attribute and operation members are preceded by a notation indicating the visibility of the member:
   +-# public members
   -+# private members
   #+- protected members
The color used for this indicator follows the standard color scheme; green indicates that the member is a variable, and blue signals that the member is a function.

Relationship Information

As soon as multiple classes are displayed in a diagram, the diagram begins to show relationship information. Which particular relationship types are displayed, and how they appear, is controlled through the Display Format dialog.

These include relationships both at the class level, and at the level of the underlying members. By controlling which relationship types are displayed, you manage the balance of seeing the information you need and avoiding information overload.


In UML Class Diagrams, the most basic relationship is class inheritance.

While you can control which relationships types are visible, the Display Format dialog insures that there is always at least one of the class-to-class types being displayed, and used for the automated layout of the diagram. By default, class inheritance is used.


The other class-to-class relationship type is aggregation. An aggregation indicates where one class is used to declare members of a second class.

Here the aggregates relationship is added to the diagram. Although difficult to see due to the reduced size in this display, each of the lines representing aggregation includes a numeric indication of mulitplicity.


Association is the term used by UML for a member-to-member relationship. In the dialog, the association controls include selection of which types of member-level relationships to display.

In this graph, calls relationships are enabled. The red lines represent calls between function members of different classes.

Managing Complexity

The UML Class Diagrams share Imagix 4D's graphic querying capabilities with the Structure and Sequence Diagram views, so you're able to analyze the specific portions of your class structure that you're interested in. As your analysis expands, the diagrams can quickly become rather large. One way to limit their size is to reduce the class container boxes to show just those class members having associations with members from other displayed classes.

This reduction is achieved through the Members tab of the Display Format dialog. You're able to control which types of members appear internally in the class containers.

The member settings and the member-level relationship (association) settings interact in determining which actual members and relationships appear in the diagrams. Member-level relationships can only be displayed for members that are displayed. And if the format is set to show associated members rather than all members, then the member-level relationship settings will limit which members are displayed.

As the scope of classes you're examining increases, you may find even this amount of information to be too much for a single diagram. To support such real-world use of the UML Class Diagram, the Display Format dialog has a setting to move some of the information to complementary, focused displays. This is done through the Collapse checkbox at the top of the Members tab.

In the resulting collapsed diagram, the attributes and operations for a class are each reduced to a single entry indicating the number of members. Likewise, associations are collapsed into single lines representing all of the relationships between the attribute and/or operation entries. This significantly reduces the size and complexity of the diagram. To see the hidden detail about the class members or associations, click on a specific attribute / operation entry or relationship line. The detail about that class or association is displayed in the Symbol panel. Here, the Symbol panel shows the results of clicking on the association line between class bEncoder and class oTPU. You're able to see the specific function members and the calls they are involved in.

UML File Diagram

While UML Class Diagram view is only available for viewing C++ and Java code, there is a similar view, UML File Diagram, which is available for analyzing C software as well.

The UML File Diagram applies the same basic approach to show the system's static design at a file level. Members and relationships are displayed within boxes representing files. A similar Display Format dialog controls which file member symbol types and which relationship types are displayed.

The public / private / protected notation used in the UML Class Diagrams is extended:
   *=. global members
   =*. static members
   .*= local members

Class inheritance and aggregation are replaced by file includes as the central file-to-file relationships. For member-to-member associations, the list of relationship types is slightly expanded, with the ability to view defines and depends on relationships.

UML Task Collaboration Diagrams

The UML Task Collaboration Diagram has a more targeted focus, supporting analysis of multi-tasking, multi-threaded systems, specifically by showing how tasks communicate through the shared variables. This view is derived from the COMET methodology described by Hassan Gomaa. The same task definitions used by the Task Flow Check reports.

The diagram consists of two columns. The boxes on the left represent the tasks that have been specified for the project. The boxes on the right represent sets of data shared between the tasks. The sets are defined automatically, combining variables that are handled similarly by the tasks.

The lines connecting the tasks to the shared data use the standard Imagix 4D color scheme to distinguish between variables being read (orange) and variables being set (blue). Thin lines represent use that always occurs within critical region projection. Thicker lines indicate that at least sometimes the variable use is unprotected.

Display Format dialog

The contents of the UML Task Collaboration Diagram are controlled through the Display Format dialog.

A wide range of filters are available to control which data sharing is displayed. As you apply different filters, the diagram is immediately updated to display just the relationships and shared data currently selected.

The Display Format dialog also has a Members tab that controls what appears within the task and shared data boxes.

Details report

The diagram is complemented by the UML Task Collaboration Details report. Launched from the Display Format dialog or from the Display menu, the report lists details about the instances of data usage represented in the diagram.

The format of the report is similar to the Variables Set in Multiple Tasks report. However, the contents of the report match the particular data usage displayed in the diagram. As you change filtering in the diagram, you can update the report to reflect the currently displayed data usage.