[#boost-urls-params_encoded_ref] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::params_encoded_ref :relfileprefix: ../../ :mrdocs: Mutable encoded query parameter proxy == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/params_encoded_ref.hpp#Lundefined[boost/url/params_encoded_ref.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class params_encoded_ref : public xref:boost/urls/params_encoded_base.adoc[params_encoded_base] ---- == Description This container exposes the percent‐encoded query parameters of a xref:boost/urls/url_base.adoc[`url_base`] as a bidirectional range while allowing mutation of the underlying URL. It references the URL’s buffer directly, so the url must stay alive for the lifetime of the proxy. == Example [,cpp] ---- url u( "?first=John&last=Doe" ); params_encoded_ref p = u.encoded_params(); ---- Strings produced when elements are returned have type xref:boost/urls/param_pct_view.adoc[`param_pct_view`] and represent encoded strings. Strings passed to member functions may contain percent escapes, and throw exceptions on invalid inputs. == Iterator Invalidation Changes to the underlying character buffer can invalidate iterators which reference it. Modifications made through the container invalidate some iterators to the underlying character buffer: * xref:boost/urls/params_encoded_ref/append-09.adoc[`append`] : Only `end()`. * xref:boost/urls/params_encoded_ref/assign-05.adoc[`assign`], xref:boost/urls/params_encoded_ref/clear.adoc[`clear`], `operator=` : All params. * xref:boost/urls/params_encoded_ref/erase-03.adoc[`erase`] : Erased params and all params after (including `end()`). * xref:boost/urls/params_encoded_ref/insert-0e.adoc[`insert`] : All params at or after the insertion point (including `end()`). * xref:boost/urls/params_encoded_ref/replace-01.adoc[`replace`], xref:boost/urls/params_encoded_ref/set-06.adoc[`set`] : Modified params and all params after (including `end()`). == Reads vs. writes Even though this type can be used to mutate the referenced URL, this is still a proxy and every observer function inherited from xref:boost/urls/params_encoded_base.adoc[`params_encoded_base`] (for example xref:boost/urls/params_encoded_base/contains.adoc[`contains`], xref:boost/urls/params_encoded_base/find-0c.adoc[`find`], and xref:boost/urls/params_encoded_base/get_or.adoc[`get_or`]) behaves like the corresponding function on xref:boost/urls/params_encoded_view.adoc[`params_encoded_view`]: it inspects the current encoded query and does not perform any modifications. == Base Classes [cols="1,4"] |=== |Name|Description | `xref:boost/urls/params_encoded_base.adoc[params_encoded_base]` | Percent‐encoded query helper base |=== == Types [cols="1,4"] |=== | Name| Description | xref:boost/urls/params_encoded_ref/iterator.adoc[`iterator`] | A Bidirectional iterator to a query parameter | xref:boost/urls/params_encoded_base/const_iterator.adoc[`const_iterator`] | A Bidirectional iterator to a query parameter | xref:boost/urls/params_encoded_base/const_reference.adoc[`const_reference`] | The reference type | xref:boost/urls/params_encoded_base/difference_type.adoc[`difference_type`] | A signed integer type used to represent differences. | xref:boost/urls/params_encoded_base/reference.adoc[`reference`] | The reference type | xref:boost/urls/params_encoded_base/size_type.adoc[`size_type`] | An unsigned integer type to represent sizes. | xref:boost/urls/params_encoded_base/value_type.adoc[`value_type`] | The value type |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:boost/urls/params_encoded_ref/2constructor-01.adoc[`params_encoded_ref`] [.small]#[constructor]# | Constructor | xref:boost/urls/params_encoded_ref/operator_assign-01.adoc[`operator=`] | Assignment | xref:boost/urls/params_encoded_ref/append-09.adoc[`append`] | Append params | xref:boost/urls/params_encoded_ref/assign-05.adoc[`assign`] | Assign params | xref:boost/urls/params_encoded_base/begin.adoc[`begin`] | Return an iterator to the beginning | xref:boost/urls/params_encoded_base/buffer.adoc[`buffer`] | Return the query corresponding to these params | xref:boost/urls/params_encoded_ref/clear.adoc[`clear`] | Clear the contents of the container | xref:boost/urls/params_encoded_base/contains.adoc[`contains`] | Return true if a matching key exists | xref:boost/urls/params_encoded_base/count.adoc[`count`] | Return the number of matching keys | xref:boost/urls/params_encoded_base/empty.adoc[`empty`] | Return true if there are no params | xref:boost/urls/params_encoded_base/end.adoc[`end`] | Return an iterator to the end | xref:boost/urls/params_encoded_ref/erase-03.adoc[`erase`] | Erase params | xref:boost/urls/params_encoded_base/find-0c.adoc[`find`] | Find a matching key | xref:boost/urls/params_encoded_base/find_last-0b.adoc[`find_last`] | Find a matching key | xref:boost/urls/params_encoded_base/get_or.adoc[`get_or`] | Return the value for a key or a fallback | xref:boost/urls/params_encoded_ref/insert-0e.adoc[`insert`] | Insert params | xref:boost/urls/params_encoded_ref/replace-01.adoc[`replace`] | Replace params | xref:boost/urls/params_encoded_ref/set-06.adoc[`set`] | Set a value | xref:boost/urls/params_encoded_base/size.adoc[`size`] | Return the number of params | xref:boost/urls/params_encoded_ref/unset.adoc[`unset`] | Remove the value on an element | xref:boost/urls/params_encoded_ref/url.adoc[`url`] | Return the referenced url | xref:boost/urls/params_encoded_ref/2conversion.adoc[`operator params_encoded_view`] | Conversion |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:boost/urls/params_encoded_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]#