fix doc example typo
[boost.git] / boost / asio / detail / service_base.hpp
blobf01cdaf59a1353974433767d0014df725e82fed0
1 //
2 // service_base.hpp
3 // ~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6 //
7 // Distributed under the Boost Software License, Version 1.0. (See accompanying
8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 //
11 #ifndef BOOST_ASIO_DETAIL_SERVICE_BASE_HPP
12 #define BOOST_ASIO_DETAIL_SERVICE_BASE_HPP
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 # pragma once
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
18 #include <boost/asio/detail/push_options.hpp>
20 #include <boost/asio/io_service.hpp>
21 #include <boost/asio/detail/service_id.hpp>
23 namespace boost {
24 namespace asio {
25 namespace detail {
27 // Special service base class to keep classes header-file only.
28 template <typename Type>
29 class service_base
30 : public boost::asio::io_service::service
32 public:
33 static boost::asio::detail::service_id<Type> id;
35 // Constructor.
36 service_base(boost::asio::io_service& io_service)
37 : boost::asio::io_service::service(io_service)
42 template <typename Type>
43 boost::asio::detail::service_id<Type> service_base<Type>::id;
45 } // namespace detail
46 } // namespace asio
47 } // namespace boost
49 #include <boost/asio/detail/pop_options.hpp>
51 #endif // BOOST_ASIO_DETAIL_SERVICE_BASE_HPP