Skip to content

Commit a7056e9

Browse files
author
mikhail_beris
committed
Checking in changes for documenting the URI type; adding myself to documentation copyright holders.
1 parent aa451a1 commit a7056e9

File tree

2 files changed

+57
-4
lines changed

2 files changed

+57
-4
lines changed

libs/network/doc/network.qbk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
[article C++ Network Library
99
[quickbook 1.4]
1010
[version 0.4]
11-
[authors [Matthews, Glyn]]
12-
[copyright 2008, 2009 Glyn Matthews]
11+
[authors [Matthews, Glyn], [Berris, Dean Michael]]
12+
[copyright 2008, 2009 Glyn Matthews Dean Michael Berris]
1313
[purpose C++ library for general network programming]
1414
[category text]
1515
[license

libs/network/doc/uri.qbk

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,68 @@ supports absolute URIs that start with either 'http' or 'https'.
2020

2121
[section:concepts URI Concepts]
2222

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+
2329
[section:uri_concept URI]
2430

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+
]
2657

2758
[endsect] [/uri_concept]
2859

2960
[section:http_uri HTTP URI]
3061

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+
]
3285

3386
[endsect] [/http_uri]
3487

0 commit comments

Comments
 (0)