C and C++ Binaries

Metrics: cs_metric.h

Provides types and methods for metric granularities and metric computation functions.



Links


Defines

#define CS_METRIC_H
#define CSMETRIC_GRANULARITY_COUNT 6

Types

typedef cs_metric_granularity
Definition typedef enum cs_metric_granularity cs_metric_granularity
Notes The possible granularities of a metric.

Used by

typedef cs_metric_calc_analysis_fn_t
Definition typedef cs_result(* cs_metric_calc_analysis_fn_t)(double *, const void *)
Notes Function pointer type to use when defining a new analysis-granularity metric.

Used by csonar_metric_create_class_analysis().

typedef cs_metric_calc_directory_fn_t
Definition typedef cs_result(* cs_metric_calc_directory_fn_t)(cs_directory, double *, const void *)
Notes Function pointer type to use when defining a new directory-granularity metric.

Used by csonar_metric_create_class_directory().

typedef cs_metric_calc_compunit_fn_t
Definition typedef cs_result(* cs_metric_calc_compunit_fn_t)(cs_uid, double *, const void *)
Notes Function pointer type to use when defining a new compilation-unit-granularity metric.

Used by csonar_metric_create_class_compunit().

typedef cs_metric_calc_file_fn_t
Definition typedef cs_result(* cs_metric_calc_file_fn_t)(cs_sf, double *, const void *)
Notes Function pointer type to use when defining a new file-granularity metric.

Used by csonar_metric_create_class_file().

typedef cs_metric_calc_procedure_fn_t
Definition typedef cs_result(* cs_metric_calc_procedure_fn_t)(cs_pdg, double *, const void *)
Notes Function pointer type to use when defining a new procedure-granularity metric.

csonar_metric_create_class_procedure().

enum cs_metric_granularity
Definition typedef enum { } cs_metric_granularity
Notes The possible granularities of a metric.

Used by


Functions

cs_metric_granularity cs_metric_granularity_from_string ( cs_const_string gran_str )
Convert the string representation of a metric granularity into a cs_metric_granularity.
cs_const_string cs_metric_granularity_name ( cs_metric_granularity gran )
Get the string representation of a cs_metric_granularity.

Function Descriptions

Function cs_metric_granularity_from_string
cs_metric_granularity cs_metric_granularity_from_string (
Convert the string representation of a metric granularity into a cs_metric_granularity.
Parameters
gran_str [in] The string to convert. Should (case-insensitively) be one of:
  • "procedure"
  • "file"
  • "directory"
  • "compunit"
  • "analysis"
Returns The cs_metric_granularity corresponding to gran_str. If gran_str does not match a valid granularity, returns csmetric_invalid.
Function cs_metric_granularity_name
cs_const_string cs_metric_granularity_name (
Get the string representation of a cs_metric_granularity.
Parameters
gran [in] The cs_metric_granularity for which to retrieve the string.
Returns The cs_const_string representation of gran.