Dependencies is one of the interactive graphs Understand can draw of your code — call trees, dependencies, control flow, and more.
Dependencies
Languages: AnyTargets: Architectures
Variants: Butterfly, Butterfly (Compare), Depended On By, Depended On By (Compare), Depends On, Depends On (Compare), Internal, Internal (Compare)
Show dependencies for the selected architecture.
Dependencies map references to their owning file, class, or architecture. So a file's dependencies are the other files that own entities it references. For example, if a function defined in fileA calls a function defined in fileB, then fileA depends on fileB. References that contribute to dependencies vary by language, but generally include call, set, use, modify, and type references.
Dependencies always stay at the same grouping: file will only depend on other files, classes on other classes, and architectures on other architectures within the same root architecture.
See File Dependencies for an alternate view of architecture dependencies.
The sample project below is split into four architectures:
lib: logging and vector-math utilities with no dependencies of its ownapi: an entity/scene/renderer layer built onlibui: a small application built onapicmdline: a command-line tool built onapi
See Graph Architecture for a graphical view of the architecture organization.
Dependencies - Butterfly
The Butterfly variant shows both directions, architectures the selected architecture depends on and is depended on by.
Rooted at api, the graph shows that api is depended on by ui through 22 references and by cmdline through 5 references, and depends on lib through 27 references. In the GUI, architectures can be expanded to
show the entities for each reference, and edges can be right clicked to directly
view the references.
Dependencies - Butterfly (Compare)
The Butterfly (Compare) variant shows both directions, architectures the selected architecture depends on and is depended on by, with changes relative to the project's comparison database.
The sample's comparison database is an earlier version of the project.
Since then, the io folder was removed, the cmdline
folder was added, lib/vec2.h was renamed to math.h,
ui/view was renamed to window, and the
Entity members speed and move() were
renamed to velocity and update().
Added nodes and edges are green and removed ones are red. Each edge label gives the number of unchanged references, then the number added (+) and removed (-). A reference to a renamed entity counts as one removed and one added reference.
Rooted at api, the graph shows both kinds of change. On the depended-on-by side, the new cmdline folder is added with 5 references. On the depends-on side, the io folder is removed with its 2 references. The edges to ui and lib remain, with references added and removed by the renames. In the GUI, architectures can be expanded to
show the entities for each reference, and edges can be right clicked to directly
view the references.
Dependencies - Depended On By
The Depended On By variant shows architectures the selected architecture is depended on by.
Rooted at api, the graph shows that api is depended on by ui through 22 references and by cmdline through 5 references. In the GUI, architectures can be expanded to
show the entities for each reference, and edges can be right clicked to directly
view the references.
Dependencies - Depended On By (Compare)
The Depended On By (Compare) variant shows architectures the selected architecture is depended on by, with changes relative to the project's comparison database.
The sample's comparison database is an earlier version of the project.
Since then, the io folder was removed, the cmdline
folder was added, lib/vec2.h was renamed to math.h,
ui/view was renamed to window, and the
Entity members speed and move() were
renamed to velocity and update().
Added nodes and edges are green and removed ones are red. Each edge label gives the number of unchanged references, then the number added (+) and removed (-). A reference to a renamed entity counts as one removed and one added reference.
Rooted at api, the graph shows that the new cmdline folder depends on api through 5 added references. ui still depends on api: 11 references are unchanged, and the renames account for 11 added and 11 removed references. In the GUI, architectures can be expanded to
show the entities for each reference, and edges can be right clicked to directly
view the references.
Dependencies - Depends On
The Depends On variant shows architectures the selected architecture depends on.
Rooted at api, the graph shows that api depends on lib through 27 references. In the GUI, architectures can be expanded to
show the entities for each reference, and edges can be right clicked to directly
view the references.
Dependencies - Depends On (Compare)
The Depends On (Compare) variant shows architectures the selected architecture depends on, with changes relative to the project's comparison database.
The sample's comparison database is an earlier version of the project.
Since then, the io folder was removed, the cmdline
folder was added, lib/vec2.h was renamed to math.h,
ui/view was renamed to window, and the
Entity members speed and move() were
renamed to velocity and update().
Added nodes and edges are green and removed ones are red. Each edge label gives the number of unchanged references, then the number added (+) and removed (-). A reference to a renamed entity counts as one removed and one added reference.
Rooted at api, the graph shows that api no longer depends on the removed io folder, which it used through 2 references. It still depends on lib: 8 references are unchanged, and the renames account for 19 added and 19 removed references. In the GUI, architectures can be expanded to
show the entities for each reference, and edges can be right clicked to directly
view the references.
Dependencies - Internal
The Internal variant shows dependencies between the architecture's contents, both entities directly in the architecture and any nested architectures.
Rooted at api, the graph shows dependencies between the files in the folder. If api contained folders, those would be shown too. In the GUI, architectures can be expanded to
show the entities for each reference, and edges can be right clicked to directly
view the references.
Dependencies - Internal (Compare)
The Internal (Compare) variant shows dependencies between the architecture's contents, both entities directly in the architecture and any nested architectures, with changes relative to the project's comparison database.
The sample's comparison database is an earlier version of the project.
Since then, the io folder was removed, the cmdline
folder was added, lib/vec2.h was renamed to math.h,
ui/view was renamed to window, and the
Entity members speed and move() were
renamed to velocity and update().
Added nodes and edges are green and removed ones are red. Each edge label gives the number of unchanged references, then the number added (+) and removed (-). A reference to a renamed entity counts as one removed and one added reference.
Rooted at api, the graph shows that no files in the folder were added or removed. The renamed Entity members change two edges: entity.cpp to entity.h has 3 unchanged, 4 added, and 4 removed references, and scene.cpp to entity.cpp has 1 added and 1 removed reference. In the GUI, architectures can be expanded to
show the entities for each reference, and edges can be right clicked to directly
view the references.