summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/asio/src/doc/requirements/IoObjectService.qbk
blob: 3d3ccc0fb6129394ecacd8d84afea12f6246f744 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
[/
 / Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 /
 / Distributed under the Boost Software License, Version 1.0. (See accompanying
 / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 /]

[section:IoObjectService I/O object service requirements]

An I/O object service must meet the requirements for a [link
asio.reference.Service service], as well as the requirements listed
below.

In the table below, `X` denotes an I/O object service class, `a` and `ao` denote
values of type `X`, `b` and `c` denote values of type `X::implementation_type`,
and `u` denotes an identifier.

[table IoObjectService requirements
  [[expression] [return type] [assertion/note\npre/post-condition]]
  [
    [`X::implementation_type`]
    []
    []
  ]
  [
    [`X::implementation_type u;`]
    []
    [note: `X::implementation_type` has a public default constructor and
     destructor.]
  ]
  [
    [``
      a.construct(b);
    ``]
    []
    []
  ]
  [
    [``
      a.destroy(b);
    ``]
    []
    [note: `destroy()` will only be called on a value that has previously been
     initialised with `construct()` or `move_construct()`.]
  ]
  [
    [``
      a.move_construct(b, c);
    ``]
    []
    [note: only required for I/O objects that support movability.]
  ]
  [
    [``
      a.move_assign(b, ao, c);
    ``]
    []
    [note: only required for I/O objects that support movability.]
  ]
]

[endsect]