Main Page | Compound List | Compound Members

cgixx::cgi Class Reference

#include <cgi.h>

List of all members.

Public Types

typedef std::vector< std::string > identifierlist

Public Member Functions

 cgi ()
 ~cgi ()
const std::string & libver ()
 Get the cgixx library version string.

unsigned count (const std::string &id) const
 Get count of a variable.

bool exists (const std::string &id)
 Check if a variable exists.

bool get (const std::string &id, std::string &value)
 Get next available value of a variable.

void getvariablelist (identifierlist &idlist) const
 Get list of variable identifiers.

unsigned countcookie (const std::string &id) const
 Get count of a cookie.

bool cookieexists (const std::string &id)
 Check if a cookie exists.

bool getcookie (const std::string &id, std::string &value)
 Get next available value of a cookie.

void getcookielist (identifierlist &idlist) const
 Get list of cookie identifiers.

bool getheader (headers hid, std::string &copy) const
 Get the specified header.

methods getmethod () const
 Get the request method.


Detailed Description

The cgi class is used to process CGI requests. cgi will process all server set environment variables and the standard input when applicable to extract CGI variables and cookies, and convert values to text.

Author:
Isaac W. Foraker


Constructor & Destructor Documentation

cgixx::cgi::cgi  ) 
 

Construct an instance of cgi.

cgixx::cgi::~cgi  ) 
 

Destruct *this instance of cgi.


Member Function Documentation

bool cgixx::cgi::cookieexists const std::string &  id  ) 
 

Check if a cookie exists.

Check whether the specified cookie exists. This result is affected by calls to getcookie.

Parameters:
id Identifier of cookie.
Returns:
true if cookie exists;

false if cookie does not exist.

unsigned cgixx::cgi::count const std::string &  id  )  const
 

Get count of a variable.

Get the count of values for the CGI variable with the specified id. This count is decremented with each call to get.

Parameters:
id Identifier of variable.
Returns:
Count of values for vairable.

unsigned cgixx::cgi::countcookie const std::string &  id  )  const
 

Get count of a cookie.

Get the count of values for the cookie with the specified id. This count is decremented with each call to getcookie.

Parameters:
id Identifier of cookie.
Returns:
Count of values for specified cookie.

bool cgixx::cgi::exists const std::string &  id  ) 
 

Check if a variable exists.

Check whether the specified variable exists. This result is affected by calls to get.

Parameters:
id Identifier of variable.
Returns:
true if variable exists;

false if variable does not exist.

bool cgixx::cgi::get const std::string &  id,
std::string &  value
 

Get next available value of a variable.

Get the next value of the CGI variable with the specified id. Once a value has been retrieved, that value is removed, and the next value, if any, is will be available on the next call to get.

Parameters:
id Identifier of CGI variable.
value Reference to string to receive value of variable.
Returns:
false on success; true when no more values are available.

bool cgixx::cgi::getcookie const std::string &  id,
std::string &  value
 

Get next available value of a cookie.

Get the next value of the cookie with the specified id. Once a cookie has been retrieved, that value is removed, and the next value, if any, is made available.

Parameters:
id Identifier of cookie.
value Reference to string to receive value of cookie.
Returns:
false on success; true when no more values are available.

void cgixx::cgi::getcookielist identifierlist &  idlist  )  const
 

Get list of cookie identifiers.

Get the list of cookie identifiers. If all values for a cookie are retrieved using get, the associated cookie identifier will not be returned by getcookielist.

Parameters:
idlist Reference to list to receive cookie IDs.
Returns:
nothing

bool cgixx::cgi::getheader headers  hid,
std::string &  copy
const
 

Get the specified header.

Copy the value of the specified variable into the specified string. If an invalud header is specified, getheader returns true.

Parameters:
hid The header identifier from the headers enumeration.
copy Reference to string to receive value of header.
Returns:
false on success;

true if an invalid header is specified.

methods cgixx::cgi::getmethod  )  const
 

Get the request method.

Get the method of the request in the form of an enumerated id.

Returns:
The method id, which must be a member of the methods enum.

void cgixx::cgi::getvariablelist identifierlist &  idlist  )  const
 

Get list of variable identifiers.

Get the list of variable identifiers. If all values for a variable are retrieved using get, the associated variable identifier will not be returned by getvariablelist.

Parameters:
idlist Reference to list to receive variable IDs.
Returns:
nothing

const std::string & cgixx::cgi::libver  ) 
 

Get the cgixx library version string.

Get the cgixx library version string.

Returns:
The cgixx version string.


The documentation for this class was generated from the following files:
Generated on Fri Feb 6 16:05:30 2004 for cgixx by doxygen 1.3.3