Sha256: 8f8fa99a6cafd3d36eb30d8cc03be33e655874be82d0a108e3af190e6b7b39b9

Contents?: true

Size: 1.57 KB

Versions: 24

Compression:

Stored size: 1.57 KB

Contents

[/
 / Copyright (c) 2003-2020 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:Service Service requirements]

A class is a ['service] if it is publicly and unambiguously derived from
`execution_context::service`, or if it is publicly and unambiguously derived
from another service. For a service `S`, `S::key_type` shall be valid and
denote a type (C++Std [temp.deduct]), `is_base_of_v<typename S::key_type, S>`
shall be `true`, and `S` shall satisfy the `Destructible` requirements (C++Std
[destructible]).

The first parameter of all service constructors shall be an lvalue reference to
`execution_context`. This parameter denotes the `execution_context` object that
represents a set of services, of which the service object will be a member.
[inline_note These constructors may be called by the `make_service` function.]

A service shall provide an explicit constructor with a single parameter of
lvalue reference to `execution_context`. [inline_note This constructor may be
called by the `use_service` function.]

  class my_service : public execution_context::service
  {
  public:
    typedef my_service key_type;
    explicit my_service(execution_context& ctx);
    my_service(execution_context& ctx, int some_value);
  private:
    virtual void shutdown() noexcept override;
    ...
  };

A service's `shutdown` member function shall destroy all copies of user-defined
function objects that are held by the service.

[endsect]

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
couchbase-3.0.0-universal-darwin-19 ext/third_party/asio/asio/src/doc/requirements/Service.qbk
couchbase-3.0.0 ext/third_party/asio/asio/src/doc/requirements/Service.qbk
couchbase-3.0.0.beta.1-universal-darwin-19 ext/third_party/asio/asio/src/doc/requirements/Service.qbk
couchbase-3.0.0.beta.1 ext/third_party/asio/asio/src/doc/requirements/Service.qbk
couchbase-3.0.0.alpha.5-x86_64-linux ext/third_party/asio/asio/src/doc/requirements/Service.qbk
couchbase-3.0.0.alpha.5-universal-darwin-19 ext/third_party/asio/asio/src/doc/requirements/Service.qbk
couchbase-3.0.0.alpha.5-x86_64-darwin-19 ext/third_party/asio/asio/src/doc/requirements/Service.qbk
couchbase-3.0.0.alpha.5 ext/third_party/asio/asio/src/doc/requirements/Service.qbk
couchbase-3.0.0.alpha.4-x86_64-linux ext/third_party/asio/asio/src/doc/requirements/Service.qbk
couchbase-3.0.0.alpha.4-x86_64-darwin-19 ext/third_party/asio/asio/src/doc/requirements/Service.qbk
couchbase-3.0.0.alpha.4-universal-darwin-19 ext/third_party/asio/asio/src/doc/requirements/Service.qbk
couchbase-3.0.0.alpha.4 ext/third_party/asio/asio/src/doc/requirements/Service.qbk
couchbase-3.0.0.alpha.3-x86_64-linux ext/third_party/asio/asio/src/doc/requirements/Service.qbk
couchbase-3.0.0.alpha.3-x86_64-darwin-19 ext/third_party/asio/asio/src/doc/requirements/Service.qbk
couchbase-3.0.0.alpha.3-universal-darwin-19 ext/third_party/asio/asio/src/doc/requirements/Service.qbk
couchbase-3.0.0.alpha.3 ext/third_party/asio/asio/src/doc/requirements/Service.qbk
couchbase-3.0.0.alpha.2-x86_64-linux ext/third_party/asio/asio/src/doc/requirements/Service.qbk
couchbase-3.0.0.alpha.2-x86_64-darwin-19 ext/third_party/asio/asio/src/doc/requirements/Service.qbk
couchbase-3.0.0.alpha.2-universal-darwin-19 ext/third_party/asio/asio/src/doc/requirements/Service.qbk
couchbase-3.0.0.alpha.2 ext/third_party/asio/asio/src/doc/requirements/Service.qbk