:relfileprefix: ../../
[#A11E41E43D3F2584CE418BF215746FF9AB7DD491]

= Class params_encoded_ref

pass:v,q[A view representing query parameters in a URL]


== Synopsis

Declared in header `</boost/url/params_encoded_ref.hpp#L73[boost/url/params_encoded_ref.hpp,window=blank_]>`

[source,cpp,subs="verbatim,macros,-callouts"]
----
class params_encoded_ref
    : public xref:boost/urls/params_encoded_base.adoc[params_encoded_base];
----

==  Types
[,cols=2]
|===
|Name |Description
|xref:boost/urls/params_encoded_base/const_iterator.adoc[`pass:v[const_iterator]`] |
xref:boost/urls/params_encoded_base/iterator.adoc[iterator]

|xref:boost/urls/params_encoded_base/const_reference.adoc[`pass:v[const_reference]`] |
pass:v,q[The reference type]

|xref:boost/urls/params_encoded_base/difference_type.adoc[`pass:v[difference_type]`] |
pass:v,q[A signed integer type used to represent differences.]

|xref:boost/urls/params_encoded_base/iterator.adoc[`pass:v[iterator]`] |

|xref:boost/urls/params_encoded_base/reference.adoc[`pass:v[reference]`] |
pass:v,q[The reference type]

|xref:boost/urls/params_encoded_base/size_type.adoc[`pass:v[size_type]`] |
pass:v,q[An unsigned integer type to represent sizes.]

|xref:boost/urls/params_encoded_base/value_type.adoc[`pass:v[value_type]`] |
pass:v,q[The value type]

|===
==  Member Functions
[,cols=2]
|===
|Name |Description
|xref:boost/urls/params_encoded_ref/append.adoc[`pass:v[append]`] |
pass:v,q[Append params]

|xref:boost/urls/params_encoded_ref/assign.adoc[`pass:v[assign]`] |
pass:v,q[Assign params]

|xref:boost/urls/params_encoded_base/begin.adoc[`pass:v[begin]`] |
pass:v,q[Return an iterator to the beginning]

|xref:boost/urls/params_encoded_base/buffer.adoc[`pass:v[buffer]`] |
pass:v,q[Return the query corresponding to these params]

|xref:boost/urls/params_encoded_ref/clear.adoc[`pass:v[clear]`] |
pass:v,q[Clear the contents of the container]

|xref:boost/urls/params_encoded_base/contains.adoc[`pass:v[contains]`] |
pass:v,q[Return true if a matching key exists]

|xref:boost/urls/params_encoded_base/count.adoc[`pass:v[count]`] |
pass:v,q[Return the number of matching keys]

|xref:boost/urls/params_encoded_base/empty.adoc[`pass:v[empty]`] |
pass:v,q[Return true if there are no params]

|xref:boost/urls/params_encoded_base/end.adoc[`pass:v[end]`] |
pass:v,q[Return an iterator to the end]

|xref:boost/urls/params_encoded_ref/erase.adoc[`pass:v[erase]`] |
pass:v,q[Erase params]

|xref:boost/urls/params_encoded_base/find.adoc[`pass:v[find]`] |
pass:v,q[Find a matching key]

|xref:boost/urls/params_encoded_base/find_last.adoc[`pass:v[find_last]`] |
pass:v,q[Find a matching key]

|xref:boost/urls/params_encoded_ref/insert.adoc[`pass:v[insert]`] |
pass:v,q[Insert params]

|xref:boost/urls/params_encoded_ref/2conversion.adoc[`pass:v[operator params_encoded_view]`] |
pass:v,q[Conversion]

|xref:boost/urls/params_encoded_ref/operator_assign.adoc[`pass:v[operator=]`] |
pass:v,q[Assignment]

|xref:boost/urls/params_encoded_ref/2constructor.adoc[`pass:v[params_encoded_ref]`] |
pass:v,q[Constructor]

|xref:boost/urls/params_encoded_ref/replace.adoc[`pass:v[replace]`] |
pass:v,q[Replace params]

|xref:boost/urls/params_encoded_ref/set.adoc[`pass:v[set]`] |
pass:v,q[Set a value]

|xref:boost/urls/params_encoded_base/size.adoc[`pass:v[size]`] |
pass:v,q[Return the number of params]

|xref:boost/urls/params_encoded_ref/unset.adoc[`pass:v[unset]`] |
pass:v,q[Remove the value on an element]

|xref:boost/urls/params_encoded_ref/url.adoc[`pass:v[url]`] |
pass:v,q[Return the referenced url]

|===
==  Static Member Functions
[,cols=2]
|===
|Name |Description
|xref:boost/urls/params_encoded_base/max_size.adoc[`pass:v[max_size]`] |
pass:v,q[Return the maximum number of characters possible]

|===

== Description

pass:v,q[Objects of this type are used to interpret] pass:v,q[the query parameters as a bidirectional view]
pass:v,q[of key value pairs.]
pass:v,q[The view does not retain ownership of the]
pass:v,q[elements and instead references the original]
pass:v,q[url. The caller is responsible for ensuring]
pass:v,q[that the lifetime of the referenced url]
pass:v,q[extends until it is no longer referenced.]
pass:v,q[The view is modifiable; calling non-const]
pass:v,q[members causes changes to the referenced]
pass:v,q[url.]

=== Example
[,cpp]
----
url u( "?first=John&last=Doe" );

params_encoded_ref p = u.encoded_params();
----
pass:v,q[Strings produced when elements are returned]
pass:v,q[have type]
xref:boost/urls/param_pct_view.adoc[param_pct_view]
pass:v,q[and represent]
pass:v,q[encoded strings. Strings passed to member]
pass:v,q[functions may contain percent escapes, and]
pass:v,q[throw exceptions on invalid inputs.]

=== Iterator Invalidation
pass:v,q[Changes to the underlying character buffer]
pass:v,q[can invalidate iterators which reference it.]
pass:v,q[Modifications made through the container]
pass:v,q[invalidate some iterators to the underlying]
pass:v,q[character buffer:]

* xref:boost/urls/params_encoded_ref/append-07.adoc[append]
pass:v,q[: Only `end()`.]

* xref:boost/urls/params_encoded_ref/assign-00.adoc[assign,]
xref:boost/urls/params_encoded_ref/clear.adoc[clear,]
pass:v,q[`operator=` : All params.]

* xref:boost/urls/params_encoded_ref/erase-08.adoc[erase]
pass:v,q[: Erased params and all]
pass:v,q[params after (including `end()`).]

* xref:boost/urls/params_encoded_ref/insert-03.adoc[insert]
pass:v,q[: All params at or after]
pass:v,q[the insertion point (including `end()`).]

* xref:boost/urls/params_encoded_ref/replace-0f.adoc[replace,]
xref:boost/urls/params_encoded_ref/set-07.adoc[set]
pass:v,q[: Modified]
pass:v,q[params and all params]
pass:v,q[after (including `end()`).]



