CCCC - C and C++ Code Counter  9999-git
CCCC Development version (post-3.1.4)
Public Member Functions | Private Attributes | Friends | List of all members
Metric_Treatment Class Reference

#include <cccc_met.h>

Collaboration diagram for Metric_Treatment:
[legend]

Public Member Functions

 Metric_Treatment (CCCC_Item &treatment_line)
 

Private Attributes

string code
 
string name
 
float lower_threshold
 
float upper_threshold
 
int numerator_threshold
 
int width
 
int precision
 

Friends

class CCCC_Metric
 
class CCCC_Options
 
void add_treatment (CCCC_Item &)
 
CCCC_Html_Streamoperator<< (CCCC_Html_Stream &, const CCCC_Metric &)
 

Detailed Description

Definition at line 37 of file cccc_met.h.

Constructor & Destructor Documentation

Metric_Treatment::Metric_Treatment ( CCCC_Item treatment_line)

Definition at line 31 of file cccc_met.cc.

32 {
36  width=0;
37  precision=0;
38 
39  string option_dummy, treatment_dummy, lothresh_str,
40  hithresh_str, numthresh_str, width_str, precision_str;
41 
42  if(
43  // treatment_line.Extract(option_dummy) &&
44  // treatment_line.Extract(treatment_dummy) &&
45  treatment_line.Extract(code) &&
46  treatment_line.Extract(lothresh_str) &&
47  treatment_line.Extract(hithresh_str) &&
48  treatment_line.Extract(numerator_threshold) &&
49  treatment_line.Extract(width) &&
50  treatment_line.Extract(precision) &&
51  treatment_line.Extract(name)
52  )
53  {
54  lower_threshold=atof(lothresh_str.c_str());
55  upper_threshold=atof(hithresh_str.c_str());
56  }
57 }
float lower_threshold
Definition: cccc_met.h:49
bool Extract(string &s)
Definition: cccc_itm.cc:47
int numerator_threshold
Definition: cccc_met.h:56
float upper_threshold
Definition: cccc_met.h:49

Here is the call graph for this function:

Friends And Related Function Documentation

void add_treatment ( CCCC_Item treatment_line)
friend

Definition at line 56 of file cccc_opt.cc.

57 {
58  Metric_Treatment *new_treatment=new Metric_Treatment(treatment_line);
59  metric_treatment_map_t::iterator iter=
60  treatment_map.find(new_treatment->code);
61 
62  if(iter!=treatment_map.end())
63  {
64  delete (*iter).second;
65  (*iter).second=new_treatment;
66  }
67  else
68  {
69  metric_treatment_map_t::value_type
70  treatment_pair(new_treatment->code,new_treatment);
71  treatment_map.insert(treatment_pair);
72  }
73 }
Metric_Treatment(CCCC_Item &treatment_line)
Definition: cccc_met.cc:31
static metric_treatment_map_t treatment_map
Definition: cccc_opt.cc:35
friend class CCCC_Metric
friend

Definition at line 39 of file cccc_met.h.

friend class CCCC_Options
friend

Definition at line 64 of file cccc_met.h.

CCCC_Html_Stream& operator<< ( CCCC_Html_Stream ,
const CCCC_Metric  
)
friend

Definition at line 1026 of file cccc_htm.cc.

1027 {
1028  const char *emphasis_prefix[]={"","<EM>","<STRONG>"};
1029  const char *emphasis_suffix[]={"","</EM>","</STRONG>"};
1030 
1031  // by writing to the underlying ostream object, we avoid the escape
1032  // functionality
1033  os.fstr << emphasis_prefix[mtc.emphasis_level()]
1034  << mtc.value_string()
1035  << emphasis_suffix[mtc.emphasis_level()];
1036  return os;
1037 }
EmphasisLevel emphasis_level() const
Definition: cccc_met.cc:85
string value_string() const
Definition: cccc_met.cc:116
ofstream fstr
Definition: cccc_htm.h:50

Member Data Documentation

string Metric_Treatment::code
private

Definition at line 45 of file cccc_met.h.

float Metric_Treatment::lower_threshold
private

Definition at line 49 of file cccc_met.h.

string Metric_Treatment::name
private

Definition at line 45 of file cccc_met.h.

int Metric_Treatment::numerator_threshold
private

Definition at line 56 of file cccc_met.h.

int Metric_Treatment::precision
private

Definition at line 59 of file cccc_met.h.

float Metric_Treatment::upper_threshold
private

Definition at line 49 of file cccc_met.h.

int Metric_Treatment::width
private

Definition at line 59 of file cccc_met.h.


The documentation for this class was generated from the following files: