Type Tree is one of the interactive graphs Understand can draw of your code — call trees, dependencies, control flow, and more.
Type Tree
Languages: AdaTargets: Types
Variants: Classic, Cluster, Compare, Relationship, Simplified
Show the Ada types directly or indirectly derived from a selected type.
For a selected Ada tagged type, this shows an edge to each type that directly derives from it, then recurses into each of those types’ own descendants, building a multi-level tree.
Rooted at Calibrated_Sensor below, the graph shows edges to its two direct descendants, Temperature_Sensor and Pressure_Sensor. Temperature_Sensor continues to Thermocouple, and Pressure_Sensor continues to Barometer. The inverse graph, Type Derived From, shows the reverse relationship — everything the selected type derives from, directly or indirectly.
See the following code and corresponding graph
with Analog;
package Calibrated is
type Calibrated_Sensor is new Analog.Analog_Sensor with record
Offset : Float := 0.0;
Scale : Float := 1.0;
end record;
end Calibrated;
with Calibrated;
package Temperature is
type Temperature_Sensor is
new Calibrated.Calibrated_Sensor with record
Unit : Character := 'C';
end record;
type Thermocouple is new Temperature_Sensor with record
Junction_Type : Character := 'K';
end record;
end Temperature;
with Calibrated;
package Pressure is
type Pressure_Sensor is
new Calibrated.Calibrated_Sensor with record
Unit : Character := 'P';
end record;
type Barometer is new Pressure_Sensor with record
Altitude_Compensation : Float := 0.0;
end record;
end Pressure;
Type Tree - 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.
Type Tree - Cluster
The Cluster variant groups entities by their containing class/file/architecture.
Type Tree - Compare
The Compare variant shows how the graph has changed relative to the project's comparison database.
Type Tree - Relationship
The Relationship variant filters the graph to only paths connecting the two entities.
Type Tree - Simplified
The Simplified variant shows all relationships in a simple tree (no clusters)