test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Public Attributes | Private Member Functions
DDHtmlFormatter Class Reference

#include <DDHtmlFormatter.h>

Public Types

typedef std::map< std::string,
std::set< std::string > > 
ns_type
 

Public Member Functions

DDHtmlFormatter br ()
 
DDHtmlFormatter color (int red, int green, int blue)
 
 DDHtmlFormatter ()
 
 DDHtmlFormatter (const DDHtmlFormatter &f)
 
DDHtmlFormatter footer ()
 
DDHtmlFormatter h1 (const std::string &content)
 
DDHtmlFormatter h2 (const std::string &content)
 
DDHtmlFormatter h3 (const std::string &content)
 
DDHtmlFormatter header (const std::string &text, const std::string &style="../../style.css")
 
DDHtmlFormatter li (const std::string &content)
 
DDHtmlFormatter link (const std::string &url, const std::string &text, const std::string &target="_self")
 
std::string lnk (const std::string &url, const std::string &text, const std::string &target="_self")
 
DDHtmlFormatter p (const std::string &content)
 
void pre ()
 
DDHtmlFormatter table (int border=0)
 
DDHtmlFormatter tableEnd ()
 
DDHtmlFormatter td (const std::string &content)
 
DDHtmlFormatter tr ()
 
DDHtmlFormatter trEnd ()
 
DDHtmlFormatter ul ()
 
DDHtmlFormatter ulEnd ()
 

Public Attributes

std::stringstream os_
 

Private Member Functions

DDHtmlFormatteroperator= (const DDHtmlFormatter &)
 

Detailed Description

Definition at line 17 of file DDHtmlFormatter.h.

Member Typedef Documentation

typedef std::map<std::string,std::set<std::string> > DDHtmlFormatter::ns_type

Definition at line 21 of file DDHtmlFormatter.h.

Constructor & Destructor Documentation

DDHtmlFormatter::DDHtmlFormatter ( )
inlineexplicit

Definition at line 23 of file DDHtmlFormatter.h.

23 { }
DDHtmlFormatter::DDHtmlFormatter ( const DDHtmlFormatter f)
inline

Definition at line 24 of file DDHtmlFormatter.h.

24 : os_(f.os_.str()) { }
std::stringstream os_

Member Function Documentation

DDHtmlFormatter DDHtmlFormatter::br ( )
inline

Definition at line 29 of file DDHtmlFormatter.h.

References os_, and pre().

Referenced by DDHtmlLpDetails::details(), and DDHtmlMaDetails::details().

29 { pre(); os_ << "<br>" << std::endl; return *this; }
std::stringstream os_
DDHtmlFormatter DDHtmlFormatter::color ( int  red,
int  green,
int  blue 
)
inline

Definition at line 49 of file DDHtmlFormatter.h.

Referenced by cuy.plotElement::__init__(), cuy.superimposeElement::__init__(), and cuy.graphElement::__init__().

49 {return *this;};
DDHtmlFormatter DDHtmlFormatter::footer ( )

Definition at line 53 of file DDHtmlFormatter.cc.

Referenced by dd_html_frameset(), dd_html_menu(), dd_html_menu_frameset(), DDHtmlLpDetails::details(), DDNsGenerator::doit(), and DDFrameGenerator::doit().

54 {
55  pre();
56  os_ << "</body></html>" << endl;
57  return *this;
58 }
std::stringstream os_
DDHtmlFormatter DDHtmlFormatter::h1 ( const std::string &  content)
inline

Definition at line 36 of file DDHtmlFormatter.h.

References os_, and pre().

Referenced by dd_html_menu().

36 { pre(); os_ << "<h1>" << content << "</h1>" << std::endl; return *this;}
std::stringstream os_
DDHtmlFormatter DDHtmlFormatter::h2 ( const std::string &  content)
inline

Definition at line 37 of file DDHtmlFormatter.h.

References os_, and pre().

Referenced by DDHtmlLpDetails::details(), DDHtmlMaDetails::details(), DDHtmlRoDetails::details(), and DDNsGenerator::doit().

37 { pre(); os_ << "<h2>" << content << "</h2>" << std::endl; return *this;}
std::stringstream os_
DDHtmlFormatter DDHtmlFormatter::h3 ( const std::string &  content)
inline

Definition at line 38 of file DDHtmlFormatter.h.

References os_, and pre().

Referenced by DDHtmlLpDetails::details(), DDHtmlMaDetails::details(), DDHtmlSoDetails::details(), DDHtmlRoDetails::details(), and DDHtmlSpDetails::details().

38 { pre(); os_ << "<h3>" << content << "</h3>" << std::endl; return *this;}
std::stringstream os_
DDHtmlFormatter DDHtmlFormatter::header ( const std::string &  text,
const std::string &  style = "../../style.css" 
)

Definition at line 28 of file DDHtmlFormatter.cc.

Referenced by dd_html_frameset(), dd_html_menu(), dd_html_menu_frameset(), DDHtmlLpDetails::details(), DDHtmlMaDetails::details(), DDHtmlSoDetails::details(), DDHtmlRoDetails::details(), DDHtmlSpDetails::details(), DDNsGenerator::doit(), and DDFrameGenerator::doit().

29 {
30  pre();
31  os_ << "<html>\n<head>\n<title>" << title << "</title>" << endl;
32  os_ << "<link rel=\"stylesheet\" type=\"text/css\" href=\"" << style << "\">" << endl;
33  //os_ << "</head>\n<body>" << endl;
34  return *this;
35 }
std::stringstream os_
DDHtmlFormatter DDHtmlFormatter::li ( const std::string &  content)
inline

Definition at line 33 of file DDHtmlFormatter.h.

References os_, and pre().

Referenced by DDNsGenerator::doit().

33 { pre(); os_ << "<li>" << content << "</li>" << std::endl; return *this;}
std::stringstream os_
DDHtmlFormatter DDHtmlFormatter::link ( const std::string &  url,
const std::string &  text,
const std::string &  target = "_self" 
)

Definition at line 37 of file DDHtmlFormatter.cc.

Referenced by DDHtmlLpDetails::details(), and DDHtmlMaDetails::details().

38 {
39  pre();
40  os_ << lnk(url,txt,target) << endl;
41  return *this;
42 }
std::string lnk(const std::string &url, const std::string &text, const std::string &target="_self")
std::stringstream os_
string DDHtmlFormatter::lnk ( const std::string &  url,
const std::string &  text,
const std::string &  target = "_self" 
)

Definition at line 44 of file DDHtmlFormatter.cc.

References mps_fire::result, AlCaHLTBitMon_QueryRunRegistry::string, filterCSVwithJSON::target, and relmon_authenticated_wget::url.

Referenced by dd_html_menu(), DDHtmlLpDetails::details(), DDHtmlMaDetails::details(), and DDNsGenerator::doit().

45 {
46  string result;
47  result = string("<a href=\"") + url;
48  result += string("\" target=\"") + target;
49  result += string("\">")+ txt + string("</a>");
50  return result;
51 }
tuple result
Definition: mps_fire.py:84
DDHtmlFormatter& DDHtmlFormatter::operator= ( const DDHtmlFormatter )
private
DDHtmlFormatter DDHtmlFormatter::p ( const std::string &  content)
inline

Definition at line 30 of file DDHtmlFormatter.h.

References os_, and pre().

Referenced by dd_html_menu(), DDHtmlMaDetails::details(), DDNsGenerator::doit(), and Electron.Electron::ptErr().

30 { pre(); os_ << "<p>" << std::endl << content << std::endl << "</p>" << std::endl; return *this; }
std::stringstream os_
void DDHtmlFormatter::pre ( )
inline

Definition at line 51 of file DDHtmlFormatter.h.

References os_.

Referenced by br(), h1(), h2(), h3(), li(), p(), table(), tableEnd(), td(), tr(), trEnd(), ul(), and ulEnd().

51 { os_.str(""); }
std::stringstream os_
DDHtmlFormatter DDHtmlFormatter::table ( int  border = 0)
inline

Definition at line 43 of file DDHtmlFormatter.h.

References os_, and pre().

Referenced by DDHtmlLpDetails::details(), and DDHtmlMaDetails::details().

43 { pre(); os_ << "<table border=\"" << border << "\">" << std::endl; return *this;}
std::stringstream os_
DDHtmlFormatter DDHtmlFormatter::tableEnd ( )
inline

Definition at line 44 of file DDHtmlFormatter.h.

References os_, and pre().

Referenced by DDHtmlLpDetails::details(), and DDHtmlMaDetails::details().

44 { pre(); os_ << "</table>" << std::endl; return *this;}
std::stringstream os_
DDHtmlFormatter DDHtmlFormatter::td ( const std::string &  content)
inline

Definition at line 47 of file DDHtmlFormatter.h.

References os_, and pre().

Referenced by DDHtmlLpDetails::details(), and DDHtmlMaDetails::details().

47 { pre(); os_ << " <td>" << content << std::endl << " </td>" << std::endl; return *this;}
std::stringstream os_
DDHtmlFormatter DDHtmlFormatter::tr ( )
inline

Definition at line 45 of file DDHtmlFormatter.h.

References os_, and pre().

Referenced by DDHtmlLpDetails::details(), and DDHtmlMaDetails::details().

45 { pre(); os_ << " <tr>" << std::endl; return *this;}
std::stringstream os_
DDHtmlFormatter DDHtmlFormatter::trEnd ( )
inline

Definition at line 46 of file DDHtmlFormatter.h.

References os_, and pre().

Referenced by DDHtmlLpDetails::details(), and DDHtmlMaDetails::details().

46 { pre(); os_ << " </tr>" << std::endl; return *this;}
std::stringstream os_
DDHtmlFormatter DDHtmlFormatter::ul ( )
inline

Definition at line 32 of file DDHtmlFormatter.h.

References os_, and pre().

Referenced by DDNsGenerator::doit().

32 { pre(); os_ << "<ul>" << std::endl; return *this;}
std::stringstream os_
DDHtmlFormatter DDHtmlFormatter::ulEnd ( )
inline

Definition at line 34 of file DDHtmlFormatter.h.

References os_, and pre().

Referenced by DDNsGenerator::doit().

34 { pre(); os_ << "</ul>" << std::endl; return *this;}
std::stringstream os_

Member Data Documentation

std::stringstream DDHtmlFormatter::os_
mutable

Definition at line 54 of file DDHtmlFormatter.h.

Referenced by br(), h1(), h2(), h3(), li(), operator<<(), p(), pre(), table(), tableEnd(), td(), tr(), trEnd(), ul(), and ulEnd().