Data Flow In is one of the interactive graphs Understand can draw of your code — call trees, dependencies, control flow, and more.
Data Flow In
Languages: Ada, Basic, C#, C++, Fortran, Java, Jovial, Pascal, Python, Rust, VHDL, WebTargets: Objects
Variants: Cluster, Compare, Relationship, Simplified
Show what sets or modifies a selected object's value, directly or indirectly.
For a selected object, variable, field, or property, this shows an edge to each function that sets or modifies it, then recurses into whatever objects that function uses, building a multi-level tree back through the computation. Each function in the tree also shows its own callers.
Rooted at transformedData below, the graph shows it's set by both transform and normalize. transform uses filteredData and auxData, which are set by filter and loadAux in turn; filter uses rawInput, set by acquire. normalize also uses auxData, and reads transformedData's own current value before conditionally overwriting it. pipeline, which calls acquire, loadAux, filter, and transform, appears throughout the tree as each one's caller. The inverse graph, Data Flow Out, shows the reverse relationship — everywhere a selected object's value is used.
See the following code and corresponding graph
extern int rawInput;
extern int auxData;
extern int filteredData;
extern int transformedData;
extern int logBuffer;
void output();
void logData();
void accumulate();
void report();
void acquire()
{
rawInput = 42;
}
void loadAux()
{
auxData = 10;
}
void filter(int threshold)
{
filteredData = (rawInput > threshold) ? rawInput : 0;
}
void transform()
{
transformedData = filteredData * auxData;
logBuffer = filteredData;
normalize();
}
void normalize()
{
if (transformedData > 100)
transformedData = 100;
else
transformedData = transformedData + auxData;
}
void pipeline(int threshold)
{
acquire();
loadAux();
filter(threshold);
transform();
output();
logData();
accumulate();
report();
}
Data Flow In - Cluster
The Cluster variant groups entities by their containing class/file/architecture.
Data Flow In - Compare
The Compare variant shows how the graph has changed relative to the project's comparison database.
Data Flow In - Relationship
The Relationship variant filters the graph to only paths connecting the two entities.
Data Flow In - Simplified
The Simplified variant shows all relationships in a simple tree (no clusters)