tnt::QueryParams Class Reference

#include <tnt/query_params.h>

Inheritance diagram for tnt::QueryParams:
cxxtools::QueryParams

Public Member Functions

 QueryParams ()
 default constructor
 QueryParams (const QueryParams &src)
QueryParamsoperator= (const QueryParams &src)
 ~QueryParams ()
ScopegetScope ()
template<typename Type >
Type arg (size_type n) const
template<typename Type >
Type arg (const std::string &name, const Type &def=Type()) const
template<typename Type >
Type arg (const std::string &name, const std::locale &loc, const Type &def=Type()) const
- Public Member Functions inherited from cxxtools::QueryParams
 QueryParams (const std::string &url)
 QueryParams (const char *url)
void parse_url (const std::string &url)
 read parameters from url
void parse_url (const char *url)
 read parameters from url
void parse_url (std::istream &url_stream)
 read parameters from stream
const std::string & param (size_type n) const
 get unnamed parameter by number (no range-check!)
size_type paramcount () const
 get number of unnamed parameters
const std::string & operator[] (size_type n) const
 get unnamed parameter with operator[] (no range-check!)
QueryParamsadd (const std::string &value)
 add unnamed parameter
const std::string & param (const std::string &name, size_type n=0) const
 get nth named parameter.
std::string param (const std::string &name, size_type n, const std::string &def) const
 get nth named parameter with default value.
std::string param (const std::string &name, const std::string &def) const
 get named parameter or default value.
size_type paramcount (const std::string &name) const
 get number of parameters with the given name
std::string operator[] (const std::string &name) const
 get first named parameter with operator[]
bool has (const std::string &name) const
 checks if the named parameter exists
QueryParamsadd (const std::string &name, const std::string &value)
 add named parameter
QueryParamsadd (const QueryParams &other)
void clear ()
 removes all data
bool empty () const
 returns true, when no parameters exist (named and unnamed)
const_iterator begin () const
 get iterator to unnamed parameters
const_iterator begin (const std::string &name) const
 get iterator to named parameter
const_iterator end () const
 get end-iterator (named and unnamed)
std::string getUrl () const
 get parameters as url

Additional Inherited Members

- Public Types inherited from cxxtools::QueryParams
typedef std::vector< value_typevalues_type
typedef values_type::size_type size_type

Constructor & Destructor Documentation

tnt::QueryParams::QueryParams ( )
inline

default constructor

Reimplemented from cxxtools::QueryParams.

tnt::QueryParams::QueryParams ( const QueryParams src)
inline
tnt::QueryParams::~QueryParams ( )
inline

Member Function Documentation

template<typename Type >
Type tnt::QueryParams::arg ( size_type  n) const
inline
template<typename Type >
Type tnt::QueryParams::arg ( const std::string &  name,
const Type &  def = Type() 
) const
inline
template<typename Type >
Type tnt::QueryParams::arg ( const std::string &  name,
const std::locale &  loc,
const Type &  def = Type() 
) const
inline
Scope& tnt::QueryParams::getScope ( )
inline
QueryParams& tnt::QueryParams::operator= ( const QueryParams src)
inline

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