25 using std::ostringstream;
39 string option_dummy, treatment_dummy, lothresh_str,
40 hithresh_str, numthresh_str, width_str, precision_str;
46 treatment_line.
Extract(lothresh_str) &&
47 treatment_line.
Extract(hithresh_str) &&
119 char numerator_too_low=
'-';
122 ostringstream valuestr;
123 valuestr.setf(std::ios::fixed);
124 int width=6, precision=0;
125 float n_threshold=0, low_threshold=1e9, high_threshold=1e9;
134 valuestr.width(width);
135 valuestr.precision(precision);
138 string too_low_string(width,numerator_too_low);
139 valuestr << too_low_string;
143 string infinity_string(width,infinity);
144 valuestr << infinity_string;
164 const double ROUNDING_FACTOR = 1.0e-9;
165 result-=ROUNDING_FACTOR;
169 retval=valuestr.str();
175 "LOCf@30@100@0@6@0@Lines of code/function@",
176 "LOCm@500@2000@0@6@0@Lines of code/module @",
177 "LOCp@999999@999999@0@6@0@Lines of code/project @",
178 "MVGf@10@30@0@6@0@Cyclomatic complexity/function@",
179 "MVGm@200@1000@0@6@0@Cyclomatic complexity/module@",
180 "MVGp@999999@999999@0@6@0@Cyclomatic complexity/project@",
181 "COM@999999@999999@0@6@0@Comment lines@",
182 "M_C@5@10@5@6@3@MVG/COM McCabe/comment line@",
183 "L_C@7@30@20@6@3@LOC/COM Lines of code/comment line@",
184 "FI@12@20@0@6@0@Fan in (overall)@",
185 "FIv@6@12@0@6@0@Fan in (visible uses only)@",
186 "FIc@6@12@0@6@0@Fan in (concrete uses only)@",
187 "FO@12@20@0@6@0@Fan out (overall)@",
188 "FOv@6@12@0@6@0@Fan out (visible uses only)@",
189 "FOc@6@12@0@6@0@Fan out (concrete uses only)@",
190 "IF4@100@1000@0@6@0@Henry-Kafura/Shepperd measure (overall)@",
191 "IF4v@30@100@0@6@0@Henry-Kafura/Shepperd measure (visible only)@",
192 "IF4c@30@100@0@6@0@Henry-Kafura/Shepperd measure (concrete only)@",
193 "WMC1@30@100@0@6@0@Weighting function = 1 unit per method@",
194 "WMCv@10@30@0@6@0@Weighting function = 1 unit per visible method@",
195 "DIT@3@60@6@0@Depth of Inheritance Tree@",
196 "NOC@4@15@0@6@0@Number of children@",
197 "CBO@12@30@0@6@0@Coupling between objects@",
Metric_Treatment(CCCC_Item &treatment_line)
Metric_Treatment * treatment
void set_ratio(float _num, float _denom=1.0)
EmphasisLevel emphasis_level() const
string value_string() const
static Metric_Treatment * getMetricTreatment(const string &metric_tag)
void set_treatment(const char *code)
const char * internal_treatments[]