30struct request::GPC::Data {
32 unordered_multimap<string, string> dataMap;
34 explicit Data(Source source) : source(source) {}
40 data = make_unique<Data>(source);
44 data->dataMap = requestInit.cookieVars;
47 data->dataMap = requestInit.postVars;
50 data->dataMap = requestInit.getVars;
54std::string request::GPC::operator[](std::string
const& gpcVar)
const {
55 auto e = data->dataMap.find(gpcVar);
56 if (e != data->dataMap.end())
64 auto e = data->dataMap.equal_range(gpcVar);
65 for (
auto it = e.first; it != e.second; ++it) {
66 ret.push_back(it->second);
72 return data->dataMap.count(gpcVar);
80 return data->dataMap.begin();
83std::unordered_multimap<std::string, std::string>::const_iterator
request::GPC::end()
const {
84 return data->dataMap.end();
87request::GPC::operator bool()
const {
88 return !data->dataMap.empty();
Accessor class for GET, POST, and COOKIE variables.
Container used by request handlers to initiate the nawa::Request object.
std::unordered_multimap< std::string, std::string >::const_iterator end() const
std::unordered_multimap< std::string, std::string > const & getMultimap() const
size_t count(std::string const &gpcVar) const
std::unordered_multimap< std::string, std::string >::const_iterator begin() const
std::vector< std::string > getVector(std::string const &gpcVar) const
#define NAWA_DEFAULT_DESTRUCTOR_IMPL_WITH_NS(Namespace, Class)