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

#include <cccc_xml.h>

Collaboration diagram for CCCC_Xml_Stream:
[legend]

Public Member Functions

 CCCC_Xml_Stream (const string &fname, const string &info)
 
 ~CCCC_Xml_Stream ()
 

Static Public Member Functions

static void GenerateReports (CCCC_Project *project, int report_mask, const string &outfile, const string &outdir)
 

Private Member Functions

void Timestamp ()
 
void Project_Summary ()
 
void Procedural_Summary ()
 
void Procedural_Detail ()
 
void Structural_Summary ()
 
void Structural_Detail ()
 
void OO_Design ()
 
void Other_Extents ()
 
void Separate_Modules ()
 
void Source_Listing ()
 
void Module_Summary (CCCC_Module *module_ptr)
 
void Module_Detail (CCCC_Module *module_ptr)
 
void Procedural_Detail (CCCC_Module *module_ptr)
 
void Structural_Detail (CCCC_Module *module_ptr)
 
void Separate_Module_Link (CCCC_Module *module_ptr)
 
void Put_Label_Node (string nodeTag, string label, int width=0, string ref_name="", string ref_href="", CCCC_Record *rec_ptr=0)
 
void Put_Metric_Node (string nodeTag, const CCCC_Metric &metric)
 
void Put_Metric_Node (string nodeTag, int count, string tag)
 
void Put_Metric_Node (string nodeTag, int num, int denom, string tag)
 
void Put_Extent_URL (const CCCC_Extent &extent)
 
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_Structural_Details_Node (CCCC_Module *mod, CCCC_Project *prj, int mask, UserelNameLevel nl)
 

Private Attributes

ofstream fstr
 

Static Private Attributes

static string libdir
 
static string outdir
 
static CCCC_Projectprjptr
 

Friends

CCCC_Xml_Streamoperator<< (CCCC_Xml_Stream &os, const string &stg)
 
CCCC_Xml_Streamoperator<< (CCCC_Xml_Stream &os, const CCCC_Metric &mtc)
 

Detailed Description

Definition at line 41 of file cccc_xml.h.

Constructor & Destructor Documentation

CCCC_Xml_Stream::CCCC_Xml_Stream ( const string &  fname,
const string &  info 
)

Definition at line 207 of file cccc_xml.cc.

208 {
209  // cerr << "Attempting to open file in directory " << outdir.c_str() << endl;
210  fstr.open(fname.c_str());
211  if(fstr.good() != TRUE)
212  {
213  cerr << "failed to open " << fname.c_str()
214  << " for output in directory " << outdir.c_str() << endl;
215  exit(1);
216  }
217 
218  fstr << XML_PREAMBLE << endl
219  << XML_COMMENT_BEGIN << info << XML_COMMENT_END << endl
221 }
static const string XML_TAG_OPEN_END
Definition: cccc_xml.cc:56
static string outdir
Definition: cccc_xml.h:49
static const string XML_COMMENT_END
Definition: cccc_xml.cc:54
static const string XML_TAG_OPEN_BEGIN
Definition: cccc_xml.cc:55
static const string PROJECT_NODE_NAME
Definition: cccc_xml.cc:66
static const string XML_COMMENT_BEGIN
Definition: cccc_xml.cc:53
ofstream fstr
Definition: cccc_xml.h:47
static const string XML_PREAMBLE
Definition: cccc_xml.cc:52
CCCC_Xml_Stream::~CCCC_Xml_Stream ( )

Definition at line 223 of file cccc_xml.cc.

224 {
226  fstr.close();
227 }
static const string XML_TAG_CLOSE_BEGIN
Definition: cccc_xml.cc:57
static const string PROJECT_NODE_NAME
Definition: cccc_xml.cc:66
ofstream fstr
Definition: cccc_xml.h:47
static const string XML_TAG_CLOSE_END
Definition: cccc_xml.cc:58

Member Function Documentation

void CCCC_Xml_Stream::GenerateReports ( CCCC_Project project,
int  report_mask,
const string &  outfile,
const string &  outdir 
)
static

Definition at line 147 of file cccc_xml.cc.

151 {
152  prjptr=prj;
153  outdir=dir;
154 
155  CCCC_Xml_Stream main_xml_stream(file.c_str(),"Report on software metrics");
156 
157  // For testing purposes, we want to be able to disable the inclusion
158  // of the current time in the report. This enables us to store a
159  // reference version of the report in RCS and expect the program
160  // to generate an identical one at regression testing time.
161  if(report_mask & rtSHOW_GEN_TIME)
162  {
163  main_xml_stream.Timestamp();
164  }
165 
166  if(report_mask & rtSUMMARY)
167  {
168  main_xml_stream.Project_Summary();
169  }
170 
171  if(report_mask & rtPROC1)
172  {
173  main_xml_stream.Procedural_Summary();
174  }
175 
176  if(report_mask & rtPROC2)
177  {
178  main_xml_stream.Procedural_Detail();
179  }
180 
181  if(report_mask & rtOODESIGN)
182  {
183  main_xml_stream.OO_Design();
184  }
185 
186  if(report_mask & rtSTRUCT1)
187  {
188  main_xml_stream.Structural_Summary();
189  }
190 
191  if(report_mask & rtSTRUCT2)
192  {
193  main_xml_stream.Structural_Detail();
194  }
195 
196  if(report_mask & rtSEPARATE_MODULES)
197  {
198  main_xml_stream.Separate_Modules();
199  }
200 
201  if(report_mask & rtOTHER)
202  {
203  main_xml_stream.Other_Extents();
204  }
205 }
static string outdir
Definition: cccc_xml.h:49
void Timestamp()
Definition: cccc_xml.cc:229
CCCC_Project * prj
Definition: ccccmain.cc:49
static CCCC_Project * prjptr
Definition: cccc_xml.h:50

Here is the call graph for this function:

Here is the caller graph for this function:

void CCCC_Xml_Stream::Module_Detail ( CCCC_Module module_ptr)
private

Definition at line 698 of file cccc_xml.cc.

699 {
700  // this function generates the contents of the table of definition
701  // and declaration extents for a single module
702 
703  // the output needs to be enveloped in a pair of <TABLE></TABLE> tags
704  // these have not been put within the function because it is designed
705  // to be used in two contexts:
706  // 1. within the Separate_Modules function, wrapped directly in the table
707  // tags
708  // 2. within the Module_Detail function, where the table tags are
709  // around the output of many calls to this function (not yet implemented)
710 
711  CCCC_Record::Extent_Table::iterator eIter = module_ptr->extent_table.begin();
712  while(eIter!=module_ptr->extent_table.end())
713  {
714  CCCC_Extent *ext_ptr=(*eIter).second;
715  Put_Extent_Node(*ext_ptr,0,true);
716  int loc=ext_ptr->get_count("LOC");
717  int mvg=ext_ptr->get_count("MVG");
718  int com=ext_ptr->get_count("COM");
719  CCCC_Metric mloc(loc,"LOCf");
720  CCCC_Metric mmvg(mvg,"MVGf");
721  CCCC_Metric ml_c(loc,com,"L_C");
722  CCCC_Metric mm_c(mvg,com,"M_C");
723 
729 
730  eIter++;
731  }
732 }
static const string LOCPERCOM_NODE_NAME
Definition: cccc_xml.cc:92
int get_count(const char *count_tag)
Definition: cccc_ext.cc:147
static const string LOC_NODE_NAME
Definition: cccc_xml.cc:90
static const string MVGPERCOM_NODE_NAME
Definition: cccc_xml.cc:96
Extent_Table extent_table
Definition: cccc_rec.h:45
static const string COM_NODE_NAME
Definition: cccc_xml.cc:98
static const string MVG_NODE_NAME
Definition: cccc_xml.cc:94
void Put_Extent_Node(const CCCC_Extent &extent, int width=0, bool withDescription=false)
Definition: cccc_xml.cc:580
void Put_Metric_Node(string nodeTag, const CCCC_Metric &metric)
Definition: cccc_xml.cc:544

Here is the call graph for this function:

void CCCC_Xml_Stream::Module_Summary ( CCCC_Module module_ptr)
private

Definition at line 784 of file cccc_xml.cc.

785 {
786  // calculate the counts on which all displayed data will be based
787  // int nof=module_ptr->member_table.records(); // Number of functions
788  int nof=0;
789  int loc=module_ptr->get_count("LOC"); // lines of code
790  int mvg=module_ptr->get_count("MVG"); // McCabes cyclomatic complexity
791  int com=module_ptr->get_count("COM"); // lines of comment
792 
793  // the variants of IF4 measure information flow and couplings
794  int if4=module_ptr->get_count("IF4"); // (all couplings)
795  int if4v=module_ptr->get_count("IF4v"); // (visible only)
796  int if4c=module_ptr->get_count("IF4c"); // (concrete only)
797 
798  int wmc1=module_ptr->get_count("WMC1"); // Weighted methods/class (unity)
799  int wmcv=module_ptr->get_count("WMCv"); // Weighted methods/class (visible)
800  int dit=module_ptr->get_count("DIT"); // depth of inheritance tree
801  int noc=module_ptr->get_count("NOC"); // number of children
802  int cbo=module_ptr->get_count("CBO"); // coupling between objects
803 
805 
806  Put_Metric_Node(LOC_NODE_NAME,loc,"LOCm");
807  Put_Metric_Node(LOCPERMEM_NODE_NAME,loc,nof,"LOCg");
808  Put_Metric_Node(MVG_NODE_NAME,mvg,"MVGm");
809  Put_Metric_Node(MVGPERMEM_NODE_NAME,mvg,nof,"MVGf");
810  Put_Metric_Node(LOC_NODE_NAME,com,"COMm");
811  Put_Metric_Node(LOCPERMEM_NODE_NAME,com,nof,"8.3");
812  Put_Metric_Node(LOCPERCOM_NODE_NAME,loc,com,"L_C");
813  Put_Metric_Node(MVGPERCOM_NODE_NAME,mvg,com,"M_C");
819  Put_Metric_Node(IF4_NODE_NAME,if4,1,"IF4");
820  Put_Metric_Node(IF4PERMEM_NODE_NAME,if4,nof,"8.3");
821  Put_Metric_Node(IF4VIS_NODE_NAME,if4v,1,"IF4v");
822  Put_Metric_Node(IF4VISPERMEM_NODE_NAME,if4v,nof,"8.3");
823  Put_Metric_Node(IF4CON_NODE_NAME,if4c,1,"IF4c");
824  Put_Metric_Node(IF4CONPERMEM_NODE_NAME,if4c,nof,"8.3");
825 
827 }
static const string WMC1_NODE_NAME
Definition: cccc_xml.cc:101
static const string LOCPERCOM_NODE_NAME
Definition: cccc_xml.cc:92
static const string XML_TAG_OPEN_END
Definition: cccc_xml.cc:56
static const string XML_TAG_CLOSE_BEGIN
Definition: cccc_xml.cc:57
static const string WMCV_NODE_NAME
Definition: cccc_xml.cc:102
static const string LOCPERMEM_NODE_NAME
Definition: cccc_xml.cc:93
static const string MVGPERMEM_NODE_NAME
Definition: cccc_xml.cc:97
static const string XML_TAG_OPEN_BEGIN
Definition: cccc_xml.cc:55
static const string CBO_NODE_NAME
Definition: cccc_xml.cc:105
static const string NOC_NODE_NAME
Definition: cccc_xml.cc:104
virtual int get_count(const char *count_tag)
Definition: cccc_mod.cc:64
static const string IF4CONPERMEM_NODE_NAME
Definition: cccc_xml.cc:114
static const string LOC_NODE_NAME
Definition: cccc_xml.cc:90
static const string MVGPERCOM_NODE_NAME
Definition: cccc_xml.cc:96
static const string IF4PERMEM_NODE_NAME
Definition: cccc_xml.cc:108
static const string DIT_NODE_NAME
Definition: cccc_xml.cc:103
static const string IF4CON_NODE_NAME
Definition: cccc_xml.cc:112
ofstream fstr
Definition: cccc_xml.h:47
static const string IF4VISPERMEM_NODE_NAME
Definition: cccc_xml.cc:111
static const string IF4_NODE_NAME
Definition: cccc_xml.cc:106
static const string MVG_NODE_NAME
Definition: cccc_xml.cc:94
void Put_Metric_Node(string nodeTag, const CCCC_Metric &metric)
Definition: cccc_xml.cc:544
static const string XML_TAG_CLOSE_END
Definition: cccc_xml.cc:58
static const string IF4VIS_NODE_NAME
Definition: cccc_xml.cc:109
static const string MODSUM_NODE_NAME
Definition: cccc_xml.cc:69

Here is the call graph for this function:

Here is the caller graph for this function:

void CCCC_Xml_Stream::OO_Design ( )
private

Definition at line 270 of file cccc_xml.cc.

271 {
273 
275  int i=0;
276  while(mod_ptr!=NULL)
277  {
278  i++;
279  if( mod_ptr->is_trivial() == FALSE)
280  {
282  Put_Label_Node(NAME_NODE_NAME,mod_ptr->name(nlSIMPLE).c_str(),0,"","");
283 
284  CCCC_Metric wmc1(mod_ptr->get_count("WMC1"),"WMC1");
285  CCCC_Metric wmcv(mod_ptr->get_count("WMCv"),"WMCv");
286  CCCC_Metric dit(mod_ptr->get_count("DIT"),"DIT");
287  CCCC_Metric noc(mod_ptr->get_count("NOC"),"NOC");
288  CCCC_Metric cbo(mod_ptr->get_count("CBO"),"CBO");
289 
295 
297 
298  }
299  mod_ptr=prjptr->module_table.next_item();
300  }
302 }
CCCC_Table< CCCC_Module > module_table
Definition: cccc_prj.h:54
static const string WMC1_NODE_NAME
Definition: cccc_xml.cc:101
int is_trivial()
Definition: cccc_mod.cc:181
static const string XML_TAG_OPEN_END
Definition: cccc_xml.cc:56
static const string OODESIGN_NODE_NAME
Definition: cccc_xml.cc:75
static const string XML_TAG_CLOSE_BEGIN
Definition: cccc_xml.cc:57
static const string WMCV_NODE_NAME
Definition: cccc_xml.cc:102
static const string XML_TAG_OPEN_BEGIN
Definition: cccc_xml.cc:55
static const string CBO_NODE_NAME
Definition: cccc_xml.cc:105
static const string NOC_NODE_NAME
Definition: cccc_xml.cc:104
void Put_Label_Node(string nodeTag, string label, int width=0, string ref_name="", string ref_href="", CCCC_Record *rec_ptr=0)
Definition: cccc_xml.cc:507
virtual int get_count(const char *count_tag)
Definition: cccc_mod.cc:64
T * first_item()
Definition: cccc_tbl.cc:118
T * next_item()
Definition: cccc_tbl.cc:124
static const string MODULE_NODE_NAME
Definition: cccc_xml.cc:79
static const string NAME_NODE_NAME
Definition: cccc_xml.cc:78
string name(int name_level) const
Definition: cccc_mod.cc:35
static const string DIT_NODE_NAME
Definition: cccc_xml.cc:103
ofstream fstr
Definition: cccc_xml.h:47
void Put_Metric_Node(string nodeTag, const CCCC_Metric &metric)
Definition: cccc_xml.cc:544
static CCCC_Project * prjptr
Definition: cccc_xml.h:50
static const string XML_TAG_CLOSE_END
Definition: cccc_xml.cc:58

Here is the call graph for this function:

void CCCC_Xml_Stream::Other_Extents ( )
private

Definition at line 487 of file cccc_xml.cc.

488 {
490 
492  while(extent_ptr!=NULL)
493  {
495  Put_Label_Node(NAME_NODE_NAME,extent_ptr->name(nlDESCRIPTION).c_str());
496  Put_Extent_Node(*extent_ptr,0);
497  Put_Metric_Node(LOC_NODE_NAME,extent_ptr->get_count("LOC"),"");
498  Put_Metric_Node(COM_NODE_NAME,extent_ptr->get_count("COM"),"");
499  Put_Metric_Node(MVG_NODE_NAME,extent_ptr->get_count("MVG"),"");
500  extent_ptr=prjptr->rejected_extent_table.next_item();
502  }
503 
505 }
static const string XML_TAG_OPEN_END
Definition: cccc_xml.cc:56
static const string REJECTED_NODE_NAME
Definition: cccc_xml.cc:77
static const string XML_TAG_CLOSE_BEGIN
Definition: cccc_xml.cc:57
CCCC_Table< CCCC_Extent > rejected_extent_table
Definition: cccc_prj.h:57
static const string XML_TAG_OPEN_BEGIN
Definition: cccc_xml.cc:55
void Put_Label_Node(string nodeTag, string label, int width=0, string ref_name="", string ref_href="", CCCC_Record *rec_ptr=0)
Definition: cccc_xml.cc:507
int get_count(const char *count_tag)
Definition: cccc_ext.cc:147
T * first_item()
Definition: cccc_tbl.cc:118
static const string LOC_NODE_NAME
Definition: cccc_xml.cc:90
T * next_item()
Definition: cccc_tbl.cc:124
static const string NAME_NODE_NAME
Definition: cccc_xml.cc:78
ofstream fstr
Definition: cccc_xml.h:47
static const string COM_NODE_NAME
Definition: cccc_xml.cc:98
static const string MVG_NODE_NAME
Definition: cccc_xml.cc:94
void Put_Extent_Node(const CCCC_Extent &extent, int width=0, bool withDescription=false)
Definition: cccc_xml.cc:580
void Put_Metric_Node(string nodeTag, const CCCC_Metric &metric)
Definition: cccc_xml.cc:544
static CCCC_Project * prjptr
Definition: cccc_xml.h:50
static const string XML_TAG_CLOSE_END
Definition: cccc_xml.cc:58
static const string OTHER_NODE_NAME
Definition: cccc_xml.cc:76
string name(int index) const
Definition: cccc_ext.cc:107

Here is the call graph for this function:

void CCCC_Xml_Stream::Procedural_Detail ( )
private

Definition at line 463 of file cccc_xml.cc.

463  {
464 
466 
468  while(mod_ptr!=NULL)
469  {
470  if(
471  (mod_ptr->name(nlMODULE_TYPE)!="builtin") &&
472  (mod_ptr->name(nlMODULE_TYPE)!="enum") &&
473  (mod_ptr->name(nlMODULE_TYPE)!="union")
474  )
475  {
477  Put_Label_Node(NAME_NODE_NAME,mod_ptr->name(nlSIMPLE).c_str(),50,
478  "procdet","procsum",mod_ptr);
479  Procedural_Detail(mod_ptr);
481  }
482  mod_ptr=prjptr->module_table.next_item();
483  }
485 }
CCCC_Table< CCCC_Module > module_table
Definition: cccc_prj.h:54
static const string XML_TAG_OPEN_END
Definition: cccc_xml.cc:56
void Procedural_Detail()
Definition: cccc_xml.cc:463
static const string XML_TAG_CLOSE_BEGIN
Definition: cccc_xml.cc:57
static const string XML_TAG_OPEN_BEGIN
Definition: cccc_xml.cc:55
void Put_Label_Node(string nodeTag, string label, int width=0, string ref_name="", string ref_href="", CCCC_Record *rec_ptr=0)
Definition: cccc_xml.cc:507
T * first_item()
Definition: cccc_tbl.cc:118
T * next_item()
Definition: cccc_tbl.cc:124
static const string MODULE_NODE_NAME
Definition: cccc_xml.cc:79
static const string NAME_NODE_NAME
Definition: cccc_xml.cc:78
string name(int name_level) const
Definition: cccc_mod.cc:35
ofstream fstr
Definition: cccc_xml.h:47
static const string PROCDET_NODE_NAME
Definition: cccc_xml.cc:72
static CCCC_Project * prjptr
Definition: cccc_xml.h:50
static const string XML_TAG_CLOSE_END
Definition: cccc_xml.cc:58

Here is the call graph for this function:

void CCCC_Xml_Stream::Procedural_Detail ( CCCC_Module module_ptr)
private

Definition at line 734 of file cccc_xml.cc.

735 {
736  // this function generates the contents of the procedural detail table
737  // relating to a single module
738 
739  // the output needs to be enveloped in a pair of <TABLE></TABLE> tags
740  // these have not been put within the function because it is designed
741  // to be used in two contexts:
742  // 1. within the Separate_Modules function, wrapped directly in the table
743  // tags
744  // 2. within the Procedural_Detail function, where the table tags are
745  // around the output of many calls to this function
746 
747  CCCC_Module::member_map_t::iterator iter = module_ptr->member_map.begin();
748 
749  while(iter!=module_ptr->member_map.end())
750  {
752 
753  CCCC_Member *mem_ptr=(*iter).second;
754  Put_Label_Node(NAME_NODE_NAME,mem_ptr->name(nlLOCAL).c_str(),0,"","",mem_ptr);
755  int loc=mem_ptr->get_count("LOC");
756  int mvg=mem_ptr->get_count("MVG");
757  int com=mem_ptr->get_count("COM");
758  CCCC_Metric mloc(loc,"LOCf");
759  CCCC_Metric mmvg(mvg,"MVGf");
760  CCCC_Metric ml_c(loc,com,"L_C");
761  CCCC_Metric mm_c(mvg,com,"M_C");
762 
768 
769  iter++;
770 
772  }
773 }
int get_count(const char *count_tag)
Definition: cccc_mem.cc:35
static const string LOCPERCOM_NODE_NAME
Definition: cccc_xml.cc:92
static const string XML_TAG_OPEN_END
Definition: cccc_xml.cc:56
static const string XML_TAG_CLOSE_BEGIN
Definition: cccc_xml.cc:57
static const string XML_TAG_OPEN_BEGIN
Definition: cccc_xml.cc:55
static const string MEMBER_NODE_NAME
Definition: cccc_xml.cc:80
void Put_Label_Node(string nodeTag, string label, int width=0, string ref_name="", string ref_href="", CCCC_Record *rec_ptr=0)
Definition: cccc_xml.cc:507
static const string LOC_NODE_NAME
Definition: cccc_xml.cc:90
static const string MVGPERCOM_NODE_NAME
Definition: cccc_xml.cc:96
static const string NAME_NODE_NAME
Definition: cccc_xml.cc:78
string name(int index) const
Definition: cccc_mem.cc:99
ofstream fstr
Definition: cccc_xml.h:47
static const string COM_NODE_NAME
Definition: cccc_xml.cc:98
member_map_t member_map
Definition: cccc_mod.h:51
static const string MVG_NODE_NAME
Definition: cccc_xml.cc:94
void Put_Metric_Node(string nodeTag, const CCCC_Metric &metric)
Definition: cccc_xml.cc:544
static const string XML_TAG_CLOSE_END
Definition: cccc_xml.cc:58

Here is the call graph for this function:

void CCCC_Xml_Stream::Procedural_Summary ( )
private

Definition at line 304 of file cccc_xml.cc.

305 {
306 
308 
310  int i=0;
311  while(mod_ptr!=NULL)
312  {
313  i++;
314  if( mod_ptr->is_trivial() == FALSE)
315  {
317  Put_Label_Node(NAME_NODE_NAME,mod_ptr->name(nlSIMPLE).c_str(),0,"","");
318 
319  int loc=mod_ptr->get_count("LOC");
320  int mvg=mod_ptr->get_count("MVG");
321  int com=mod_ptr->get_count("COM");
322  CCCC_Metric mloc(loc,"LOCm");
323  CCCC_Metric mmvg(mvg,"MVGm");
324  CCCC_Metric ml_c(loc,com,"L_C");
325  CCCC_Metric mm_c(mvg,com,"M_C");
326 
333  }
334  mod_ptr=prjptr->module_table.next_item();
335  }
336 
338 }
CCCC_Table< CCCC_Module > module_table
Definition: cccc_prj.h:54
static const string LOCPERCOM_NODE_NAME
Definition: cccc_xml.cc:92
int is_trivial()
Definition: cccc_mod.cc:181
static const string XML_TAG_OPEN_END
Definition: cccc_xml.cc:56
static const string XML_TAG_CLOSE_BEGIN
Definition: cccc_xml.cc:57
static const string XML_TAG_OPEN_BEGIN
Definition: cccc_xml.cc:55
void Put_Label_Node(string nodeTag, string label, int width=0, string ref_name="", string ref_href="", CCCC_Record *rec_ptr=0)
Definition: cccc_xml.cc:507
virtual int get_count(const char *count_tag)
Definition: cccc_mod.cc:64
static const string PROCSUM_NODE_NAME
Definition: cccc_xml.cc:71
T * first_item()
Definition: cccc_tbl.cc:118
static const string LOC_NODE_NAME
Definition: cccc_xml.cc:90
static const string MVGPERCOM_NODE_NAME
Definition: cccc_xml.cc:96
T * next_item()
Definition: cccc_tbl.cc:124
static const string MODULE_NODE_NAME
Definition: cccc_xml.cc:79
static const string NAME_NODE_NAME
Definition: cccc_xml.cc:78
string name(int name_level) const
Definition: cccc_mod.cc:35
ofstream fstr
Definition: cccc_xml.h:47
static const string COM_NODE_NAME
Definition: cccc_xml.cc:98
static const string MVG_NODE_NAME
Definition: cccc_xml.cc:94
void Put_Metric_Node(string nodeTag, const CCCC_Metric &metric)
Definition: cccc_xml.cc:544
static CCCC_Project * prjptr
Definition: cccc_xml.h:50
static const string XML_TAG_CLOSE_END
Definition: cccc_xml.cc:58

Here is the call graph for this function:

void CCCC_Xml_Stream::Project_Summary ( )
private

Definition at line 238 of file cccc_xml.cc.

238  {
239  // calculate the counts on which all displayed data will be based
240  int nom=prjptr->get_count("NOM"); // number of modules
241  int loc=prjptr->get_count("LOC"); // lines of code
242  int mvg=prjptr->get_count("MVG"); // McCabes cyclomatic complexity
243  int com=prjptr->get_count("COM"); // lines of comment
244  int if4=prjptr->get_count("IF4"); // intermodule complexity (all couplings)
245  int if4v=prjptr->get_count("IF4v"); // intermodule complexity (visible only)
246  int if4c=prjptr->get_count("IF4c"); // intermodule complexity (concrete only)
247  int rej=prjptr->rejected_extent_table.get_count("LOC");
248 
250 
252  Put_Metric_Node(LOC_NODE_NAME,loc,"LOCp");
253  Put_Metric_Node(LOCPERMOD_NODE_NAME,loc,nom,"LOCper");
254  Put_Metric_Node(MVG_NODE_NAME,mvg,"MVGp");
255  Put_Metric_Node(MVGPERMOD_NODE_NAME,mvg,nom,"MVGper");
256  Put_Metric_Node(COM_NODE_NAME,com,"COM");
257  Put_Metric_Node(COMPERMOD_NODE_NAME,com,nom,"COMper");
258  Put_Metric_Node(LOCPERCOM_NODE_NAME,loc,com,"L_C");
259  Put_Metric_Node(MVGPERCOM_NODE_NAME,mvg,com,"M_C");
261  Put_Metric_Node(IF4PERMOD_NODE_NAME,if4,nom,"8.3");
263  Put_Metric_Node(IF4VISPERMOD_NODE_NAME,if4v,nom,"8.3");
265  Put_Metric_Node(IF4CONPERMOD_NODE_NAME,if4c,nom,"8.3");
268 }
static const string SUMMARY_NODE_NAME
Definition: cccc_xml.cc:68
static const string LOCPERCOM_NODE_NAME
Definition: cccc_xml.cc:92
static const string XML_TAG_OPEN_END
Definition: cccc_xml.cc:56
static const string IF4VISPERMOD_NODE_NAME
Definition: cccc_xml.cc:110
static const string XML_TAG_CLOSE_BEGIN
Definition: cccc_xml.cc:57
CCCC_Table< CCCC_Extent > rejected_extent_table
Definition: cccc_prj.h:57
static const string XML_TAG_OPEN_BEGIN
Definition: cccc_xml.cc:55
virtual int get_count(const char *count_tag)
Definition: cccc_tbl.cc:52
static const string COMPERMOD_NODE_NAME
Definition: cccc_xml.cc:99
static const string LOC_NODE_NAME
Definition: cccc_xml.cc:90
static const string MVGPERCOM_NODE_NAME
Definition: cccc_xml.cc:96
static const string IF4PERMOD_NODE_NAME
Definition: cccc_xml.cc:107
static const string MVGPERMOD_NODE_NAME
Definition: cccc_xml.cc:95
static const string NOM_NODE_NAME
Definition: cccc_xml.cc:89
static const string IF4CONPERMOD_NODE_NAME
Definition: cccc_xml.cc:113
static const string IF4CON_NODE_NAME
Definition: cccc_xml.cc:112
ofstream fstr
Definition: cccc_xml.h:47
int get_count(const char *count_tag)
Definition: cccc_prj.cc:308
static const string COM_NODE_NAME
Definition: cccc_xml.cc:98
static const string IF4_NODE_NAME
Definition: cccc_xml.cc:106
static const string MVG_NODE_NAME
Definition: cccc_xml.cc:94
void Put_Metric_Node(string nodeTag, const CCCC_Metric &metric)
Definition: cccc_xml.cc:544
static CCCC_Project * prjptr
Definition: cccc_xml.h:50
static const string LOCPERMOD_NODE_NAME
Definition: cccc_xml.cc:91
static const string XML_TAG_CLOSE_END
Definition: cccc_xml.cc:58
static const string IF4VIS_NODE_NAME
Definition: cccc_xml.cc:109
static const string REJ_LOC_NODE_NAME
Definition: cccc_xml.cc:121

Here is the call graph for this function:

void CCCC_Xml_Stream::Put_Extent_List ( CCCC_Record record,
bool  withDescription = false 
)
private

Definition at line 592 of file cccc_xml.cc.

593 {
594  CCCC_Extent *ext_ptr=record.extent_table.first_item();
595  while(ext_ptr!=NULL)
596  {
598  << endl;
599  if(withDescription)
600  {
602  << ext_ptr->name(nlDESCRIPTION)
604  << endl;
605  }
606  Put_Extent_URL(*ext_ptr);
608  << endl;
609  ext_ptr=record.extent_table.next_item();
610  }
611 }
void Put_Extent_URL(const CCCC_Extent &extent)
Definition: cccc_xml.cc:567
static const string EXTENT_NODE_NAME
Definition: cccc_xml.cc:81
static const string XML_TAG_OPEN_END
Definition: cccc_xml.cc:56
static const string XML_TAG_CLOSE_BEGIN
Definition: cccc_xml.cc:57
static const string XML_TAG_OPEN_BEGIN
Definition: cccc_xml.cc:55
T * first_item()
Definition: cccc_tbl.cc:118
T * next_item()
Definition: cccc_tbl.cc:124
Extent_Table extent_table
Definition: cccc_rec.h:45
static const string DESC_NODE_NAME
Definition: cccc_xml.cc:86
ofstream fstr
Definition: cccc_xml.h:47
static const string XML_TAG_CLOSE_END
Definition: cccc_xml.cc:58
string name(int index) const
Definition: cccc_ext.cc:107

Here is the call graph for this function:

Here is the caller graph for this function:

void CCCC_Xml_Stream::Put_Extent_Node ( const CCCC_Extent extent,
int  width = 0,
bool  withDescription = false 
)
private

Definition at line 580 of file cccc_xml.cc.

581 {
582  if(withDescription)
583  {
585  << extent.name(nlDESCRIPTION)
587  << endl;
588  }
589  Put_Extent_URL(extent);
590 }
void Put_Extent_URL(const CCCC_Extent &extent)
Definition: cccc_xml.cc:567
static const string XML_TAG_OPEN_END
Definition: cccc_xml.cc:56
static const string XML_TAG_CLOSE_BEGIN
Definition: cccc_xml.cc:57
static const string XML_TAG_OPEN_BEGIN
Definition: cccc_xml.cc:55
static const string DESC_NODE_NAME
Definition: cccc_xml.cc:86
ofstream fstr
Definition: cccc_xml.h:47
static const string XML_TAG_CLOSE_END
Definition: cccc_xml.cc:58
string name(int index) const
Definition: cccc_ext.cc:107

Here is the call graph for this function:

Here is the caller graph for this function:

void CCCC_Xml_Stream::Put_Extent_URL ( const CCCC_Extent extent)
private

Definition at line 567 of file cccc_xml.cc.

568 {
569  string filename=extent.name(nlFILENAME);
570  int linenumber=atoi(extent.name(nlLINENUMBER).c_str());
573  *this << filename;
574  fstr << XML_DQUOTE << XML_SPACE
576  *this << linenumber;
577  fstr << XML_DQUOTE << XML_SPACE << XML_TAG_INLINE_END << endl;
578 }
static const string LINE_ATTR
Definition: cccc_xml.cc:126
static const string XML_DQUOTE
Definition: cccc_xml.cc:63
static const string XML_SPACE
Definition: cccc_xml.cc:61
static const string XML_EQUALS
Definition: cccc_xml.cc:64
static const string XML_TAG_INLINE_END
Definition: cccc_xml.cc:60
static const string FILE_ATTR
Definition: cccc_xml.cc:125
ofstream fstr
Definition: cccc_xml.h:47
static const string SRCREF_NODE_NAME
Definition: cccc_xml.cc:87
static const string XML_TAG_INLINE_BEGIN
Definition: cccc_xml.cc:59
string name(int index) const
Definition: cccc_ext.cc:107

Here is the call graph for this function:

Here is the caller graph for this function:

void CCCC_Xml_Stream::Put_Label_Node ( string  nodeTag,
string  label,
int  width = 0,
string  ref_name = "",
string  ref_href = "",
CCCC_Record rec_ptr = 0 
)
private

Definition at line 507 of file cccc_xml.cc.

510 {
511  if(label.size()>0)
512  {
513  fstr << XML_TAG_OPEN_BEGIN << nodeTag << XML_TAG_OPEN_END;
514  *this << label;
515  fstr << XML_TAG_CLOSE_BEGIN << nodeTag << XML_TAG_CLOSE_END
516  << endl;
517  }
518  else
519  {
520  // Do nothing
521  }
522 
523  if(rec_ptr != 0)
524  {
525  Put_Extent_List(*rec_ptr,true);
526  }
527 }
static const string XML_TAG_OPEN_END
Definition: cccc_xml.cc:56
static const string XML_TAG_CLOSE_BEGIN
Definition: cccc_xml.cc:57
static const string XML_TAG_OPEN_BEGIN
Definition: cccc_xml.cc:55
ofstream fstr
Definition: cccc_xml.h:47
void Put_Extent_List(CCCC_Record &record, bool withDescription=false)
Definition: cccc_xml.cc:592
static const string XML_TAG_CLOSE_END
Definition: cccc_xml.cc:58

Here is the call graph for this function:

Here is the caller graph for this function:

void CCCC_Xml_Stream::Put_Metric_Node ( string  nodeTag,
const CCCC_Metric metric 
)
private

Definition at line 544 of file cccc_xml.cc.

545 {
546  fstr << XML_TAG_INLINE_BEGIN << nodeTag << XML_SPACE
548  *this << metric;
549  fstr << XML_DQUOTE << XML_SPACE
551 
552  switch(metric.emphasis_level())
553  {
554  case elMEDIUM:
555  fstr << LEVEL_MEDIUM;
556  break;
557  case elHIGH:
558  fstr << LEVEL_HIGH;
559  break;
560  default:
561  fstr << LEVEL_NORMAL;
562  break;
563  }
564  fstr << XML_DQUOTE << XML_SPACE << XML_TAG_INLINE_END << endl;
565 }
static const string LEVEL_NORMAL
Definition: cccc_xml.cc:130
EmphasisLevel emphasis_level() const
Definition: cccc_met.cc:85
static const string LEVEL_MEDIUM
Definition: cccc_xml.cc:131
static const string XML_DQUOTE
Definition: cccc_xml.cc:63
static const string XML_SPACE
Definition: cccc_xml.cc:61
static const string XML_EQUALS
Definition: cccc_xml.cc:64
static const string XML_TAG_INLINE_END
Definition: cccc_xml.cc:60
static const string VALUE_ATTR
Definition: cccc_xml.cc:123
ofstream fstr
Definition: cccc_xml.h:47
static const string LEVEL_ATTR
Definition: cccc_xml.cc:124
static const string LEVEL_HIGH
Definition: cccc_xml.cc:132
static const string XML_TAG_INLINE_BEGIN
Definition: cccc_xml.cc:59

Here is the call graph for this function:

Here is the caller graph for this function:

void CCCC_Xml_Stream::Put_Metric_Node ( string  nodeTag,
int  count,
string  tag 
)
private

Definition at line 530 of file cccc_xml.cc.

532 {
533  CCCC_Metric m(count, tag.c_str());
534  Put_Metric_Node(nodeTag,m);
535 }
void Put_Metric_Node(string nodeTag, const CCCC_Metric &metric)
Definition: cccc_xml.cc:544

Here is the call graph for this function:

void CCCC_Xml_Stream::Put_Metric_Node ( string  nodeTag,
int  num,
int  denom,
string  tag 
)
private

Definition at line 537 of file cccc_xml.cc.

539 {
540  CCCC_Metric m(num,denom, tag.c_str());
541  Put_Metric_Node(nodeTag,m);
542 }
void Put_Metric_Node(string nodeTag, const CCCC_Metric &metric)
Definition: cccc_xml.cc:544

Here is the call graph for this function:

void CCCC_Xml_Stream::Put_Structural_Details_Node ( CCCC_Module mod,
CCCC_Project prj,
int  mask,
UserelNameLevel  nl 
)
private

Definition at line 383 of file cccc_xml.cc.

385 {
386 
387 #if 0
388  std::cerr << "Relationships for " << mod->name(nlMODULE_NAME)
389  << " (" << mod << ")" << std::endl;
390 #endif
391 
392 
393  CCCC_Module::relationship_map_t::iterator iter;
394  CCCC_Module::relationship_map_t *relationship_map=NULL;
395 
396  string nodeTag;
397 
398  if(mask==rmeCLIENT)
399  {
400  nodeTag = CLIMOD_NODE_NAME;
401  relationship_map=&(mod->client_map);
402 
403  }
404  else if(mask==rmeSUPPLIER)
405  {
406  nodeTag = SUPMOD_NODE_NAME;
407  relationship_map=&(mod->supplier_map);
408  }
409 
410  if(relationship_map==NULL)
411  {
412  cerr << "unexpected relationship mask " << mask << endl;
413  }
414  else
415  {
416  fstr << XML_TAG_OPEN_BEGIN << nodeTag << XML_TAG_OPEN_END << endl;
417  for(
418  iter=relationship_map->begin();
419  iter!=relationship_map->end();
420  iter++
421  )
422  {
423  CCCC_UseRelationship *ur_ptr=(*iter).second;
424  Put_Label_Node(NAME_NODE_NAME, ur_ptr->name(nl).c_str(),0,"","");
425 
426  AugmentedBool vis=ur_ptr->is_visible();
427  AugmentedBool con=ur_ptr->is_concrete();
428 
429  string visvalue = BOOL_FALSE;
430  string convalue = BOOL_FALSE;
431  if(vis!=abFALSE)
432  {
433  visvalue = BOOL_TRUE;
434  }
435  if(con!=abFALSE)
436  {
437  convalue = BOOL_TRUE;
438  }
439  Put_Label_Node(VISIBLE_ATTR,visvalue,0,"","");
440  Put_Label_Node(CONCRETE_ATTR,convalue,0,"","");
441 
442  Put_Extent_List(*ur_ptr,true);
443  }
444  fstr << XML_TAG_CLOSE_BEGIN << nodeTag << XML_TAG_CLOSE_END << endl;
445  }
446 }
static const string VISIBLE_ATTR
Definition: cccc_xml.cc:127
relationship_map_t client_map
Definition: cccc_mod.h:54
static const string SUPMOD_NODE_NAME
Definition: cccc_xml.cc:83
static const string BOOL_FALSE
Definition: cccc_xml.cc:133
static const string XML_TAG_OPEN_END
Definition: cccc_xml.cc:56
static const string BOOL_TRUE
Definition: cccc_xml.cc:134
static const string XML_TAG_CLOSE_BEGIN
Definition: cccc_xml.cc:57
static const string XML_TAG_OPEN_BEGIN
Definition: cccc_xml.cc:55
void Put_Label_Node(string nodeTag, string label, int width=0, string ref_name="", string ref_href="", CCCC_Record *rec_ptr=0)
Definition: cccc_xml.cc:507
string name(int index) const
Definition: cccc_use.cc:40
static const string CONCRETE_ATTR
Definition: cccc_xml.cc:128
AugmentedBool is_concrete() const
Definition: cccc_use.h:51
static const string NAME_NODE_NAME
Definition: cccc_xml.cc:78
string name(int name_level) const
Definition: cccc_mod.cc:35
relationship_map_t supplier_map
Definition: cccc_mod.h:55
ofstream fstr
Definition: cccc_xml.h:47
AugmentedBool is_visible() const
Definition: cccc_use.h:50
std::map< string, CCCC_UseRelationship * > relationship_map_t
Definition: cccc_mod.h:53
void Put_Extent_List(CCCC_Record &record, bool withDescription=false)
Definition: cccc_xml.cc:592
AugmentedBool
Definition: cccc_utl.h:59
static const string XML_TAG_CLOSE_END
Definition: cccc_xml.cc:58
static const string CLIMOD_NODE_NAME
Definition: cccc_xml.cc:85

Here is the call graph for this function:

Here is the caller graph for this function:

void CCCC_Xml_Stream::Separate_Module_Link ( CCCC_Module module_ptr)
private
void CCCC_Xml_Stream::Separate_Modules ( )
private

Definition at line 643 of file cccc_xml.cc.

644 {
645  // this function generates a separate HTML report for each non-trivial
646  // module in the database
647 
649  while(mod_ptr!=NULL)
650  {
651  int trivial_module=mod_ptr->is_trivial();
652  if(trivial_module==FALSE)
653  {
654  string info="Detailed report on module " + mod_ptr->key();
655  string filename=outdir;
656  filename+="/";
657  filename+=mod_ptr->key()+".xml";
658  CCCC_Xml_Stream module_xml_str(filename,info.c_str());
659 
660  module_xml_str.Module_Summary(mod_ptr);
661 
662  module_xml_str.fstr
664  << endl;
665  module_xml_str.Module_Detail(mod_ptr);
666  module_xml_str.fstr
668  << endl;
669 
670  module_xml_str.fstr
672  << endl;
673  module_xml_str.Procedural_Detail(mod_ptr);
674  module_xml_str.fstr
676  << endl;
677 
678  module_xml_str.fstr
680  << endl;
681  module_xml_str.Structural_Detail(mod_ptr);
682  module_xml_str.fstr
684  << endl;
685 
686  }
687  else
688  {
689 #if 0
690  cerr << mod_ptr->module_type << " " << mod_ptr->key()
691  << " is trivial" << endl;
692 #endif
693  }
694  mod_ptr=prjptr->module_table.next_item();
695  }
696 }
static const string MODDET_NODE_NAME
Definition: cccc_xml.cc:70
CCCC_Table< CCCC_Module > module_table
Definition: cccc_prj.h:54
virtual string key() const
Definition: cccc_rec.cc:76
int is_trivial()
Definition: cccc_mod.cc:181
static const string XML_TAG_OPEN_END
Definition: cccc_xml.cc:56
void Module_Summary(CCCC_Module *module_ptr)
Definition: cccc_xml.cc:784
static const string XML_TAG_CLOSE_BEGIN
Definition: cccc_xml.cc:57
static const string STRUCTDET_NODE_NAME
Definition: cccc_xml.cc:74
static string outdir
Definition: cccc_xml.h:49
static const string XML_TAG_OPEN_BEGIN
Definition: cccc_xml.cc:55
string module_type
Definition: cccc_mod.h:48
T * first_item()
Definition: cccc_tbl.cc:118
T * next_item()
Definition: cccc_tbl.cc:124
static const string PROCDET_NODE_NAME
Definition: cccc_xml.cc:72
static CCCC_Project * prjptr
Definition: cccc_xml.h:50
static const string XML_TAG_CLOSE_END
Definition: cccc_xml.cc:58

Here is the call graph for this function:

void CCCC_Xml_Stream::Source_Listing ( )
private

Definition at line 831 of file cccc_xml.cc.

832 {
833 }
void CCCC_Xml_Stream::Structural_Detail ( )
private

Definition at line 448 of file cccc_xml.cc.

449 {
451  CCCC_Module* module_ptr=prjptr->module_table.first_item();
452  while(module_ptr!=NULL)
453  {
454  if(module_ptr->is_trivial()==FALSE)
455  {
456  Structural_Detail(module_ptr);
457  }
458  module_ptr=prjptr->module_table.next_item();
459  }
461 }
CCCC_Table< CCCC_Module > module_table
Definition: cccc_prj.h:54
int is_trivial()
Definition: cccc_mod.cc:181
static const string XML_TAG_OPEN_END
Definition: cccc_xml.cc:56
static const string XML_TAG_CLOSE_BEGIN
Definition: cccc_xml.cc:57
static const string STRUCTDET_NODE_NAME
Definition: cccc_xml.cc:74
static const string XML_TAG_OPEN_BEGIN
Definition: cccc_xml.cc:55
T * first_item()
Definition: cccc_tbl.cc:118
void Structural_Detail()
Definition: cccc_xml.cc:448
T * next_item()
Definition: cccc_tbl.cc:124
ofstream fstr
Definition: cccc_xml.h:47
static CCCC_Project * prjptr
Definition: cccc_xml.h:50
static const string XML_TAG_CLOSE_END
Definition: cccc_xml.cc:58

Here is the call graph for this function:

void CCCC_Xml_Stream::Structural_Detail ( CCCC_Module module_ptr)
private

Definition at line 775 of file cccc_xml.cc.

776 {
778  Put_Label_Node(NAME_NODE_NAME,module_ptr->name(nlSIMPLE).c_str(), 0, "","");
782 }
void Put_Structural_Details_Node(CCCC_Module *mod, CCCC_Project *prj, int mask, UserelNameLevel nl)
Definition: cccc_xml.cc:383
static const string XML_TAG_OPEN_END
Definition: cccc_xml.cc:56
static const string XML_TAG_CLOSE_BEGIN
Definition: cccc_xml.cc:57
static const string XML_TAG_OPEN_BEGIN
Definition: cccc_xml.cc:55
void Put_Label_Node(string nodeTag, string label, int width=0, string ref_name="", string ref_href="", CCCC_Record *rec_ptr=0)
Definition: cccc_xml.cc:507
static const string MODULE_NODE_NAME
Definition: cccc_xml.cc:79
static const string NAME_NODE_NAME
Definition: cccc_xml.cc:78
string name(int name_level) const
Definition: cccc_mod.cc:35
ofstream fstr
Definition: cccc_xml.h:47
static CCCC_Project * prjptr
Definition: cccc_xml.h:50
static const string XML_TAG_CLOSE_END
Definition: cccc_xml.cc:58

Here is the call graph for this function:

void CCCC_Xml_Stream::Structural_Summary ( )
private

Definition at line 340 of file cccc_xml.cc.

341 {
343 
344  CCCC_Module* module_ptr=prjptr->module_table.first_item();
345  while(module_ptr!=NULL)
346  {
347  if(module_ptr->is_trivial()==FALSE)
348  {
350  Put_Label_Node(NAME_NODE_NAME,module_ptr->name(nlSIMPLE).c_str(),0,"","");
351 
352  int fov=module_ptr->get_count("FOv");
353  int foc=module_ptr->get_count("FOc");
354  int fo=module_ptr->get_count("FO");
355 
356  int fiv=module_ptr->get_count("FIv");
357  int fic=module_ptr->get_count("FIc");
358  int fi=module_ptr->get_count("FI");
359 
360  int if4v=module_ptr->get_count("IF4v");
361  int if4c=module_ptr->get_count("IF4c");
362  int if4=module_ptr->get_count("IF4");
363 
364  // the last two arguments here turn on links to enable jumping between
365  // the summary and detail cells for the same module
375 
377  }
378  module_ptr=prjptr->module_table.next_item();
379  }
381 }
CCCC_Table< CCCC_Module > module_table
Definition: cccc_prj.h:54
int is_trivial()
Definition: cccc_mod.cc:181
static const string XML_TAG_OPEN_END
Definition: cccc_xml.cc:56
static const string XML_TAG_CLOSE_BEGIN
Definition: cccc_xml.cc:57
static const string XML_TAG_OPEN_BEGIN
Definition: cccc_xml.cc:55
void Put_Label_Node(string nodeTag, string label, int width=0, string ref_name="", string ref_href="", CCCC_Record *rec_ptr=0)
Definition: cccc_xml.cc:507
static const string FI_NODE_NAME
Definition: cccc_xml.cc:118
virtual int get_count(const char *count_tag)
Definition: cccc_mod.cc:64
T * first_item()
Definition: cccc_tbl.cc:118
static const string FO_NODE_NAME
Definition: cccc_xml.cc:115
static const string STRUCTSUM_NODE_NAME
Definition: cccc_xml.cc:73
T * next_item()
Definition: cccc_tbl.cc:124
static const string MODULE_NODE_NAME
Definition: cccc_xml.cc:79
static const string FIV_NODE_NAME
Definition: cccc_xml.cc:119
static const string NAME_NODE_NAME
Definition: cccc_xml.cc:78
string name(int name_level) const
Definition: cccc_mod.cc:35
static const string FIC_NODE_NAME
Definition: cccc_xml.cc:120
static const string IF4CON_NODE_NAME
Definition: cccc_xml.cc:112
static const string FOC_NODE_NAME
Definition: cccc_xml.cc:117
ofstream fstr
Definition: cccc_xml.h:47
static const string FOV_NODE_NAME
Definition: cccc_xml.cc:116
static const string IF4_NODE_NAME
Definition: cccc_xml.cc:106
void Put_Metric_Node(string nodeTag, const CCCC_Metric &metric)
Definition: cccc_xml.cc:544
static CCCC_Project * prjptr
Definition: cccc_xml.h:50
static const string XML_TAG_CLOSE_END
Definition: cccc_xml.cc:58
static const string IF4VIS_NODE_NAME
Definition: cccc_xml.cc:109

Here is the call graph for this function:

void CCCC_Xml_Stream::Timestamp ( )
private

Definition at line 229 of file cccc_xml.cc.

230 {
231  time_t generationTime=time(NULL);
233  << ctime(&generationTime)
235  << endl;
236 }
static const string XML_TAG_OPEN_END
Definition: cccc_xml.cc:56
static const string XML_TAG_CLOSE_BEGIN
Definition: cccc_xml.cc:57
static const string TIMESTAMP_NODE_NAME
Definition: cccc_xml.cc:67
static const string XML_TAG_OPEN_BEGIN
Definition: cccc_xml.cc:55
ofstream fstr
Definition: cccc_xml.h:47
static const string XML_TAG_CLOSE_END
Definition: cccc_xml.cc:58

Here is the caller graph for this function:

Friends And Related Function Documentation

CCCC_Xml_Stream& operator<< ( CCCC_Xml_Stream os,
const string &  stg 
)
friend

Definition at line 615 of file cccc_xml.cc.

616 {
617  // initialise a character pointer to the start of the string's buffer
618  const char *cptr=stg.c_str();
619  while(*cptr!='\000') {
620  char c=*cptr;
621 
622  // the purpose of this is to filter out the characters which
623  // must be escaped in HTML
624  switch(c) {
625  case '>': os.fstr << "&gt;" ; break;
626  case '<': os.fstr << "&lt;" ; break;
627  case '&': os.fstr << "&amp;"; break;
628  default : os.fstr << c;
629  }
630  cptr++;
631  }
632  return os;
633 }
ofstream fstr
Definition: cccc_xml.h:47
CCCC_Xml_Stream& operator<< ( CCCC_Xml_Stream os,
const CCCC_Metric mtc 
)
friend

Definition at line 635 of file cccc_xml.cc.

636 {
637  // by writing to the underlying ostream object, we avoid the escape
638  // functionality
639  os.fstr << ltrim(mtc.value_string()) ;
640  return os;
641 }
static string ltrim(string value)
Definition: cccc_xml.cc:136
string value_string() const
Definition: cccc_met.cc:116
ofstream fstr
Definition: cccc_xml.h:47

Member Data Documentation

ofstream CCCC_Xml_Stream::fstr
private

Definition at line 47 of file cccc_xml.h.

string CCCC_Xml_Stream::libdir
staticprivate

Definition at line 48 of file cccc_xml.h.

string CCCC_Xml_Stream::outdir
staticprivate

Definition at line 49 of file cccc_xml.h.

CCCC_Project * CCCC_Xml_Stream::prjptr
staticprivate

Definition at line 50 of file cccc_xml.h.


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