ADTF
cUrl::cQuery

Subclass representing and handling the query subset as part of cUrl. More...

Public Member Functions

 cQuery (const cString &strQuery=cString::Empty)
 Constructor for a Query subset of any URL. More...
 
 ~cQuery ()
 Destructor.
 
tResult Validate (const cString &strQuery)
 Validation procedure for the query subset. More...
 
cString GetValue (const cString &strParameter, const cString &strDefault=cString::Empty) const
 Method to read individual values of the query by their parameters. More...
 
cString AsString () const
 Getter method to retrieve the raw query string. More...
 
tBool IsValid () const
 Checks for the query's validity. More...
 

Private Attributes

tBool m_bIsValid
 < Boolean flag used to determine if the url subset has already been verified More...
 
cString m_strQueryFull
 Map to store the the query's value paris in.
 
std::map< cString, cStringm_mapQuery
 

Detailed Description

Subclass representing and handling the query subset as part of cUrl.

Parameters
strQueryThe query part of a particular URL
Note
A Query consists of single parameters (simple 'set' or 'not set') and parameters with an associated value in the style of '?paramter1&parameter1=value'

Definition at line 58 of file url.h.

Constructor & Destructor Documentation

◆ cQuery()

cQuery ( const cString strQuery = cString::Empty)

Constructor for a Query subset of any URL.

Parameters
strQueryThe query part of a particular URL

Member Function Documentation

◆ AsString()

cString AsString ( ) const

Getter method to retrieve the raw query string.

Returns
Raw query data.

◆ GetValue()

cString GetValue ( const cString strParameter,
const cString strDefault = cString::Empty 
) const

Method to read individual values of the query by their parameters.

Parameters
strParameterThe parameter to read from
strDefaultDefault return value
Returns
The value associated with the given parameter name; if the parameter has not been found strDefault is returned.

◆ IsValid()

tBool IsValid ( ) const

Checks for the query's validity.

Return values
tFalseif query subset is invalid or has not yet been validated.
tTrueif the query subset is valid and the values could be extracted successfully.

◆ Validate()

tResult Validate ( const cString strQuery)

Validation procedure for the query subset.

Parameters
strQueryThe query part of a particular URL if not already given through the constructor
Return values
ERR_NOERRORA valid Query has been given.
ERR_INVALID_ARGThe query is syntactically invalid

Member Data Documentation

◆ m_bIsValid

tBool m_bIsValid
private

< Boolean flag used to determine if the url subset has already been verified

The unparsed query string

Definition at line 109 of file url.h.