CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Public Attributes
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")
 
DDHtmlFormatteroperator= (const DDHtmlFormatter &)=delete
 
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_
 

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 19 of file DDHtmlFormatter.h.

Constructor & Destructor Documentation

DDHtmlFormatter::DDHtmlFormatter ( )
inlineexplicit

Definition at line 21 of file DDHtmlFormatter.h.

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

Definition at line 22 of file DDHtmlFormatter.h.

References footer(), header(), AlCaHLTBitMon_QueryRunRegistry::string, and runonSM::text.

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

Member Function Documentation

DDHtmlFormatter DDHtmlFormatter::br ( )
inline

Definition at line 27 of file DDHtmlFormatter.h.

References os_, and pre().

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

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

Definition at line 99 of file DDHtmlFormatter.h.

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

Definition at line 62 of file DDHtmlFormatter.cc.

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

62  {
63  pre();
64  os_ << "</body></html>" << endl;
65  return *this;
66 }
std::stringstream os_
DDHtmlFormatter DDHtmlFormatter::h1 ( const std::string &  content)
inline

Definition at line 54 of file DDHtmlFormatter.h.

References os_, and pre().

Referenced by dd_html_menu().

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

Definition at line 59 of file DDHtmlFormatter.h.

References os_, and pre().

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

59  {
60  pre();
61  os_ << "<h2>" << content << "</h2>" << std::endl;
62  return *this;
63  }
std::stringstream os_
DDHtmlFormatter DDHtmlFormatter::h3 ( const std::string &  content)
inline
DDHtmlFormatter DDHtmlFormatter::header ( const std::string &  text,
const std::string &  style = "../../style.css" 
)

Definition at line 40 of file DDHtmlFormatter.cc.

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

40  {
41  pre();
42  os_ << "<html>\n<head>\n<title>" << title << "</title>" << endl;
43  os_ << "<link rel=\"stylesheet\" type=\"text/css\" href=\"" << style << "\">" << endl;
44  //os_ << "</head>\n<body>" << endl;
45  return *this;
46 }
Definition: style.py:1
std::stringstream os_
DDHtmlFormatter DDHtmlFormatter::li ( const std::string &  content)
inline

Definition at line 43 of file DDHtmlFormatter.h.

References os_, and pre().

Referenced by DDNsGenerator::doit().

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

Definition at line 48 of file DDHtmlFormatter.cc.

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

48  {
49  pre();
50  os_ << lnk(url, txt, target) << endl;
51  return *this;
52 }
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" 
)
DDHtmlFormatter& DDHtmlFormatter::operator= ( const DDHtmlFormatter )
delete
DDHtmlFormatter DDHtmlFormatter::p ( const std::string &  content)
inline

Definition at line 32 of file DDHtmlFormatter.h.

References os_, and pre().

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

32  {
33  pre();
34  os_ << "<p>" << std::endl << content << std::endl << "</p>" << std::endl;
35  return *this;
36  }
std::stringstream os_
void DDHtmlFormatter::pre ( )
inline

Definition at line 101 of file DDHtmlFormatter.h.

References os_.

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

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

Definition at line 73 of file DDHtmlFormatter.h.

References os_, and pre().

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

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

Definition at line 78 of file DDHtmlFormatter.h.

References os_, and pre().

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

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

Definition at line 93 of file DDHtmlFormatter.h.

References os_, and pre().

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

93  {
94  pre();
95  os_ << " <td>" << content << std::endl << " </td>" << std::endl;
96  return *this;
97  }
std::stringstream os_
DDHtmlFormatter DDHtmlFormatter::tr ( )
inline

Definition at line 83 of file DDHtmlFormatter.h.

References os_, and pre().

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

83  {
84  pre();
85  os_ << " <tr>" << std::endl;
86  return *this;
87  }
std::stringstream os_
DDHtmlFormatter DDHtmlFormatter::trEnd ( )
inline

Definition at line 88 of file DDHtmlFormatter.h.

References os_, and pre().

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

88  {
89  pre();
90  os_ << " </tr>" << std::endl;
91  return *this;
92  }
std::stringstream os_
DDHtmlFormatter DDHtmlFormatter::ul ( )
inline

Definition at line 38 of file DDHtmlFormatter.h.

References os_, and pre().

Referenced by DDNsGenerator::doit().

38  {
39  pre();
40  os_ << "<ul>" << std::endl;
41  return *this;
42  }
std::stringstream os_
DDHtmlFormatter DDHtmlFormatter::ulEnd ( )
inline

Definition at line 48 of file DDHtmlFormatter.h.

References os_, and pre().

Referenced by DDNsGenerator::doit().

48  {
49  pre();
50  os_ << "</ul>" << std::endl;
51  return *this;
52  }
std::stringstream os_

Member Data Documentation

std::stringstream DDHtmlFormatter::os_
mutable

Definition at line 104 of file DDHtmlFormatter.h.

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