CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/DQM/TrackerCommon/src/WebPage.cc

Go to the documentation of this file.
00001 #include "DQM/TrackerCommon/interface/WebPage.h"
00002 
00003 WebPage::WebPage(std::string the_url)
00004 {
00005   url = the_url;
00006 }
00007 
00008 void WebPage::add(std::string name, WebElement * element_p)
00009 {
00010   element_map[name] = element_p;
00011 }
00012 
00013 void WebPage::remove(const std::string name)
00014 {
00015   element_map.erase(name);
00016 }
00017 
00018 void WebPage::clear()
00019 {
00020   element_map.clear();
00021 }
00022 
00023 
00024 /************************************************/
00025 // Print out the web page elements
00026 
00027 void WebPage::printHTML(xgi::Output * out)
00028 {
00029   std::map<std::string, WebElement *>::iterator it;
00030 
00031    *out << cgicc::body().set("onload", "fillDisplayList()") << std::endl;
00032 
00033   for (it = element_map.begin(); it != element_map.end(); it++)
00034     {
00035       it->second->printHTML(out);
00036     }
00037 
00038   *out << cgicc::body() << std::endl;
00039 }