Skip to content

Commit 6c60378

Browse files
committed
Forgot to add modified quickbook files.
1 parent c840c9a commit 6c60378

File tree

7 files changed

+79
-42
lines changed

7 files changed

+79
-42
lines changed

libs/network/doc/architecture.qbk

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
[section:architecture Architecture]
1010
__cnl__ is built upon __boost_asio__, a high-quality, portable asynchronous I/O library that provides a solid interface for C++ network programming.
1111

12-
The architecture is driven by the requirement to separate requests from the transport mechanism. Additionally, it's possible to utilise templates and static mechanisms to make decisions at compile-time, resulting in more efficient and stable client code.
12+
The architecture is driven by the requirement to separate requests and responses from the transport mechanism. Additionally, it utilises generic programming techniques to make decisions at compile-time, resulting in more efficient and stable client code.
1313

14-
There are two main features of the architecture which use modern C++ techniques to allow extensibility without comprimising efficiency: tags and directives. These underly the design of the message.
14+
There are two main features of the architecture which use modern C++ techniques to allow extensibility without comprimising efficiency: tags and directives. It is these techniques that underpin the design of the message.
1515

1616
[include message.qbk]
1717
[include uri.qbk]

libs/network/doc/http.qbk

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[/
2-
(C) Copyright 2008, 2009 Glyn Matthews.
2+
(C) Copyright 2008, 2009, 2010 Glyn Matthews.
33
Distributed under the Boost Software License, Version 1.0.
44
(See accompanying file LICENSE_1_0.txt or copy at
55
http://www.boost.org/LICENSE_1_0.txt).
@@ -42,7 +42,7 @@ Before walking through exactly what is happening in this example, the principle
4242
typedef basic_request<tags::default_> request;
4343
}}}
4444

45-
The [^request] encapsulates information about the request and the resource.
45+
The [^request] encapsulates information about the request and the resource. It models the Message concept.
4646

4747
[heading HTTP Client]
4848

@@ -60,7 +60,7 @@ The [^client] encapsulates the connection-mapping logic between the domain and t
6060
typedef basic_response<tags::default_> response;
6161
}}}
6262

63-
The [^response] encapsulates the data received from the server.
63+
The [^response] encapsulates the data received from the server. It also models the Message concept.
6464

6565
[heading Walkthrough]
6666

@@ -117,4 +117,4 @@ This argument enables the caching of resolved endpoints and prevents the client
117117
[h5 [^http::client::follow_redirect(s)]]
118118
[^http::client::follow_redirects] / [^http::client::follow_redirect] follow HTTP redirect(s) (300..307) by looking at the "Location" header provided by the response(s); headers present in the original request are preserved in the subsequent request(s).
119119

120-
[endsect]
120+
[endsect] [/http]

libs/network/doc/intro.qbk

+11-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[/
2-
(C) Copyright 2009 Glyn Matthews.
2+
(C) Copyright 2009, 2010 Glyn Matthews.
33
Distributed under the Boost Software License, Version 1.0.
44
(See accompanying file LICENSE_1_0.txt or copy at
55
http://www.boost.org/LICENSE_1_0.txt).
@@ -9,14 +9,11 @@
99
[section:intro Introduction]
1010

1111
[section:motivation Motivation]
12-
Modern applications that communicate with the web have never been more prevalent, through a range of diverse areas from high performance servers to embedded systems such as smart phones or navigation systems. Such applications often have high performance or small memory footprint requirements for which C++ is the best language option. Currently, there are no network libraries available that use modern object-oriented techniques in C++. __libcurl__ and __mozilla_netlib__ are two widely used libraries in this domain but there are drawbacks to both:
12+
Modern applications that communicate over the internet have never been more prevalent, ranging through diverse areas such as high performance servers to embedded systems for smart phones or navigation systems.
1313

14-
* __libcurl__ suffers from poor design and inconsistent behavior in a threaded environment
15-
* __mozilla_netlib__ is too heavily coupled within the Mozilla architecture for practical use as a separate component
14+
Currently, there are no open source network libraries available that use modern object-oriented techniques in C++. With the introduction of __boost_asio__, developing portable network C++ applications has become a very much easier task. What is still lacking is a set of libraries that utilise __boost_asio__ in order to provide application level support so that C++ developers are able to develop internet and distributed applications more effectively.
1615

17-
With the development of __boost_asio__, developing portable network C++ applications has become a very much easier task. What is still lacking is a set of libraries that utilise __boost_asio__ in order to provide application level support so that C++ developers are able to develop internet and distributed applications more effectively.
18-
19-
[endsect]
16+
[endsect] [/motivation]
2017

2118
[section:objectives Objectives]
2219
The objectives of the __cnl__ are to:
@@ -31,6 +28,11 @@ While many languages provide direct library support for high level network progr
3128

3229
Eventually, __cnl__ will be extended to support many of the application layer protocols such as SMTP, FTP, SOAP, XMPP etc.
3330

34-
[endsect]
31+
[endsect] [/objectives]
32+
33+
[section:history History]
34+
The __cnl__ was founded by Dean Michael Berris in 2007. Initially it consisted of a message template and an HTTP client. It found a home on [[http://sourceforge.net/projects/cpp-netlib/][sourceforge]] but was recently migrated to [[http://github.com/mikhailberis/cpp-netlib][github]] where development is actively continued by a committed community.
35+
36+
[endsect] [/history]
3537

36-
[endsect]
38+
[endsect] [/intro]

libs/network/doc/message.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ template <
1111
>
1212
class basic_message {
1313
public:
14-
/*<< Defines a container for message headers >>*/
15-
typedef typename headers_container<Tag>::type headers_container_type;
1614
/*<< Defines the underlying string type, so that the message can
1715
be specialized for different text encodings >>*/
1816
typedef typename string<Tag>::type string_type;
17+
/*<< Defines a container for message headers >>*/
18+
typedef typename headers_container<Tag>::type headers_container_type;
1919

2020
/*<< Copy constructor >>*/
2121
basic_message(const basic_message &);

libs/network/doc/message.qbk

+45-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[/
2-
(C) Copyright 2008, 2009 Glyn Matthews.
2+
(C) Copyright 2008, 2009, 2010 Glyn Matthews.
33
Distributed under the Boost Software License, Version 1.0.
44
(See accompanying file LICENSE_1_0.txt or copy at
55
http://www.boost.org/LICENSE_1_0.txt).
@@ -33,13 +33,16 @@ The __cnl__ uses tag dispatching to specialize the message interface at compile
3333

3434
namespace boost {
3535
namespace network {
36-
typedef void tag_specialization_is_not_provided;
36+
template <
37+
class Tag
38+
>
39+
class unsupported_tag;
3740

3841
template <
3942
class Tag
4043
>
4144
struct string {
42-
typedef tag_specialization_is_not_provided type;
45+
typedef unsupported_tag<Tag> type;
4346
};
4447

4548
namespace tags {
@@ -61,24 +64,56 @@ This technique is extended to two more metafunctions that are used by __message_
6164
class Tag
6265
>
6366
struct ostringstream {
64-
typedef tag_specialization_is_not_provided type;
67+
typedef unsupported_tag<Tag> type;
6568
};
6669

6770
template <
6871
class Tag
6972
>
7073
struct headers_container {
71-
typedef tag_specialization_is_not_provided type;
74+
typedef unsupported_tag<Tag> type;
7275
};
7376
} // namespace network
7477
} // namespace boost
7578

76-
[endsect]
79+
[endsect] [/tag_dispatching]
7780

7881
[section:message_concepts Concepts]
7982
__message__ is [@http://www.boost.org/doc/html/DefaultConstructible.html DefaultConstructible], [@http://www.boost.org/doc/html/CopyConstructible.html CopyConstructible] and [@http://www.boost.org/doc/html/Assignable.html Assignable].
8083

81-
[endsect]
84+
[section:message_concept Message]
85+
86+
[heading Description]
87+
88+
A type models the URI Concept if the type adheres to the following
89+
usage semantics, and is DefaultConstructible and EqualityComparable.
90+
91+
[variablelist Notation
92+
[[`M`] [A Message Type.]]
93+
[[`m`, `m_`] [A Message Type instance.]]
94+
[[`S`] [A String Type.]]
95+
[[`s`] [A String Type instance.]]
96+
[[`O`] [An Ostringstream Type.]]
97+
[[`o`] [An Ostringstream Type instance.]]
98+
[[`C`] [A Header Container Type.]]
99+
[[`c`] [A Header Container Type instance.]]
100+
]
101+
102+
[heading Valid Expressions]
103+
104+
[table
105+
[[Expression] [Return Type] [Description]]
106+
[[`M m_(m);`] [] [M must be Copy constructible.]]
107+
[[`M m_; m_ = m;`] [] [M must be Assignable.]]
108+
[[`swap(m, m_);`] [void] [Swap should be availabe via ADL.]]
109+
[[`M::string_type`] [S] [M should have a nested type `string_type` of type `S`.]]
110+
[[`M::headers_container_type`] [C] [M should have a nested type `headers_container_type` of type `C`.]]
111+
]
112+
113+
114+
[endsect] [/message_concept]
115+
116+
[endsect] [/message_concepts]
82117

83118
[section:transformation_layer Transformation layer]
84119
The transformation layer defines the algorithms that can be applied on messages to transform parts or whole messages into different forms or representations. Transformations should apply to any type that models the Message concept. Functions in the transform layer take the form:
@@ -88,7 +123,7 @@ The transformation layer defines the algorithms that can be applied on messages
88123
>
89124
basic_message<Tag> &transform(basic_message<Tag> &, ...);
90125

91-
[endsect]
126+
[endsect] [/transformation_layer]
92127

93128
[section:rendering_layer Rendering layer]
94129
The rendering layer defines the algorithms used to render a message into different formats or types. Rendering functions should apply to any type that models the Message Concept. Functions in the rendering layer take the form:
@@ -98,6 +133,6 @@ The rendering layer defines the algorithms used to render a message into differe
98133
>
99134
unspecified &render(const basic_message<Tag> &, ...);
100135

101-
[endsect]
136+
[endsect] [/rendering_layer]
102137

103-
[endsect]
138+
[endsect] [/message]

libs/network/doc/network.qbk

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
[article C++ Network Library
99
[quickbook 1.4]
10-
[version 0.4]
10+
[version 0.5]
1111
[authors [Matthews, Glyn], [Berris, Dean Michael]]
12-
[copyright 2008, 2009 Glyn Matthews, Dean Michael Berris]
12+
[copyright 2008, 2009, 2010 Glyn Matthews, Dean Michael Berris]
1313
[purpose C++ library for general network programming]
1414
[category text]
1515
[license
@@ -37,7 +37,6 @@
3737
[def __quick_start__ quick start]
3838

3939

40-
4140
[include quick_start.qbk]
4241
[include intro.qbk]
4342
[include using.qbk]

libs/network/doc/uri.qbk

+13-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[/
2-
(C) Copyright 2009 Glyn Matthews.
2+
(C) Copyright 2009, 2010 Glyn Matthews.
33
2009 Dean Michael Berris.
44
Distributed under the Boost Software License, Version 1.0.
55
(See accompanying file LICENSE_1_0.txt or copy at
@@ -18,7 +18,7 @@ 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:concepts URI Concepts]
21+
[section:uri_concepts URI Concepts]
2222

2323
This page describes the URI Concepts implemented within cpp-netlib.
2424
The following concepts are also implemented as Boost.Concept_check
@@ -35,7 +35,7 @@ usage semantics, and is DefaultConstructible and EqualityComparable.
3535

3636
[variablelist Notation
3737
[[`U`] [A URI Type.]]
38-
[[`u`,`u_`] [A URI Type instance.]]
38+
[[`u`, `u_`] [A URI Type instance.]]
3939
[[`S`] [A String Type.]]
4040
[[`s`] [A String Type instance.]]
4141
]
@@ -45,14 +45,15 @@ usage semantics, and is DefaultConstructible and EqualityComparable.
4545
For any URI, the following expressions must be valid:
4646

4747
[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`.]]
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`.]]
5657
]
5758

5859
[endsect] [/uri_concept]
@@ -85,7 +86,7 @@ For any HTTP URI, the following expressions must be valid:
8586

8687
[endsect] [/http_uri]
8788

88-
[endsect] [/concepts]
89+
[endsect] [/uri_concepts]
8990

9091
[endsect] [/uri]
9192

0 commit comments

Comments
 (0)