Struct DictionaryList

Behaves similar to VALUE[string] but the insertion order is not changed and multiple values per key are supported.

This kind of map is used for MIME headers (e.g. for HTTP, see vibe.inet.message.InetHeaderMap), or for form data (vibe.inet.webform.FormFields). Note that the map can contain fields with the same key multiple times if addField is used for insertion. Insertion order is preserved.

Note that despite case not being relevant for matching keyse, iterating over the map will yield the original case of the key that was put in.

Insertion and lookup has O(n) complexity.

Fields

Name Type Description
m_extendedFields DictionaryList.Field[]
m_fieldCount size_t
m_fields DictionaryList.Field[64]
s_keyBuffer char[256]

Methods

Name Description
addField Adds a new field to the map.
computeCheckSumI
fromRepresentation Supports serialization using vibe.data.serialization.
get Returns the first field that matches the given key.
getAll Returns all values matching the given key.
getIndex
length The number of fields present in the map.
matches
opApply Iterates over all fields, including duplicates.
opBinaryRight Returns a pointer to the first field that matches the given key.
opIndex Returns the first value matching the given key.
opIndexAssign Adds or replaces the given field with a new value.
remove Removes the first field that matches the given key.
removeAll Removes all fields that matches the given key.
toRepresentation Supports serialization using vibe.data.serialization.

Inner structs

Name Description
Field

Aliases

Name Description
FieldTuple
valueType
ValueType

Authors

Sönke Ludwig

Copyright

© 2012-2014 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.