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 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.

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

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.

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

Definition at line 65 of file DDHtmlFormatter.cc.

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

66 {
67  pre();
68  os_ << "</body></html>" << endl;
69  return *this;
70 }
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
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().

41 {
42  pre();
43  os_ << "<html>\n<head>\n<title>" << title << "</title>" << endl;
44  os_ << "<link rel=\"stylesheet\" type=\"text/css\" href=\"" << style << "\">" << endl;
45  //os_ << "</head>\n<body>" << endl;
46  return *this;
47 }
Definition: style.py:1
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 49 of file DDHtmlFormatter.cc.

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

50 {
51  pre();
52  os_ << lnk(url,txt,target) << endl;
53  return *this;
54 }
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 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().