CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
WebPage.cc
Go to the documentation of this file.
2 
3 WebPage::WebPage(std::string the_url)
4 {
5  url = the_url;
6 }
7 
8 void WebPage::add(std::string name, WebElement * element_p)
9 {
10  element_map[name] = element_p;
11 }
12 
13 void WebPage::remove(const std::string name)
14 {
15  element_map.erase(name);
16 }
17 
19 {
20  element_map.clear();
21 }
22 
23 
24 /************************************************/
25 // Print out the web page elements
26 
28 {
29  std::map<std::string, WebElement *>::iterator it;
30 
31  *out << cgicc::body().set("onload", "fillDisplayList()") << std::endl;
32 
33  for (it = element_map.begin(); it != element_map.end(); it++)
34  {
35  it->second->printHTML(out);
36  }
37 
38  *out << cgicc::body() << std::endl;
39 }
std::map< std::string, WebElement * > element_map
Definition: WebPage.h:15
WebPage(std::string the_url)
Definition: WebPage.cc:3
void add(std::string, WebElement *)
Definition: WebPage.cc:8
std::string url
Definition: WebPage.h:14
void remove(std::string)
Definition: WebPage.cc:13
tuple out
Definition: dbtoconf.py:99
void clear()
Definition: WebPage.cc:18
#define Output(cl)
Definition: vmac.h:193
void printHTML(xgi::Output *out)
Definition: WebPage.cc:27