GClasses

GClasses::GHttpParamParser Class Reference

A class for parsing the name/value pairs that follow the "?" in a URL. More...

#include <GHttp.h>

List of all members.

Public Member Functions

 GHttpParamParser (const char *szParams, bool scrub=true)
 szParams should be everything in the URL after the "?". If scrub is true, then the values will be scrubbed. That is, all characters not in {a-z;A-Z;0-9;!;@;#;$;-;+;*;/;(;);.;,;:} will be replaced with an '_' character.
 ~GHttpParamParser ()
const char * find (const char *szName)
 Returns the value associated with the specified name. Returns NULL if the name is not found.
std::map< const char *, const
char *, strComp > & 
map ()
 Returns a map of the name/value pairs.

Static Protected Member Functions

static void scrubValue (char *value)

Protected Attributes

GHeapm_pHeap
std::map< const char *, const
char *, strComp
m_map

Detailed Description

A class for parsing the name/value pairs that follow the "?" in a URL.


Constructor & Destructor Documentation

GClasses::GHttpParamParser::GHttpParamParser ( const char *  szParams,
bool  scrub = true 
)

szParams should be everything in the URL after the "?". If scrub is true, then the values will be scrubbed. That is, all characters not in {a-z;A-Z;0-9;!;@;#;$;-;+;*;/;(;);.;,;:} will be replaced with an '_' character.

GClasses::GHttpParamParser::~GHttpParamParser ( )

Member Function Documentation

const char* GClasses::GHttpParamParser::find ( const char *  szName)

Returns the value associated with the specified name. Returns NULL if the name is not found.

std::map<const char*, const char*, strComp>& GClasses::GHttpParamParser::map ( ) [inline]

Returns a map of the name/value pairs.

static void GClasses::GHttpParamParser::scrubValue ( char *  value) [static, protected]

Member Data Documentation

std::map<const char*, const char*, strComp> GClasses::GHttpParamParser::m_map [protected]