...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
A descriptor 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 descriptor 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
, i
denotes a value meeting IoControlCommand
requirements, and
u
and v
denote identifiers.
Table 9. DescriptorService requirements
expression |
return type |
assertion/note |
---|---|---|
|
|
The implementation-defined native representation of a descriptor. 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: |
a.io_control(b, i, ec);
|
|
pre: |