[#boost-urls-params_ref] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::params_ref :relfileprefix: ../../ :mrdocs: Mutable decoded query parameter proxy == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/params_ref.hpp#Lundefined[boost/url/params_ref.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class params_ref : public xref:boost/urls/params_base.adoc[params_base] ---- == Description This container presents the decoded query parameters of a xref:boost/urls/url_base.adoc[`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. == Example [,cpp] ---- url u( "?first=John&last=Doe" ); params_ref p = u.params(); ---- == Iterator Invalidation Changes to the underlying character buffer can invalidate iterators which reference it. Modifications made through the container invalidate some or all iterators: * xref:boost/urls/params_ref/append-00.adoc[`append`] : Only `end()`. * xref:boost/urls/params_ref/assign-05.adoc[`assign`], xref:boost/urls/params_ref/clear.adoc[`clear`], `operator=` : All elements. * xref:boost/urls/params_ref/erase-0fb.adoc[`erase`] : Erased elements and all elements after (including `end()`). * xref:boost/urls/params_ref/insert-0d.adoc[`insert`] : All elements at or after the insertion point (including `end()`). * xref:boost/urls/params_ref/replace-09.adoc[`replace`], xref:boost/urls/params_ref/set-0f.adoc[`set`] : Modified elements and all elements after (including `end()`). == Reads vs. writes Although this is a mutable proxy, all observer helpers inherited from xref:boost/urls/params_base.adoc[`params_base`] (such as xref:boost/urls/params_base/contains.adoc[`contains`], xref:boost/urls/params_base/find-0f.adoc[`find`], and xref:boost/urls/params_base/get_or.adoc[`get_or`]) operate in the same way as they do on xref:boost/urls/params_view.adoc[`params_view`]: they perform their lookup against the current contents of the referenced URL without modifying it. == Base Classes [cols="1,4"] |=== |Name|Description | `xref:boost/urls/params_base.adoc[params_base]` | Decoded query parameter helper base |=== == Types [cols="1,4"] |=== | Name| Description | xref:boost/urls/params_ref/iterator.adoc[`iterator`] | A Bidirectional iterator to a query parameter | xref:boost/urls/params_base/const_iterator.adoc[`const_iterator`] | A Bidirectional iterator to a query parameter | xref:boost/urls/params_base/const_reference.adoc[`const_reference`] | The reference type | xref:boost/urls/params_base/difference_type.adoc[`difference_type`] | A signed integer type used to represent differences. | xref:boost/urls/params_base/reference.adoc[`reference`] | The reference type | xref:boost/urls/params_base/size_type.adoc[`size_type`] | An unsigned integer type to represent sizes. | xref:boost/urls/params_base/value_type.adoc[`value_type`] | The value type |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:boost/urls/params_ref/2constructor-0e.adoc[`params_ref`] [.small]#[constructor]# | Constructor | xref:boost/urls/params_ref/operator_assign-0b.adoc[`operator=`] | Assignment | xref:boost/urls/params_ref/append-00.adoc[`append`] | Append elements | xref:boost/urls/params_ref/assign-05.adoc[`assign`] | Assign elements | xref:boost/urls/params_base/begin.adoc[`begin`] | Return an iterator to the beginning | xref:boost/urls/params_base/buffer.adoc[`buffer`] | Return the referenced character buffer. | xref:boost/urls/params_ref/clear.adoc[`clear`] | Clear the contents of the container | xref:boost/urls/params_base/contains.adoc[`contains`] | Return true if a matching key exists | xref:boost/urls/params_base/count.adoc[`count`] | Return the number of matching keys | xref:boost/urls/params_base/empty.adoc[`empty`] | Return true if there are no params | xref:boost/urls/params_base/end.adoc[`end`] | Return an iterator to the end | xref:boost/urls/params_ref/erase-0fb.adoc[`erase`] | Erase elements | xref:boost/urls/params_base/find-0f.adoc[`find`] | Find a matching key | xref:boost/urls/params_base/find_last-04b.adoc[`find_last`] | Find a matching key | xref:boost/urls/params_base/get_or.adoc[`get_or`] | Return the value for a key or a fallback | xref:boost/urls/params_ref/insert-0d.adoc[`insert`] | Insert elements | xref:boost/urls/params_ref/replace-09.adoc[`replace`] | Replace elements | xref:boost/urls/params_ref/set-0f.adoc[`set`] | Set a value | xref:boost/urls/params_base/size.adoc[`size`] | Return the number of params | xref:boost/urls/params_ref/unset.adoc[`unset`] | Remove the value on an element | xref:boost/urls/params_ref/url.adoc[`url`] | Return the referenced url | xref:boost/urls/params_ref/2conversion.adoc[`operator params_view`] | Conversion |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:boost/urls/params_base/max_size.adoc[`max_size`] | Return the maximum number of characters possible |=== == Friends [cols="1,4"] |=== |Name|Description | `xref:boost/urls/url_base.adoc[boost::urls::url_base]` | Common functionality for containers |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#