A HeaderField is a class that contains the header field name and all of the values. More...
#include <Headers.h>
Public Types | |
typedef unsigned int | size_type |
typedef header_field_value_iterator | iterator |
Public Member Functions | |
~HeaderField () | |
size_type | size () const |
Get the size of the HeaderField, this is the number of values associated with the header field. | |
iterator | begin () |
Returns an iterator to the start of the values. | |
iterator | end () |
Returns an iterator to the end of this header field's values. | |
HeaderFieldName | name () const |
Get the name of this HeaderField. | |
std::string | values (const char *join=",") |
Join all the values of this HeaderField into a single string seperated by the join string. | |
std::string | values (const std::string &join) |
Join all the values of this HeaderField into a single string seperated by the join string. | |
std::string | values (const char join) |
Join all the values of this HeaderField into a single string seperated by the join string. | |
bool | empty () |
Check if this HeaderField is empty (no values). | |
bool | clear () |
Remove all values from this HeaderField. | |
bool | erase (iterator it) |
Remove a single value from this HeaderField which is pointed to by the given iterator. | |
bool | append (const std::string &value) |
Append a value or a seperated list of values to this HeaderField. | |
bool | append (const char *value, int length=-1) |
Append a value or a seperated list of values to this HeaderField. | |
bool | setName (const std::string &str) |
Change the name of this HeaderField to the given key. | |
bool | operator== (const char *field_name) const |
Compares the name of the header field only (not the values). | |
bool | operator== (const std::string &field_name) const |
Compares the name of the header field only (not the values). | |
bool | operator!= (const char *field_name) const |
Compares the name of the header field only (not the values). | |
bool | operator!= (const std::string &field_name) const |
Compares the name of the header field only (not the values). | |
bool | operator= (const std::string &field_value) |
Set the VALUES of the header field to the given value string. | |
bool | operator= (const char *field_value) |
Set the VALUES of the header field to the given value string. | |
std::string | operator[] (const int index) |
Get the index value from this HeaderField. | |
std::string | str () |
Get a string representing all the header field's values. | |
Friends | |
class | Headers |
class | header_field_iterator |
std::ostream & | operator<< (std::ostream &os, HeaderField &obj) |
Get a string representing all the header field's values. |
A HeaderField is a class that contains the header field name and all of the values.
Definition at line 232 of file Headers.h.
typedef unsigned int atscppapi::HeaderField::size_type |
atscppapi::HeaderField::~HeaderField | ( | ) |
bool atscppapi::HeaderField::append | ( | const std::string & | value | ) |
Append a value or a seperated list of values to this HeaderField.
a | string containing the value(s). |
bool atscppapi::HeaderField::append | ( | const char * | value, | |
int | length = -1 | |||
) |
Append a value or a seperated list of values to this HeaderField.
a | string containing the value. | |
the | length of the value that is being appended. |
iterator atscppapi::HeaderField::begin | ( | ) |
Returns an iterator to the start of the values.
bool atscppapi::HeaderField::clear | ( | ) |
Remove all values from this HeaderField.
bool atscppapi::HeaderField::empty | ( | ) |
Check if this HeaderField is empty (no values).
iterator atscppapi::HeaderField::end | ( | ) |
Returns an iterator to the end of this header field's values.
bool atscppapi::HeaderField::erase | ( | iterator | it | ) |
Remove a single value from this HeaderField which is pointed to by the given iterator.
an | iterator which points to a single HeaderField value. |
HeaderFieldName atscppapi::HeaderField::name | ( | ) | const |
Get the name of this HeaderField.
bool atscppapi::HeaderField::operator!= | ( | const char * | field_name | ) | const |
Compares the name of the header field only (not the values).
bool atscppapi::HeaderField::operator!= | ( | const std::string & | field_name | ) | const |
Compares the name of the header field only (not the values).
bool atscppapi::HeaderField::operator= | ( | const char * | field_value | ) |
Set the VALUES of the header field to the given value string.
the | values to set on the current header field |
bool atscppapi::HeaderField::operator= | ( | const std::string & | field_value | ) |
Set the VALUES of the header field to the given value string.
string | - the values to set on the current header field |
bool atscppapi::HeaderField::operator== | ( | const std::string & | field_name | ) | const |
Compares the name of the header field only (not the values).
bool atscppapi::HeaderField::operator== | ( | const char * | field_name | ) | const |
Compares the name of the header field only (not the values).
std::string atscppapi::HeaderField::operator[] | ( | const int | index | ) |
Get the index value from this HeaderField.
the | index to retrieve a copy of |
bool atscppapi::HeaderField::setName | ( | const std::string & | str | ) |
Change the name of this HeaderField to the given key.
string | - the new name of the header field |
size_type atscppapi::HeaderField::size | ( | ) | const |
Get the size of the HeaderField, this is the number of values associated with the header field.
std::string atscppapi::HeaderField::str | ( | ) |
Get a string representing all the header field's values.
std::string atscppapi::HeaderField::values | ( | const char * | join = "," |
) |
Join all the values of this HeaderField into a single string seperated by the join string.
an | optional join string (defaults to ",") |
std::string atscppapi::HeaderField::values | ( | const std::string & | join | ) |
Join all the values of this HeaderField into a single string seperated by the join string.
a | join string |
std::string atscppapi::HeaderField::values | ( | const char | join | ) |
Join all the values of this HeaderField into a single string seperated by the join string.
a | optional join character |
friend class header_field_iterator [friend] |
std::ostream& operator<< | ( | std::ostream & | os, | |
HeaderField & | obj | |||
) | [friend] |
Get a string representing all the header field's values.