Unique Objects Used 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
API ID: CountObjectsUsedUniqueLanguages: Any
Targets: Functions
The number of unique objects used by this function
Example:
int my_global = 10;
void sets(int x)
{
int y, z;
if (x == 1); // + 1 Parameters count
if (x == 2); // Duplicates do not count
if (y == 1); // + 1 Locals count
if (y == 2); // Duplicates do not count
if (my_global == 1); // + 1 Globals count
if (my_global == 2); // Duplicates do not count
} // CountObjectsUsedUnique = 3
Compare to CountObjectsUsed which counts all uses to objects by this function.