31 #ifdef CCCC_CONF_W32VC
34 #ifdef CCCC_CONF_W32BC
52 static const string XML_PREAMBLE =
"<?xml version=\"1.0\" encoding=\"utf-8\"?>";
138 const int MAX_LENGTH = 1000;
140 while(i<value.size() && value[i]==
' ')
144 return value.substr(i,MAX_LENGTH);
155 CCCC_Xml_Stream main_xml_stream(file.c_str(),
"Report on software metrics");
168 main_xml_stream.Project_Summary();
173 main_xml_stream.Procedural_Summary();
178 main_xml_stream.Procedural_Detail();
183 main_xml_stream.OO_Design();
188 main_xml_stream.Structural_Summary();
193 main_xml_stream.Structural_Detail();
198 main_xml_stream.Separate_Modules();
203 main_xml_stream.Other_Extents();
210 fstr.open(fname.c_str());
211 if(
fstr.good() != TRUE)
213 cerr <<
"failed to open " << fname.c_str()
214 <<
" for output in directory " <<
outdir.c_str() << endl;
231 time_t generationTime=time(NULL);
233 << ctime(&generationTime)
345 while(module_ptr!=NULL)
389 <<
" (" << mod <<
")" << std::endl;
393 CCCC_Module::relationship_map_t::iterator iter;
410 if(relationship_map==NULL)
412 cerr <<
"unexpected relationship mask " << mask << endl;
418 iter=relationship_map->begin();
419 iter!=relationship_map->end();
452 while(module_ptr!=NULL)
478 "procdet",
"procsum",mod_ptr);
492 while(extent_ptr!=NULL)
508 string ref_name,
string ref_href,
531 int count,
string tag)
538 int num,
int denom,
string tag)
618 const char *cptr=stg.c_str();
619 while(*cptr!=
'\000') {
625 case '>': os.
fstr <<
">" ;
break;
626 case '<': os.
fstr <<
"<" ;
break;
627 case '&': os.
fstr <<
"&";
break;
628 default : os.
fstr << c;
652 if(trivial_module==FALSE)
654 string info=
"Detailed report on module " + mod_ptr->
key();
657 filename+=mod_ptr->
key()+
".xml";
665 module_xml_str.Module_Detail(mod_ptr);
673 module_xml_str.Procedural_Detail(mod_ptr);
681 module_xml_str.Structural_Detail(mod_ptr);
691 <<
" is trivial" << endl;
711 CCCC_Record::Extent_Table::iterator eIter = module_ptr->
extent_table.begin();
747 CCCC_Module::member_map_t::iterator iter = module_ptr->
member_map.begin();
836 static string pad_string(
int target_width,
string the_string,
string padding)
838 int spaces_required=target_width-the_string.size();
840 while(spaces_required>0)
845 return pad_string+the_string;
static const string MODDET_NODE_NAME
static const string VISIBLE_ATTR
CCCC_Table< CCCC_Module > module_table
static const string WMC1_NODE_NAME
static const string LEVEL_NORMAL
void Put_Extent_URL(const CCCC_Extent &extent)
static const string SUPPLIERS_NODE_NAME
static const string CLIENTS_NODE_NAME
int get_count(const char *count_tag)
void Put_Structural_Details_Node(CCCC_Module *mod, CCCC_Project *prj, int mask, UserelNameLevel nl)
static const string EXTENT_NODE_NAME
virtual string key() const
static const string SUMMARY_NODE_NAME
static const string LOCPERCOM_NODE_NAME
relationship_map_t client_map
static const string SUPMOD_NODE_NAME
static const string BOOL_FALSE
static const string XML_TAG_OPEN_END
static const string OODESIGN_NODE_NAME
static const string REJECTED_NODE_NAME
static string ltrim(string value)
static const string BOOL_TRUE
void Module_Summary(CCCC_Module *module_ptr)
static const string IF4VISPERMOD_NODE_NAME
static const string XML_TAG_CLOSE_BEGIN
static const string COMPERMEM_NODE_NAME
CCCC_Table< CCCC_Extent > rejected_extent_table
EmphasisLevel emphasis_level() const
static const string STRUCTDET_NODE_NAME
static const string WMCV_NODE_NAME
static const string LEVEL_MEDIUM
static const string LOCPERMEM_NODE_NAME
static const string TIMESTAMP_NODE_NAME
static const string MVGPERMEM_NODE_NAME
static const string XML_COMMENT_END
static const string XML_TAG_OPEN_BEGIN
static const string CBO_NODE_NAME
static const string LINE_ATTR
static const string NOC_NODE_NAME
string value_string() const
static const string MEMBER_NODE_NAME
void Put_Label_Node(string nodeTag, string label, int width=0, string ref_name="", string ref_href="", CCCC_Record *rec_ptr=0)
static const string FI_NODE_NAME
virtual int get_count(const char *count_tag)
static const string IF4CONPERMEM_NODE_NAME
static const string PROCSUM_NODE_NAME
virtual int get_count(const char *count_tag)
int get_count(const char *count_tag)
string name(int index) const
static const string PROJECT_NODE_NAME
static const string COMPERMOD_NODE_NAME
static const string FO_NODE_NAME
static const string CONCRETE_ATTR
CCCC_Xml_Stream(const string &fname, const string &info)
static const string STRUCTSUM_NODE_NAME
static const string LOC_NODE_NAME
static const string MVGPERCOM_NODE_NAME
static const string XML_DQUOTE
static const string XML_SPACE
static const string XML_EQUALS
Extent_Table extent_table
static const string XML_NEWLINE
static const string MODULE_NODE_NAME
CCCC_Xml_Stream & operator<<(CCCC_Xml_Stream &os, const string &stg)
static const string IF4PERMOD_NODE_NAME
static const string FIV_NODE_NAME
AugmentedBool is_concrete() const
static void GenerateReports(CCCC_Project *project, int report_mask, const string &outfile, const string &outdir)
static const string IF4PERMEM_NODE_NAME
static const string XML_TAG_INLINE_END
static const string DESC_NODE_NAME
static const string MVGPERMOD_NODE_NAME
static const string FILE_ATTR
static const string NAME_NODE_NAME
static const string VALUE_ATTR
static const string NOM_NODE_NAME
string name(int name_level) const
static const string DIT_NODE_NAME
static const string IF4CONPERMOD_NODE_NAME
static const string FIC_NODE_NAME
static const string IF4CON_NODE_NAME
static const string FOC_NODE_NAME
static const string XML_COMMENT_BEGIN
string name(int index) const
relationship_map_t supplier_map
AugmentedBool is_visible() const
static string pad_string(int target_width, string the_string, string padding)
static const string FOV_NODE_NAME
void Procedural_Summary()
int get_count(const char *count_tag)
static const string PROCDET_NODE_NAME
int main(int argc, char **argv)
static const string COM_NODE_NAME
void Structural_Summary()
static const string IF4VISPERMEM_NODE_NAME
static const string IF4_NODE_NAME
static const string XML_PREAMBLE
static const string MVG_NODE_NAME
static const string LEVEL_ATTR
static const string SRCREF_NODE_NAME
std::map< string, CCCC_UseRelationship * > relationship_map_t
void Put_Extent_Node(const CCCC_Extent &extent, int width=0, bool withDescription=false)
void Put_Extent_List(CCCC_Record &record, bool withDescription=false)
void Put_Metric_Node(string nodeTag, const CCCC_Metric &metric)
static CCCC_Project * prjptr
static const string LEVEL_HIGH
static const string LOCPERMOD_NODE_NAME
void Module_Detail(CCCC_Module *module_ptr)
static const string XML_TAG_CLOSE_END
static const string XML_TAG_INLINE_BEGIN
static const string OTHER_NODE_NAME
static const string IF4VIS_NODE_NAME
string name(int index) const
static const string MODSUM_NODE_NAME
static const string REJ_LOC_NODE_NAME
static const string CLIMOD_NODE_NAME