:relfileprefix: ../../
[#0F3A8CA5A257D8EDB9BCF17110DE440D3C94EAEC]

= Class params_view

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


== Synopsis

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

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

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

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

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

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

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

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

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

|===
==  Member Functions
[,cols=2]
|===
|Name |Description
|xref:boost/urls/params_base/begin.adoc[`pass:v[begin]`] |
pass:v,q[Return an iterator to the beginning]

|xref:boost/urls/params_base/buffer.adoc[`pass:v[buffer]`] |
pass:v,q[Return the referenced character buffer.]

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

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

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

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

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

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

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

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

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

|===
==  Static Member Functions
[,cols=2]
|===
|Name |Description
|xref:boost/urls/params_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[character buffer. The caller is responsible]
pass:v,q[for ensuring that the lifetime of the buffer]
pass:v,q[extends until it is no longer referenced.]

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

params_view p = u.params();
----
pass:v,q[Percent escapes in strings returned when]
pass:v,q[dereferencing iterators are automatically]
pass:v,q[decoded.]

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



