|
|
Analyzing the Use of Class Members
When focused on a class, Imagix 4D's Analyze feature provides a series of graphs that review aspects of the design, dependencies and usage of the class. One section of this source code analysis deals specifically with how class members, both functions (methods) and variables, are being used in your software outside of the class itself.
External Functions Calling Member Functions is the first of these views. The view provides insight into how extensively each member function is used, and whether specific external functions are calling a wide range of member functions. By examining calls among the external functions, you're able to identify areas in your source code that are particularly dependent on the class you are studying.
Calls (red lines) are shown between the external functions / methods (blue squares) on the left, and the class members on the right.
Another view of the same function call information is presented in Classes Containing Those External Functions. This UML Class Diagram provides more perspective on the use of class members, by showing the particular classes that are involved. You may choose to use the Analyze feature to study some of these related classes more thoroughly.
Functions (methods) are displayed within their respective classes (boxes) .
An even higher level view is available through Class Level Abstraction, where classA::funcA calling classB::funcB is abstracted as classA calling classB. This becomes particularly useful when the more detailed views contain too much information to be easily understood. From this abstraction, you can drill down to examine the details of particular class-to-class relationships. For example, you could select the call from one specific class to another. Examining it further in a two-class UML Class Diagram would help you understand the inter-class dependencies at the level of the function members.
The calls (red lines) between the classes (pink diamonds) represent the underlying calls of class member functions.
Equivalent views are available for studying how class member variables are used (set and read). The first of these, External Functions Using Member Variables, again shows whether there is concentrated usage of specific variables or by specific functions.
In the particular graph below, the absence of functions in the users column indicates there is no direct variable use by any external functions. This is consistent with the Public Interface information that the class contains no public member variables. The complex variable use by member functions, shown on the right side of this graph, is best understood through the Internal Calling Hierarchy views.
Use of the member variables (green triangles) is indicated as sets (aqua lines) and/or reads (orange lines).
|
Analyzing Classes >
Use of Members