Analysis types

Discussion of the various analysis types.

Each analysis produces a nested set of directed graphs in a DGML file where the links are formed due to dependencies between the lowest level nodes. Cycles within the graphs are necessarily bad.

Coupling analysis for files

For this analysis the lowest level nodes are the files, their parents being made from splitting up the filter (or, if not available, the directory) path. The links represent when one file includes another. The filter being obtained from a vcxproj.filters file or the source_group command in CMake.

Coupling analysis for classes

For this analysis the lowest level nodes are the class type, their parents being made from splitting any namespaces. As the links represent when one class uses another the implication is that inheritance and composition are not differentiated between as would occur in a UML diagram.

Cohesion analysis

For this analysis the lowest level nodes are members of a class type, their parent being the class type and subsequent parents being made from splitting any namespaces. No nodes are created for constructors or destructors to ensure that the parts of a class type can be differentiated.

If the digraph of a class type has many parts it doesn’t necessarily follow that this is bad design. It could just be a container for a set of conceptually related items. An abstract class that only becomes whole in a concrete inheritee. An example of dependency injection that forms a whole with the class it is injected into.