Skip to content

Commit 0106771

Browse files
committed
Added appendices, moved concept docs here.
1 parent bf60c4e commit 0106771

File tree

7 files changed

+129
-115
lines changed

7 files changed

+129
-115
lines changed

libs/network/doc/appendices.qbk

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
[/
2+
(C) Copyright 2010 Glyn Matthews.
3+
Distributed under the Boost Software License, Version 1.0.
4+
(See accompanying file LICENSE_1_0.txt or copy at
5+
http://www.boost.org/LICENSE_1_0.txt).
6+
]
7+
8+
[section:appendix_1 Appendix 1: Message Concepts]
9+
10+
[section:message_concept Message]
11+
12+
__message__ is
13+
[@http://www.boost.org/doc/html/DefaultConstructible.html
14+
DefaultConstructible],
15+
[@http://www.boost.org/doc/html/CopyConstructible.html
16+
CopyConstructible] and [@http://www.boost.org/doc/html/Assignable.html
17+
Assignable].
18+
19+
[heading Description]
20+
21+
A type models the URI Concept if the type adheres to the following
22+
usage semantics, and is DefaultConstructible and EqualityComparable.
23+
24+
[variablelist Notation
25+
[[`M`] [A Message Type.]]
26+
[[`m`, `m_`] [A Message Type instance.]]
27+
[[`S`] [A String Type.]]
28+
[[`s`] [A String Type instance.]]
29+
[[`O`] [An Ostringstream Type.]]
30+
[[`o`] [An Ostringstream Type instance.]]
31+
[[`C`] [A Header Container Type.]]
32+
[[`c`] [A Header Container Type instance.]]
33+
]
34+
35+
[heading Valid Expressions]
36+
37+
[table
38+
[[Expression] [Return Type] [Description]]
39+
[[`M m_(m);`] [] [M must be Copy constructible.]]
40+
[[`M m_; m_ = m;`] [] [M must be Assignable.]]
41+
[[`swap(m, m_);`] [void] [Swap should be availabe via ADL.]]
42+
[[`M::string_type`] [S] [M should have a nested type `string_type` of type `S`.]]
43+
[[`M::headers_container_type`] [C] [M should have a nested type `headers_container_type` of type `C`.]]
44+
]
45+
46+
47+
[endsect] [/message_concept]
48+
49+
[endsect] [/appendix_1]
50+
51+
[section:appendix_2 Appendix 2: URI Concepts]
52+
53+
This page describes the URI Concepts implemented within cpp-netlib.
54+
The following concepts are also implemented as Boost.Concept_check
55+
types enforced by the URI library.
56+
57+
URI Concepts are organized into a hierarchy of conepts.
58+
59+
[section:uri_concept URI]
60+
61+
[heading Description]
62+
63+
A type models the URI Concept if the type adheres to the following
64+
usage semantics, and is DefaultConstructible and EqualityComparable.
65+
66+
[variablelist Notation
67+
[[`U`] [A URI Type.]]
68+
[[`u`, `u_`] [A URI Type instance.]]
69+
[[`S`] [A String Type.]]
70+
[[`s`] [A String Type instance.]]
71+
]
72+
73+
[heading Valid Expressions]
74+
75+
For any URI, the following expressions must be valid:
76+
77+
[table
78+
[[Expression] [Return Type] [Description]]
79+
[[`U u_(u)`;] [] [U must be Copy constructible.]]
80+
[[`U u_; u_ = u;`] [] [U must be Assignable.]]
81+
[[`U u_(s)`;] [] [U can be constructed from a string `s`.]]
82+
[[`swap(u, u_);`] [void] [Swap should be availabe via ADL.]]
83+
[[`protocol(u);`] [S] [Return the protocol part of the URI.]]
84+
[[`rest(u);`] [S] [Return the rest of the URI, excluding the protocol part.]]
85+
[[`valid(u);`] [bool] [Return true whether the URI is a valid URI.]]
86+
[[`U::string_type`] [S] [U should have a nested type `string_type` of type `S`.]]
87+
]
88+
89+
[endsect] [/uri_concept]
90+
91+
[section:http_uri HTTP URI]
92+
93+
A type models the HTTP URI Concept if the type adheres to the following
94+
usage semantics, and if the type also models the URI Concept.
95+
96+
[variablelist Notation
97+
[[`H`] [An HTTP URI Type.]]
98+
[[`h`,`h_`] [An HTTP URI Type instance.]]
99+
[[`S`] [A String Type.]]
100+
[[`s`] [A String Type instance.]]
101+
]
102+
103+
[heading Valid Expressions]
104+
105+
For any HTTP URI, the following expressions must be valid:
106+
107+
[table
108+
[[Expression] [Return Type] [Description]]
109+
[[`user_info(h)`] [S] [Retrieve the user-info part of the HTTP URI.]]
110+
[[`host(h)`] [S] [Retrieve the host part of the HTTP URI.]]
111+
[[`port(h)`] [uint16_t] [Retrieve the port part of the HTTP URI.]]
112+
[[`path(h)`] [S] [Retrieve the path part of the HTTP URI.]]
113+
[[`query(h)`] [S] [Retrieve the query part of the HTTP URI.]]
114+
[[`fragment(h)`][S] [Retrieve the fragment part of the HTTP URI.]]
115+
]
116+
117+
[endsect] [/http_uri]
118+
119+
[endsect] [/appendix_2]

libs/network/doc/architecture.qbk

-1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,4 @@ of the message.
2424
[include message.qbk]
2525
[include uri.qbk]
2626

27-
2827
[endsect]

libs/network/doc/contributors.qbk

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[/
2+
(C) Copyright 2010 Glyn Matthews.
3+
Distributed under the Boost Software License, Version 1.0.
4+
(See accompanying file LICENSE_1_0.txt or copy at
5+
http://www.boost.org/LICENSE_1_0.txt).
6+
]
7+

libs/network/doc/intro.qbk

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ application layer protocols such as SMTP, FTP, SOAP, XMPP etc.
5454
[section:history History]
5555
The __cnl__ was founded by Dean Michael Berris in 2007. Initially it
5656
consisted of a message template and an HTTP client. It found a home
57-
on __sf_cpp_netlib__ but was recently migrated to __github__ where
58-
development is actively continued by a committed community.
57+
on __sf_cpp_netlib__ but was migrated at the end of 2009 to __github__
58+
where development is actively continued by a committed community.
5959

6060
[endsect] [/history]
6161

libs/network/doc/message.qbk

-42
Original file line numberDiff line numberDiff line change
@@ -90,48 +90,6 @@ __message__:
9090

9191
[endsect] [/tag_dispatching]
9292

93-
[section:message_concepts Concepts]
94-
__message__ is
95-
[@http://www.boost.org/doc/html/DefaultConstructible.html
96-
DefaultConstructible],
97-
[@http://www.boost.org/doc/html/CopyConstructible.html
98-
CopyConstructible] and [@http://www.boost.org/doc/html/Assignable.html
99-
Assignable].
100-
101-
[section:message_concept Message]
102-
103-
[heading Description]
104-
105-
A type models the URI Concept if the type adheres to the following
106-
usage semantics, and is DefaultConstructible and EqualityComparable.
107-
108-
[variablelist Notation
109-
[[`M`] [A Message Type.]]
110-
[[`m`, `m_`] [A Message Type instance.]]
111-
[[`S`] [A String Type.]]
112-
[[`s`] [A String Type instance.]]
113-
[[`O`] [An Ostringstream Type.]]
114-
[[`o`] [An Ostringstream Type instance.]]
115-
[[`C`] [A Header Container Type.]]
116-
[[`c`] [A Header Container Type instance.]]
117-
]
118-
119-
[heading Valid Expressions]
120-
121-
[table
122-
[[Expression] [Return Type] [Description]]
123-
[[`M m_(m);`] [] [M must be Copy constructible.]]
124-
[[`M m_; m_ = m;`] [] [M must be Assignable.]]
125-
[[`swap(m, m_);`] [void] [Swap should be availabe via ADL.]]
126-
[[`M::string_type`] [S] [M should have a nested type `string_type` of type `S`.]]
127-
[[`M::headers_container_type`] [C] [M should have a nested type `headers_container_type` of type `C`.]]
128-
]
129-
130-
131-
[endsect] [/message_concept]
132-
133-
[endsect] [/message_concepts]
134-
13593
[section:transformation_layer Transformation layer]
13694
The transformation layer defines the algorithms that can be applied on
13795
messages to transform parts or whole messages into different forms or

libs/network/doc/network.qbk

+1
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@
4747
[include examples.qbk]
4848
[include reference.qbk]
4949
[include acknowledgements.qbk]
50+
[include appendices.qbk]

libs/network/doc/uri.qbk

-70
Original file line numberDiff line numberDiff line change
@@ -18,75 +18,5 @@ only parsers the scheme and leaves the scheme specific part as is,
1818
as well as a very liberal HTTP URI parser. The HTTP URI object only
1919
supports absolute URIs that start with either 'http' or 'https'.
2020

21-
[section:uri_concepts URI Concepts]
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-
29-
[section:uri_concept URI]
30-
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_; u_ = u;`] [] [U must be Assignable.]]
51-
[[`U u_(s)`;] [] [U can be constructed from a string `s`.]]
52-
[[`swap(u, u_);`] [void] [Swap should be availabe via ADL.]]
53-
[[`protocol(u);`] [S] [Return the protocol part of the URI.]]
54-
[[`rest(u);`] [S] [Return the rest of the URI, excluding the protocol part.]]
55-
[[`valid(u);`] [bool] [Return true whether the URI is a valid URI.]]
56-
[[`U::string_type`] [S] [U should have a nested type `string_type` of type `S`.]]
57-
]
58-
59-
[endsect] [/uri_concept]
60-
61-
[section:http_uri HTTP URI]
62-
63-
A type models the HTTP URI Concept if the type adheres to the following
64-
usage semantics, and if the type also models the URI Concept.
65-
66-
[variablelist Notation
67-
[[`H`] [An HTTP URI Type.]]
68-
[[`h`,`h_`] [An HTTP URI Type instance.]]
69-
[[`S`] [A String Type.]]
70-
[[`s`] [A String Type instance.]]
71-
]
72-
73-
[heading Valid Expressions]
74-
75-
For any HTTP URI, the following expressions must be valid:
76-
77-
[table
78-
[[Expression] [Return Type] [Description]]
79-
[[`user_info(h)`] [S] [Retrieve the user-info part of the HTTP URI.]]
80-
[[`host(h)`] [S] [Retrieve the host part of the HTTP URI.]]
81-
[[`port(h)`] [uint16_t] [Retrieve the port part of the HTTP URI.]]
82-
[[`path(h)`] [S] [Retrieve the path part of the HTTP URI.]]
83-
[[`query(h)`] [S] [Retrieve the query part of the HTTP URI.]]
84-
[[`fragment(h)`][S] [Retrieve the fragment part of the HTTP URI.]]
85-
]
86-
87-
[endsect] [/http_uri]
88-
89-
[endsect] [/uri_concepts]
90-
9121
[endsect] [/uri]
9222

0 commit comments

Comments
 (0)