xmltooling  3.0.3
xmltooling::URLEncoder Class Reference

Interface to a URL-encoding mechanism along with a default implementation. More...

#include <xmltooling/util/URLEncoder.h>

Public Member Functions

virtual std::string encode (const char *s) const
 Produce a URL-safe but equivalent version of the input string. More...
 
virtual void decode (char *s) const
 Perform an in-place decoding operation on the input string. More...
 

Protected Member Functions

virtual bool isBad (char ch) const
 Returns true iff the input character requires encoding. More...
 

Detailed Description

Interface to a URL-encoding mechanism along with a default implementation.

Since URL-encoding is not canonical, it's important that the same encoder is used during some library operations and the calling code. Applications can supply an alternative implementation to the library if required.

Member Function Documentation

virtual void xmltooling::URLEncoder::decode ( char *  s) const
virtual

Perform an in-place decoding operation on the input string.

The resulting string will be NULL-terminated.

Parameters
sinput string to decode in a writable buffer
virtual std::string xmltooling::URLEncoder::encode ( const char *  s) const
virtual

Produce a URL-safe but equivalent version of the input string.

Parameters
sinput string to encode
Returns
a string object containing the result of encoding the input
virtual bool xmltooling::URLEncoder::isBad ( char  ch) const
protectedvirtual

Returns true iff the input character requires encoding.

Parameters
chthe character to check
Returns
true iff the character should be encoded

The documentation for this class was generated from the following file: