]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/asio/doc/requirements/Service.qbk
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / asio / doc / requirements / Service.qbk
CommitLineData
7c673cae
FG
1[/
2 / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
3 /
4 / Distributed under the Boost Software License, Version 1.0. (See accompanying
5 / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 /]
7
8[section:Service Service requirements]
9
10A class is a service if it is publicly derived from another service, or if it
11is a class derived from `io_service::service` and contains a
12publicly-accessible declaration as follows:
13
14 static io_service::id id;
15
16All services define a one-argument constructor that takes a reference to the
17`io_service` object that owns the service. This constructor is /explicit/,
18preventing its participation in automatic conversions. For example:
19
20 class my_service : public io_service::service
21 {
22 public:
23 static io_service::id id;
24 explicit my_service(io_service& ios);
25 private:
26 virtual void shutdown_service();
27 ...
28 };
29
30A service's `shutdown_service` member function must cause all copies of
31user-defined handler objects that are held by the service to be destroyed.
32
33[endsect]