Imported Upstream version 1.57.0
[platform/upstream/boost.git] / libs / asio / doc / requirements / SignalSetService.qbk
1 [/
2  / Copyright (c) 2003-2014 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:SignalSetService Signal set service requirements]
9
10 A signal set service must meet the requirements for an [link
11 boost_asio.reference.IoObjectService I/O object service], as well as the
12 additional requirements listed below.
13
14 In the table below, `X` denotes a signal set service class, `a` denotes a value
15 of type `X`, `b` denotes a value of type `X::implementation_type`, `ec` denotes
16 a value of type `error_code`, `n` denotes a value of type `int`, and `sh`
17 denotes a value meeting [link boost_asio.reference.SignalHandler `SignalHandler`]
18 requirements.
19
20 [table SignalSetService requirements
21   [[expression] [return type] [assertion/note\npre/post-condition]]
22   [
23     [`a.construct(b);`]
24     []
25     [
26       From [link boost_asio.reference.IoObjectService IoObjectService]
27       requirements.\n
28     ]
29   ]
30   [
31     [`a.destroy(b);`]
32     []
33     [
34       From [link boost_asio.reference.IoObjectService IoObjectService]
35       requirements. Implicitly clears the registered signals as if by calling
36       `a.clear(b, ec)`, then implicitly cancels outstanding asynchronous
37       operations as if by calling `a.cancel(b, ec)`.
38     ]
39   ]
40   [
41     [``
42       a.add(b, n, ec);
43     ``]
44     [`error_code`]
45     [
46     ]
47   ]
48   [
49     [``
50       a.remove(b, n, ec);
51     ``]
52     [`error_code`]
53     [
54     ]
55   ]
56   [
57     [``
58       a.clear(b, ec);
59     ``]
60     [`error_code`]
61     [
62     ]
63   ]
64   [
65     [``
66       a.cancel(b, ec);
67     ``]
68     [`error_code`]
69     [
70     ]
71   ]
72   [
73     [`a.async_wait(b, sh);`]
74     [`void`]
75     [
76       pre: `a.is_open(b)`.\n
77       \n
78       Initiates an asynchronous operation to wait for the delivery of one of the
79       signals registered for the signal set `b`. The operation is performed via
80       the `io_service` object `a.get_io_service()` and behaves according to
81       [link boost_asio.reference.asynchronous_operations asynchronous operation]
82       requirements.\n
83       \n
84       If the operation completes successfully, the `SignalHandler` object
85       `sh` is invoked with the number identifying the delivered signal. Otherwise
86       it is invoked with `0`.
87     ]
88   ]
89 ]
90
91 [endsect]