proj home

Files   Classes   Functions   Hierarchy  

cireport Class Reference

Generate html continuous integration report. More...

#include <cireport.h>

Collaboration diagram for cireport:

List of all members.

Public Member Functions

 cireport ()
 Constructor.
void reset ()
 Constructor.
stringc summaryblock1 ()
 Local references.
stringc summaryblock2 ()
 References in proj/report.html.
stringc summaryblock3 ()
 References in proj/doc.html.
stringc report01 ()
void test01 ()
 Output summaryblock1.
int reportfile_update ()
 Updates the html report file.
int docfile_update ()
 Updates the html doc file.

Public Attributes

modulelist ml
 List of modules.
vector< modulereportmr
 List of reports associated with ml[].

Static Public Attributes

static string reportfile = "report.html"
 html written to file ${projdirectory}/<reportfile>
static string docfile = "doc.html"
 html written to file ${projdirectory}/<docfile>


Detailed Description

Generate html continuous integration report.

Document view architecture. Looks for module's compiler and unit test reports and updates the html page.

Run in proj/ directory.

Definition at line 19 of file cireport.h.


Constructor & Destructor Documentation

cireport::cireport (  ) 

Constructor.

Definition at line 83 of file cireport.cpp.

References reset().

00084 {
00085   reset();
00086 }


Member Function Documentation

int cireport::docfile_update (  ) 

Updates the html doc file.

Definition at line 134 of file cireport.cpp.

References docfile, html::insert(), and summaryblock3().

Referenced by cireporttest::test03().

00135 {
00136   int res=0;
00137 
00138   if (html::insert
00139   (
00140     docfile,  
00141     "<!--B01_UPDATE_REPORT_BEGIN-->",
00142     "<!--B01_UPDATE_REPORT_END-->",
00143     summaryblock3()
00144   ) != 0)
00145     res=1;
00146 
00147   return res;
00148 }

stringc cireport::report01 (  ) 

Definition at line 51 of file cireport.cpp.

References modulelist::doc, ml, modulelist::modules, mr, and stringtag().

Referenced by reportfile_update(), and cireporttest::test01().

00052 {
00053   string s0;
00054 
00055   for (uint i=0; i<ml.doc.size(); ++i)
00056   {
00057     s0 += "<a id=\"";
00058     s0 += ml.modules[i];
00059     s0 += "\"></a>\n";
00060     s0 += "<h3>";
00061     s0 += "<a class=\"reflocal\" href=\"";
00062     s0 += (ml.modules[i]+"/"+ml.doc[i]);
00063     s0 += "\">";
00064     s0 += ml.modules[i];
00065     s0 += mr[i].htmlimg();
00066     s0 += "</a>\n";
00067     s0 += "</h3>\n";
00068 
00069     s0 += mr[i].summary01();
00070 
00071     s0 += mr[i].compilerhtmldetailed();
00072 
00073     s0 += mr[i].unittestshtmldetailed();
00074 
00075   }
00076 
00077   string s1(stringtag(s0,"div"));
00078 
00079   return s1;
00080 }

int cireport::reportfile_update (  ) 

Updates the html report file.

Definition at line 108 of file cireport.cpp.

References html::insert(), report01(), reportfile, and summaryblock1().

Referenced by cireporttest::test02(), and cireporttest::test03().

00109 {
00110   int res=0;
00111 
00112   if (html::insert
00113   (
00114     reportfile,  
00115     "<!--B01_UPDATE_REPORT_BEGIN-->",
00116     "<!--B01_UPDATE_REPORT_END-->",
00117     summaryblock1()
00118   ) != 0)
00119     res=1;
00120 
00121 
00122   if (html::insert
00123   (
00124     reportfile,  
00125     "<!--B02_UPDATE_REPORT_BEGIN-->",
00126     "<!--B02_UPDATE_REPORT_END-->",
00127     report01()
00128   ) != 0)
00129     res=1;
00130 
00131   return res;
00132 }

void cireport::reset (  ) 

Constructor.

Definition at line 88 of file cireport.cpp.

References modulelist::buildlist(), modulereport::filepathfront, ml, modulelist::modules, and mr.

Referenced by cireport().

00089 {
00090   ml.buildlist();
00091 
00092   // Creating and setting up the modulereport's.
00093   for (uint i=0; i<ml.modules.size(); ++i)
00094   {
00095     modulereport mri;
00096     mri.filepathfront=ml.modules[i]+"/";
00097     mr.push_back(mri);
00098   }
00099 
00100   // Read and calculate the module's state
00101   for (uint i=0; i<ml.modules.size(); ++i)
00102   {
00103     mr[i].reset();
00104     mr[i].statecalc();
00105   }
00106 }

stringc cireport::summaryblock1 (  ) 

Local references.

Definition at line 31 of file cireport.cpp.

References modulelist::doc, ml, modulelist::modules, and mr.

Referenced by reportfile_update(), and cireporttest::test01().

00032 {
00033   string s0;
00034   s0 += "<p>\n";
00035 
00036   for (uint i=0; i<ml.doc.size(); ++i)
00037   {
00038     s0 += "<a class=\"reflocal2\" href=\"#";
00039     s0 += ml.modules[i];
00040     s0 += ("\">"+ml.modules[i]);
00041     s0 += mr[i].htmlimg();
00042     s0 += "</a> &nbsp;";
00043     s0 += "\n";
00044   }
00045 
00046   s0 += "</p>\n";
00047 
00048   return s0;
00049 }

stringc cireport::summaryblock2 (  ) 

References in proj/report.html.

Definition at line 13 of file cireport.cpp.

References modulelist::doc, ml, modulelist::modules, and mr.

Referenced by cireporttest::test01().

00014 {
00015   string s0;
00016   s0 += "<p>\n";
00017 
00018   for (uint i=0; i<ml.doc.size(); ++i)
00019   {
00020     s0 += "<a class=\"reflocal\" href=\"";
00021     s0 += (ml.modules[i]+"/"+ml.doc[i]);
00022     s0 += ("\">"+ml.modules[i]);
00023     s0 += mr[i].htmlimg();
00024     s0 += "</a> &nbsp;";
00025     s0 += "\n";
00026   }
00027 
00028   return s0;
00029 }

stringc cireport::summaryblock3 (  ) 

References in proj/doc.html.

Definition at line 150 of file cireport.cpp.

References modulelist::doc, ml, modulelist::modules, and mr.

Referenced by docfile_update().

00151 {
00152   string s0;
00153   s0 += "<p>\n";
00154 
00155   for (uint i=0; i<ml.doc.size(); ++i)
00156   {
00157     s0 += "<a class=\"reflocal\" href=\"";
00158     s0 += ml.modules[i];
00159     s0 += "/";
00160     s0 += ml.doc[i];
00161     s0 += ("\">"+ml.modules[i]);
00162     s0 += mr[i].htmlimg();
00163     s0 += "</a> &nbsp;";
00164     s0 += "\n";
00165   }
00166 
00167   s0 += "</p>\n";
00168 
00169   return s0;
00170 }

void cireport::test01 (  ) 

Output summaryblock1.


Member Data Documentation

string cireport::docfile = "doc.html" [static]

html written to file ${projdirectory}/<docfile>

Definition at line 26 of file cireport.h.

Referenced by docfile_update().

List of modules.

Definition at line 29 of file cireport.h.

Referenced by report01(), reset(), summaryblock1(), summaryblock2(), and summaryblock3().

List of reports associated with ml[].

Definition at line 32 of file cireport.h.

Referenced by report01(), reset(), summaryblock1(), summaryblock2(), and summaryblock3().

string cireport::reportfile = "report.html" [static]

html written to file ${projdirectory}/<reportfile>

Definition at line 24 of file cireport.h.

Referenced by reportfile_update().


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

Generated on Fri Mar 4 00:49:52 2011 for Chelton Evans Source by  doxygen 1.5.8