Unique Objects Used/Set/Modified is one of the source-code metrics Understand computes across 17+ languages — browse them in the GUI, export and track them, or script them with the Python API.
Unique Objects Used/Set/Modified
API ID: CountObjectsUsedSetModifiedUniqueLanguages: Any
Targets: Functions
The number of unique objects used, set, and/or modified by this function
Example:
int my_global = 10;
void combined(int x)
{
int y, z;
x ++; // + 1 Parameters count
if (x > 10) // Duplicates do not count
x = 0; // Duplicates do not count
y ++; // + 1 Locals count
if (y > 10) // Duplicates do not count
y = 0; // Duplicates do not count
my_global ++; // + 1 Globals count
if (my_global > 10) // Duplicates do not count
my_global= 0; // Duplicates do not count
} // CountObjectsUsedSetModifiedUnique = 3
Compare to CountObjectsUsedSetModified which counts all uses, sets, or modifications to objects by this function.