boost::urls::params_ref
Mutable decoded query parameter proxy
Synopsis
Declared in <boost/url/params_ref.hpp>
class params_ref
: public params_base
Description
This container presents the decoded query parameters of a url_base as a bidirectional range whose modifying operations update the underlying URL in‐place. It references (but does not own) the character buffer, so the referenced URL must stay alive while the proxy is used.
Percent escapes in strings returned when dereferencing iterators are automatically decoded. Reserved characters in strings supplied to modifier functions are automatically percent‐escaped.
Iterator Invalidation
Changes to the underlying character buffer can invalidate iterators which reference it. Modifications made through the container invalidate some or all iterators:
-
append: Only `end()`. -
assign,clear, `operator=` : All elements. -
erase: Erased elements and all elements after (including `end()`). -
insert: All elements at or after the insertion point (including `end()`). -
replace,set: Modified elements and all elements after (including `end()`).
Reads vs. writes
Although this is a mutable proxy, all observer helpers inherited from params_base (such as contains, find, and get_or) operate in the same way as they do on params_view: they perform their lookup against the current contents of the referenced URL without modifying it.
Types
Name |
Description |
A Bidirectional iterator to a query parameter |
|
A Bidirectional iterator to a query parameter |
|
The reference type |
|
A signed integer type used to represent differences. |
|
The reference type |
|
An unsigned integer type to represent sizes. |
|
The value type |
Member Functions
Name |
Description |
|
Constructor |
Assignment |
|
Append elements |
|
Assign elements |
|
Return an iterator to the beginning |
|
Return the referenced character buffer. |
|
Clear the contents of the container |
|
Return true if a matching key exists |
|
Return the number of matching keys |
|
Return true if there are no params |
|
Return an iterator to the end |
|
Erase elements |
|
Find a matching key |
|
Find a matching key |
|
Return the value for a key or a fallback |
|
Insert elements |
|
Replace elements |
|
Set a value |
|
Return the number of params |
|
Remove the value on an element |
|
Return the referenced url |
|
Conversion |
Friends
| Name | Description |
|---|---|
Common functionality for containers |
Created with MrDocs