...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
A handle service must meet the requirements for an I/O object service, as well as the additional requirements listed below.
In the table below, X
denotes
a handle service class, a
denotes a value of type X
,
b
denotes a value of type
X::implementation_type
, n
denotes a value of type X::native_type
,
ec
denotes a value of type
error_code
, and u
and v
denote identifiers.
Table 14. HandleService requirements
expression |
return type |
assertion/note |
---|---|---|
|
|
The implementation-defined native representation of a handle. Must
satisfy the requirements of |
|
|
From IoObjectService
requirements. |
|
|
From IoObjectService
requirements. Implicitly cancels asynchronous operations, as if by
calling |
a.assign(b, n, ec);
|
|
pre: |
a.is_open(b);
|
|
|
const X& u = a; const X::implementation_type& v = b; u.is_open(v);
|
|
|
a.close(b, ec);
|
|
If |
a.native(b);
|
|
|
a.cancel(b, ec);
|
|
pre: |