Include is one of the interactive graphs Understand can draw of your code — call trees, dependencies, control flow, and more.
Include
Languages: C++, Fortran, PascalTargets: Files, Subprograms
Variants: Classic, Cluster, Compare, Relationship, Simplified
Show what a selected file includes, directly or indirectly.
For a selected C or Pascal file, this shows an edge to each file it includes, then recurses into each of those files’ own includes, building a multi-level tree. For a selected Fortran program, function, subroutine, or block data, this shows an edge to each file it includes; Fortran’s INCLUDE statement is issued by the program unit itself rather than by another file, so this doesn’t extend into a deeper chain.
Rooted at main.c below, the graph shows main.c including app.h and driver.h. Both app.h and driver.h include system.h, which itself includes platform.h and config.h. platform.h and config.h each include types.h, which includes nothing further. The inverse graph, Includeby, shows the reverse relationship — everything that includes the selected file, directly or indirectly.
See the following code and corresponding graph
// main.c
#include "app.h"
#include "driver.h"
// app.h
#include "system.h"
// driver.h
#include "system.h"
// system.h
#include "platform.h"
#include "config.h"
// platform.h
#include "types.h"
// config.h
#include "types.h"
// types.h
Include - Classic
The Classic variant is similar to the Simplified variant, showing all relationships in a simple tree, but it uses a custom layout algorithm instead of Graphviz.
Include - Cluster
The Cluster variant groups entities by their containing class/file/architecture.
Include - Compare
The Compare variant shows how the graph has changed relative to the project's comparison database.
Include - Relationship
The Relationship variant filters the graph to only paths connecting the two entities.
Include - Simplified
The Simplified variant shows all relationships in a simple tree (no clusters)