CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
CgiReader Class Reference

#include <CgiReader.h>

Public Member Functions

 CgiReader (xgi::Input *the_in)
 
std::string read_cookie (std::string name)
 
void read_form (std::multimap< std::string, std::string > &form_info)
 
 ~CgiReader ()
 

Protected Attributes

xgi::Inputin
 
xgi::Outputout
 
std::string url
 

Detailed Description

Definition at line 17 of file CgiReader.h.

Constructor & Destructor Documentation

CgiReader::CgiReader ( xgi::Input the_in)
inline

Definition at line 28 of file CgiReader.h.

References in.

29  {
30  in = the_in;
31  }
xgi::Input * in
Definition: CgiReader.h:23
CgiReader::~CgiReader ( )
inline

Definition at line 33 of file CgiReader.h.

33 {}

Member Function Documentation

std::string CgiReader::read_cookie ( std::string  name)

Definition at line 28 of file CgiReader.cc.

References web.browse_db::env, in, matplotRender::reader, and relativeConstraints::value.

29 {
30  cgicc::Cgicc reader(in);
31  std::string value;
32 
33  const cgicc::CgiEnvironment& env = reader.getEnvironment();
34 
35  cgicc::const_cookie_iterator it;
36  for (it = env.getCookieList().begin();
37  it != env.getCookieList().end();
38  it ++)
39  {
40  if (name == it->getName())
41  {
42  value = it->getValue();
43  }
44  }
45  return value;
46 }
xgi::Input * in
Definition: CgiReader.h:23
void CgiReader::read_form ( std::multimap< std::string, std::string > &  form_info)

Definition at line 6 of file CgiReader.cc.

References python.tagInventory::entries, i, in, mergeVDriftHistosByStation::name, matplotRender::reader, and relativeConstraints::value.

Referenced by WebInterface::Configure(), WebInterface::ContentsOpen(), WebInterface::DrawGif(), SiStripWebInterface::handleAnalyserRequest(), SiPixelWebInterface::handleEDARequest(), WebInterface::handleStandardRequest(), and WebInterface::Open().

7 {
8  cgicc::Cgicc reader(in);
9 
10  std::vector<cgicc::FormEntry> entries = reader.getElements();
11 
12  // std::cout << "Trying to read a form of " << entries.size() << " elements!" << std::endl;
13 
14  form_info.clear();
15 
16  for (unsigned int i = 0; i < entries.size(); i++)
17  {
18  std::string name = entries[i].getName();
19  std::string value = entries[i].getValue();
20 
21  // std::cout << "Read " << name << " = " << value << std::endl;
22 
23  std::pair<std::string, std::string> map_entry(name, value);
24  form_info.insert(map_entry);
25  }
26 }
int i
Definition: DBlmapReader.cc:9
xgi::Input * in
Definition: CgiReader.h:23

Member Data Documentation

xgi::Input* CgiReader::in
protected

Definition at line 23 of file CgiReader.h.

Referenced by CgiReader(), read_cookie(), and read_form().

xgi::Output* CgiReader::out
protected

Definition at line 24 of file CgiReader.h.

Referenced by ModelTools.ModelBuilder::doModelConfigs().

std::string CgiReader::url
protected

Definition at line 21 of file CgiReader.h.