@@ -20,15 +20,68 @@ supports absolute URIs that start with either 'http' or 'https'.
20
20
21
21
[section:concepts URI Concepts]
22
22
23
+ This page describes the URI Concepts implemented within cpp-netlib.
24
+ The following concepts are also implemented as Boost.Concept_check
25
+ types enforced by the URI library.
26
+
27
+ URI Concepts are organized into a hierarchy of conepts.
28
+
23
29
[section:uri_concept URI]
24
30
25
- TODO: document the URI concept.
31
+ [heading Description]
32
+
33
+ A type models the URI Concept if the type adheres to the following
34
+ usage semantics, and is DefaultConstructible and EqualityComparable.
35
+
36
+ [variablelist Notation
37
+ [[`U`] [A URI Type.]]
38
+ [[`u`,`u_`] [A URI Type instance.]]
39
+ [[`S`] [A String Type.]]
40
+ [[`s`] [A String Type instance.]]
41
+ ]
42
+
43
+ [heading Valid Expressions]
44
+
45
+ For any URI, the following expressions must be valid:
46
+
47
+ [table
48
+ [[Expression] [Return Type] [Description]]
49
+ [[`U u_(u)`] [] [U must be Copy constructible.]]
50
+ [[`U u_(s)`] [] [U can be constructed from a string `s`.]]
51
+ [[`swap(u,u_)`] [void] [Swap should be availabe via ADL.]]
52
+ [[`protocol(u)`] [S] [Return the protocol part of the URI.]]
53
+ [[`rest(u)`] [S] [Return the rest of the URI, excluding the protocol part.]]
54
+ [[`valid(u)`] [bool] [Return true whether the URI is a valid URI.]]
55
+ [[`U::string_type`] [S] [U should have a nested type `string_type` of type `S`.]]
56
+ ]
26
57
27
58
[endsect] [/uri_concept]
28
59
29
60
[section:http_uri HTTP URI]
30
61
31
- TODO: document the HTTP URI concept.
62
+ A type models the HTTP URI Concept if the type adheres to the following
63
+ usage semantics, and if the type also models the URI Concept.
64
+
65
+ [variablelist Notation
66
+ [[`H`] [An HTTP URI Type.]]
67
+ [[`h`,`h_`] [An HTTP URI Type instance.]]
68
+ [[`S`] [A String Type.]]
69
+ [[`s`] [A String Type instance.]]
70
+ ]
71
+
72
+ [heading Valid Expressions]
73
+
74
+ For any HTTP URI, the following expressions must be valid:
75
+
76
+ [table
77
+ [[Expression] [Return Type] [Description]]
78
+ [[`user_info(h)`] [S] [Retrieve the user-info part of the HTTP URI.]]
79
+ [[`host(h)`] [S] [Retrieve the host part of the HTTP URI.]]
80
+ [[`port(h)`] [uint32_t] [Retrieve the port part of the HTTP URI.]]
81
+ [[`path(h)`] [S] [Retrieve the path part of the HTTP URI.]]
82
+ [[`query(h)`] [S] [Retrieve the query part of the HTTP URI.]]
83
+ [[`fragment(h)`][S] [Retrieve the fragment part of the HTTP URI.]]
84
+ ]
32
85
33
86
[endsect] [/http_uri]
34
87