~ubuntu-branches/ubuntu/maverick/libtorrent-rasterbar/maverick

« back to all changes in this revision

Viewing changes to include/libtorrent/asio/detail/service_base.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Cristian Greco
  • Date: 2008-07-02 10:46:21 UTC
  • Revision ID: james.westby@ubuntu.com-20080702104621-jzx3pfke9lkcxfxn
Tags: upstream-0.13.1
ImportĀ upstreamĀ versionĀ 0.13.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
//
 
10
 
 
11
#ifndef ASIO_DETAIL_SERVICE_BASE_HPP
 
12
#define ASIO_DETAIL_SERVICE_BASE_HPP
 
13
 
 
14
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
 
15
# pragma once
 
16
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
17
 
 
18
#include "asio/detail/push_options.hpp"
 
19
 
 
20
#include "asio/io_service.hpp"
 
21
#include "asio/detail/service_id.hpp"
 
22
 
 
23
namespace asio {
 
24
namespace detail {
 
25
 
 
26
// Special service base class to keep classes header-file only.
 
27
template <typename Type>
 
28
class service_base
 
29
  : public asio::io_service::service
 
30
{
 
31
public:
 
32
  static asio::detail::service_id<Type> id;
 
33
 
 
34
  // Constructor.
 
35
  service_base(asio::io_service& io_service)
 
36
    : asio::io_service::service(io_service)
 
37
  {
 
38
  }
 
39
};
 
40
 
 
41
template <typename Type>
 
42
asio::detail::service_id<Type> service_base<Type>::id;
 
43
 
 
44
} // namespace detail
 
45
} // namespace asio
 
46
 
 
47
#include "asio/detail/pop_options.hpp"
 
48
 
 
49
#endif // ASIO_DETAIL_SERVICE_BASE_HPP