CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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

◆ ns_type

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

Definition at line 19 of file DDHtmlFormatter.h.

Constructor & Destructor Documentation

◆ DDHtmlFormatter() [1/2]

DDHtmlFormatter::DDHtmlFormatter ( )
inlineexplicit

Definition at line 21 of file DDHtmlFormatter.h.

21 {}

◆ DDHtmlFormatter() [2/2]

DDHtmlFormatter::DDHtmlFormatter ( const DDHtmlFormatter f)
inline

Definition at line 22 of file DDHtmlFormatter.h.

22 : os_(f.os_.str()) {}
double f[11][100]
std::stringstream os_

Member Function Documentation

◆ br()

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_

◆ color()

DDHtmlFormatter DDHtmlFormatter::color ( int  red,
int  green,
int  blue 
)
inline

Definition at line 99 of file DDHtmlFormatter.h.

99 { return *this; };

◆ footer()

DDHtmlFormatter DDHtmlFormatter::footer ( )

Definition at line 62 of file DDHtmlFormatter.cc.

Referenced by DDHtmlLpDetails::details().

62  {
63  pre();
64  os_ << "</body></html>" << endl;
65  return *this;
66 }
std::stringstream os_

◆ h1()

DDHtmlFormatter DDHtmlFormatter::h1 ( const std::string &  content)
inline

Definition at line 54 of file DDHtmlFormatter.h.

References Skims_PA_cff::content, os_, and pre().

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

◆ h2()

DDHtmlFormatter DDHtmlFormatter::h2 ( const std::string &  content)
inline

Definition at line 59 of file DDHtmlFormatter.h.

References Skims_PA_cff::content, os_, and pre().

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

59  {
60  pre();
61  os_ << "<h2>" << content << "</h2>" << std::endl;
62  return *this;
63  }
std::stringstream os_

◆ h3()

DDHtmlFormatter DDHtmlFormatter::h3 ( const std::string &  content)
inline

Definition at line 64 of file DDHtmlFormatter.h.

References Skims_PA_cff::content, os_, and pre().

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

64  {
65  pre();
66  os_ << "<h3>" << content << "</h3>" << std::endl;
67  return *this;
68  }
std::stringstream os_

◆ header()

DDHtmlFormatter DDHtmlFormatter::header ( const std::string &  text,
const std::string &  style = "../../style.css" 
)

Definition at line 40 of file DDHtmlFormatter.cc.

References runGCPTkAlMap::title.

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

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_

◆ li()

DDHtmlFormatter DDHtmlFormatter::li ( const std::string &  content)
inline

Definition at line 43 of file DDHtmlFormatter.h.

References Skims_PA_cff::content, os_, and pre().

43  {
44  pre();
45  os_ << "<li>" << content << "</li>" << std::endl;
46  return *this;
47  }
std::stringstream os_

◆ link()

DDHtmlFormatter DDHtmlFormatter::link ( const std::string &  url,
const std::string &  text,
const std::string &  target = "_self" 
)

Definition at line 48 of file DDHtmlFormatter.cc.

References filterCSVwithJSON::target, and relmon_authenticated_wget::url.

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

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_

◆ lnk()

string DDHtmlFormatter::lnk ( const std::string &  url,
const std::string &  text,
const std::string &  target = "_self" 
)

◆ operator=()

DDHtmlFormatter& DDHtmlFormatter::operator= ( const DDHtmlFormatter )
delete

◆ p()

DDHtmlFormatter DDHtmlFormatter::p ( const std::string &  content)
inline

Definition at line 32 of file DDHtmlFormatter.h.

References Skims_PA_cff::content, os_, and pre().

Referenced by DDHtmlMaDetails::details(), 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_

◆ pre()

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_

◆ table()

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_

◆ tableEnd()

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_

◆ td()

DDHtmlFormatter DDHtmlFormatter::td ( const std::string &  content)
inline

Definition at line 93 of file DDHtmlFormatter.h.

References Skims_PA_cff::content, 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_

◆ tr()

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_

◆ trEnd()

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_

◆ ul()

DDHtmlFormatter DDHtmlFormatter::ul ( )
inline

Definition at line 38 of file DDHtmlFormatter.h.

References os_, and pre().

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

◆ ulEnd()

DDHtmlFormatter DDHtmlFormatter::ulEnd ( )
inline

Definition at line 48 of file DDHtmlFormatter.h.

References os_, and pre().

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

Member Data Documentation

◆ os_

std::stringstream DDHtmlFormatter::os_
mutable

Definition at line 104 of file DDHtmlFormatter.h.

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