proj home

Files   Classes   Functions   Hierarchy  

modulestate Class Reference

The Continuous Integration model communicates the modules state through a traffic light analogy. More...

#include <modulereport.h>

Inheritance diagram for modulestate:
Collaboration diagram for modulestate:

List of all members.

Public Types

enum  color { red, amber, green }
 Fail, risk and success respectively. More...

Public Member Functions

 modulestate ()
 Default red.
stringc htmlimg (stringc &pathfront="") const
 Icon associated with state, relative to proj directory.
stringc statecolor () const
 Write the state as text.
stringc statestring () const
 Associated word with the colored state.

Public Attributes

color state
 Call update() before reading.


Detailed Description

The Continuous Integration model communicates the modules state through a traffic light analogy.

Definition at line 11 of file modulereport.h.


Member Enumeration Documentation

Fail, risk and success respectively.

Enumerator:
red 
amber 
green 

Definition at line 16 of file modulereport.h.

00016 { red, amber, green };


Constructor & Destructor Documentation

modulestate::modulestate (  ) 

Default red.

Definition at line 178 of file modulereport.cpp.

00179   : state(red)
00180 {
00181 }


Member Function Documentation

stringc modulestate::htmlimg ( stringc pathfront = ""  )  const

Icon associated with state, relative to proj directory.

Definition at line 166 of file modulereport.cpp.

References amber, green, red, and state.

Referenced by modulereport::update(), and modulereport::update01().

00167 {
00168   switch(state)
00169   {
00170     case green: return (" <img src=\""+pathfront+"documentation/images/success.gif\" alt=\""+pathfront+"documentation/images/success.gif\" />");
00171     case amber: return " <img src=\""+pathfront+"documentation/images/risk.gif\" alt=\""+pathfront+"documentation/images/risk.gif\" />";
00172     case red: return "<img src=\""+pathfront+"documentation/images/attention.png\" alt=\""+pathfront+"documentation/images/attention.png\" />";
00173   }
00174 
00175   return "";
00176 }

stringc modulestate::statecolor (  )  const

Write the state as text.

Definition at line 97 of file modulereport.cpp.

References amber, green, red, and state.

00098 {
00099   string str;
00100   switch(state)
00101   {
00102     case red: str="red"; break; 
00103     case amber: str="amber"; break; 
00104     case green: str="green"; break; 
00105   }
00106 
00107   return str;
00108 }

stringc modulestate::statestring (  )  const

Associated word with the colored state.

Definition at line 110 of file modulereport.cpp.

References amber, green, red, and state.

Referenced by modulereport::summary01(), and modulereport::update01().

00111 {
00112   string str;
00113   switch(state)
00114   {
00115     case red: str="Fail"; break; 
00116     case amber: str="Compiled"; break; 
00117     case green: str="Success"; break; 
00118   }
00119 
00120   return str;
00121 }


Member Data Documentation

Call update() before reading.

Definition at line 18 of file modulereport.h.

Referenced by htmlimg(), modulereport::statecalc(), statecolor(), and statestring().


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

Generated on Fri Mar 4 00:50:07 2011 for Chelton Evans Source by  doxygen 1.5.8