CMS 3D CMS Logo

CgiReader Class Reference

#include <DQM/TrackerCommon/interface/CgiReader.h>

List of all members.

Public Member Functions

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

Protected Attributes

xgi::Input * in
xgi::Input * in
xgi::Output * out
xgi::Output * out
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.

00029     {
00030       in  = the_in;
00031     }

CgiReader::~CgiReader (  )  [inline]

Definition at line 33 of file CgiReader.h.

00033 {}

CgiReader::CgiReader ( xgi::Input *  the_in  )  [inline]

Definition at line 28 of file CgiReader.h.

References in.

00029     {
00030       in  = the_in;
00031     }

CgiReader::~CgiReader (  )  [inline]

Definition at line 33 of file CgiReader.h.

00033 {}


Member Function Documentation

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

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

Definition at line 28 of file CgiReader.cc.

References in, it, and value.

00029 {
00030   cgicc::Cgicc reader(in);
00031   std::string value;
00032 
00033   const cgicc::CgiEnvironment& env = reader.getEnvironment();
00034 
00035   cgicc::const_cookie_iterator it;
00036   for (it = env.getCookieList().begin(); 
00037        it != env.getCookieList().end();
00038        it ++)
00039     {
00040       if (name == it->getName())
00041         {
00042           value = it->getValue();
00043         }
00044     }
00045   return value;
00046 }

void CgiReader::read_form ( std::multimap< std::string, std::string > &  form_info  ) 

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, name, and value.

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

00007 {
00008   cgicc::Cgicc reader(in);
00009 
00010   std::vector<cgicc::FormEntry> entries = reader.getElements();
00011 
00012   //  std::cout << "Trying to read a form of " << entries.size() << " elements!" << std::endl;
00013 
00014   form_info.clear();
00015 
00016   for (unsigned int i = 0; i < entries.size(); i++)
00017     {
00018       std::string name  = entries[i].getName();
00019       std::string value = entries[i].getValue();
00020 
00021       //      std::cout << "Read " << name << " = " << value << std::endl;
00022 
00023       std::pair<std::string, std::string> map_entry(name, value);
00024       form_info.insert(map_entry);
00025     }
00026 }


Member Data Documentation

xgi::Input* CgiReader::in [protected]

Definition at line 23 of file CgiReader.h.

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.

xgi::Output* CgiReader::out [protected]

Definition at line 24 of file CgiReader.h.

std::string CgiReader::url [protected]

Definition at line 21 of file CgiReader.h.


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:16:16 2009 for CMSSW by  doxygen 1.5.4