UML Class Diagrams

The role of UML Class Diagrams in the forward engineering of object-oriented software systems is to model the static design view of a system. When applied to the reverse engineering an existing system, this same view offers the possibility of improved understanding. By mapping C++ and Java source code constructs to the underlying language-independent UML Class Diagram constructs, Imagix 4D is able to apply its comprehensive database to generate informative class diagrams. When combined with the ability to focus on specific areas of the software and to control the level of detail, these diagrams provide users a valuable tool for program comprehension and analysis.
As defined in the Unified Modeling Language standard, a class diagram shows a set of classes, interfaces, and collaborations and their relationships. These relationships include generalization, aggregation and association. Under C++ and Java, the classes, interfaces, and collaborations aligns directly with classes and templates. And both languages incorporate generalization via class inheritance. So at a starting level, the UML Class Diagram resembles a class inheritance hierarchy graph, where the diagram shows which classes inherit from which other classes.

Aggregation aligns less directly with C++ and Java constructs. To generate information about aggregation relationships, Imagix 4D analyzes where a class is used as a type for a variable. The class container of such a variable becomes the aggregate while the class being used is the component. This analysis also tracks the multiplicity involved in such aggregations.

Class to class relationships include generalization / inheritance (blue lines) and aggregations (gray lines). The multiplicity of each aggregation is indicated.

As with all Imagix 4D graphs, the UML Class Diagram can be focused on the specific portions of code you to want to examine. This means that you control which classes appear in the graph. The full set of Imagix 4D graphical queries are available for manipulating this focus. You're able to add and hide specific classes, to expand up and down the class inheritance hierarchies or member associations, and to identify classes having specific characteristics, such as file location, scope, or object-oriented metrics values.

In addition to controlling which classes are displayed, you can also control what member content is displayed within the classes. This is achieved through the Display > Set Format dialog.

The UML notation for a class includes separate areas for operations (functions / methods) and associations (variables and everything else). The Members tab of the Display Format dialog provides independent controls for each area.

The Display Format dialog also provides control over what relationships appear in the graph. One aspect of this is that you can control which specific association (member-to-member) relationship types are displayed. Because the reverse engineering of the existing object-oriented software is so comprehensive, there is a full range of such member-to-member relationships from which to select.

The Relationships tab of the Display Format dialog includes control over which specific relationship types to display for member-to-member associations.

You will find yourself enabling different relationships at different times, depending on what aspect of your software you want to analyze. For some common aspects, Imagix 4D has pre-configured Analyze queries. Included in these are views of class inheritance details, external use of class members, and class dependencies.

The settings for members and for relationships interact, especially when the diagram is configured to display Associated members. By combining the ability to focus on specific classes and to specify which members and relationships to display, Imagix 4D's UML Class Diagrams are able to provide great insight in the static design of existing object-oriented systems.

By enabling display of association relationships and of associated members, the view includes those specific member functions involved in function calls (red lines) with members of other classes. (Full Size)

Using the UML
Class Diagrams