![]() |
Ark Server API (ASE) - Wiki
|
#include <NameValueCollection.h>
Inheritance diagram for Poco::Net::NameValueCollection:
Collaboration diagram for Poco::Net::NameValueCollection:Public Types | |
| using | HeaderMap = Poco::ListMap<std::string, std::string> |
| using | Iterator = HeaderMap::Iterator |
| using | ConstIterator = HeaderMap::ConstIterator |
Public Member Functions | |
| NameValueCollection () | |
| NameValueCollection (const NameValueCollection &nvc) | |
| Creates an empty NameValueCollection. | |
| NameValueCollection (NameValueCollection &&nvc) noexcept | |
| Creates a NameValueCollection by copying another one. | |
| virtual | ~NameValueCollection () |
| Creates a NameValueCollection by moving another one. | |
| NameValueCollection & | operator= (const NameValueCollection &nvc) |
| Destroys the NameValueCollection. | |
| NameValueCollection & | operator= (NameValueCollection &&nvc) noexcept |
| Assigns the name-value pairs of another NameValueCollection to this one. | |
| void | swap (NameValueCollection &nvc) |
| Moves the name-value pairs of another NameValueCollection to this one. | |
| const std::string & | operator[] (const std::string &name) const |
| Swaps the NameValueCollection with another one. | |
| void | set (const std::string &name, const std::string &value) |
| void | add (const std::string &name, const std::string &value) |
| Sets the value of the (first) name-value pair with the given name. | |
| const std::string & | get (const std::string &name) const |
| Adds a new name-value pair with the given name and value. | |
| const std::string & | get (const std::string &name, const std::string &defaultValue) const |
| bool | has (const std::string &name) const |
| ConstIterator | find (const std::string &name) const |
| ConstIterator | begin () const |
| ConstIterator | end () const |
| bool | empty () const |
| std::size_t | size () const |
| Returns true iff the header does not have any content. | |
| void | erase (const std::string &name) |
| void | clear () |
| Removes all name-value pairs with the given name. | |
Private Attributes | |
| HeaderMap | _map |
| Removes all name-value pairs and their values. | |
A collection of name-value pairs that are used in various internet protocols like HTTP and SMTP.
The name is case-insensitive.
There can be more than one name-value pair with the same name.
Definition at line 31 of file NameValueCollection.h.
Definition at line 43 of file NameValueCollection.h.
| using Poco::Net::NameValueCollection::HeaderMap = Poco::ListMap<std::string, std::string> |
Definition at line 41 of file NameValueCollection.h.
Definition at line 42 of file NameValueCollection.h.
| Poco::Net::NameValueCollection::NameValueCollection | ( | ) |
| Poco::Net::NameValueCollection::NameValueCollection | ( | const NameValueCollection & | nvc | ) |
Creates an empty NameValueCollection.
|
noexcept |
Creates a NameValueCollection by copying another one.
|
virtual |
Creates a NameValueCollection by moving another one.
| void Poco::Net::NameValueCollection::add | ( | const std::string & | name, |
| const std::string & | value ) |
Sets the value of the (first) name-value pair with the given name.
| ConstIterator Poco::Net::NameValueCollection::begin | ( | ) | const |
Returns an iterator pointing to the first name-value pair with the given name.
| void Poco::Net::NameValueCollection::clear | ( | ) |
Removes all name-value pairs with the given name.
| bool Poco::Net::NameValueCollection::empty | ( | ) | const |
Returns an iterator pointing to the end of the name-value pair collection.
| ConstIterator Poco::Net::NameValueCollection::end | ( | ) | const |
Returns an iterator pointing to the begin of the name-value pair collection.
| void Poco::Net::NameValueCollection::erase | ( | const std::string & | name | ) |
Returns the number of name-value pairs in the collection.
| ConstIterator Poco::Net::NameValueCollection::find | ( | const std::string & | name | ) | const |
Returns true if there is at least one name-value pair with the given name.
| const std::string & Poco::Net::NameValueCollection::get | ( | const std::string & | name | ) | const |
Adds a new name-value pair with the given name and value.
| const std::string & Poco::Net::NameValueCollection::get | ( | const std::string & | name, |
| const std::string & | defaultValue ) const |
Returns the value of the first name-value pair with the given name.
Throws a NotFoundException if the name-value pair does not exist.
| bool Poco::Net::NameValueCollection::has | ( | const std::string & | name | ) | const |
Returns the value of the first name-value pair with the given name. If no value with the given name has been found, the defaultValue is returned.
| NameValueCollection & Poco::Net::NameValueCollection::operator= | ( | const NameValueCollection & | nvc | ) |
Destroys the NameValueCollection.
|
noexcept |
Assigns the name-value pairs of another NameValueCollection to this one.
| const std::string & Poco::Net::NameValueCollection::operator[] | ( | const std::string & | name | ) | const |
Swaps the NameValueCollection with another one.
| void Poco::Net::NameValueCollection::set | ( | const std::string & | name, |
| const std::string & | value ) |
Returns the value of the (first) name-value pair with the given name.
Throws a NotFoundException if the name-value pair does not exist.
| std::size_t Poco::Net::NameValueCollection::size | ( | ) | const |
Returns true iff the header does not have any content.
| void Poco::Net::NameValueCollection::swap | ( | NameValueCollection & | nvc | ) |
Moves the name-value pairs of another NameValueCollection to this one.
Here is the caller graph for this function:
|
private |
Removes all name-value pairs and their values.
Definition at line 116 of file NameValueCollection.h.