GClasses
GClasses::GHttpParamParser Class Reference

Detailed Description

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

#include <GHttp.h>

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. More...
 
 ~GHttpParamParser ()
 
const char * find (const char *szName)
 Returns the value associated with the specified name. Returns NULL if the name is not found. More...
 
std::map< const char *, const char *, strComp > & map ()
 Returns a map of the name/value pairs. More...
 

Static Protected Member Functions

static void scrubValue (char *value)
 

Protected Attributes

std::map< const char *, const char *, strCompm_map
 
GHeapm_pHeap
 

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)
staticprotected

Member Data Documentation

std::map<const char*, const char*, strComp> GClasses::GHttpParamParser::m_map
protected
GHeap* GClasses::GHttpParamParser::m_pHeap
protected