CMS 3D CMS Logo

Public Types | Public Member Functions | Public Attributes | Private Member Functions

DDHtmlFormatter Class Reference

#include <DDHtmlFormatter.h>

List of all members.

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 ( ) [inline, explicit]

Definition at line 23 of file DDHtmlFormatter.h.

{ }
DDHtmlFormatter::DDHtmlFormatter ( const DDHtmlFormatter f) [inline]

Definition at line 24 of file DDHtmlFormatter.h.

: os_(f.os_.str()) { }

Member Function Documentation

DDHtmlFormatter DDHtmlFormatter::br ( ) [inline]

Definition at line 29 of file DDHtmlFormatter.h.

References os_, and pre().

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

Definition at line 49 of file DDHtmlFormatter.h.

{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(), DDNsGenerator::doit(), and DDFrameGenerator::doit().

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

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

Definition at line 37 of file DDHtmlFormatter.h.

References os_, and pre().

Referenced by DDNsGenerator::doit().

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

Definition at line 38 of file DDHtmlFormatter.h.

References os_, and pre().

Referenced by DDHtmlSpDetails::details().

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

Definition at line 33 of file DDHtmlFormatter.h.

References os_, and pre().

Referenced by DDNsGenerator::doit().

{ pre(); os_ << "<li>" << content << "</li>" << std::endl; return *this;}
DDHtmlFormatter DDHtmlFormatter::link ( const std::string &  url,
const std::string &  text,
const std::string &  target = "_self" 
)
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 query::result, AlCaHLTBitMon_QueryRunRegistry::string, filterCSVwithJSON::target, and relmon_authenticated_wget::url.

Referenced by dd_html_menu(), and DDNsGenerator::doit().

{
   string result;
   result = string("<a href=\"") + url;
   result += string("\" target=\"") + target;
   result += string("\">")+ txt + string("</a>");
   return result; 
}
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(), and DDNsGenerator::doit().

{ pre(); os_ << "<p>" << std::endl << content << std::endl << "</p>" << std::endl; return *this; }
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().

{ os_.str(""); }
DDHtmlFormatter DDHtmlFormatter::table ( int  border = 0) [inline]

Definition at line 43 of file DDHtmlFormatter.h.

References os_, and pre().

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

Definition at line 44 of file DDHtmlFormatter.h.

References os_, and pre().

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

Definition at line 47 of file DDHtmlFormatter.h.

References os_, and pre().

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

Definition at line 45 of file DDHtmlFormatter.h.

References os_, and pre().

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

Definition at line 46 of file DDHtmlFormatter.h.

References os_, and pre().

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

Definition at line 32 of file DDHtmlFormatter.h.

References os_, and pre().

Referenced by DDNsGenerator::doit().

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

Definition at line 34 of file DDHtmlFormatter.h.

References os_, and pre().

Referenced by DDNsGenerator::doit().

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

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