service_base.hpp
Go to the documentation of this file.
00001 //
00002 // service_base.hpp
00003 // ~~~~~~~~~~~~~~~~
00004 //
00005 // Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com)
00006 //
00007 // Distributed under the Boost Software License, Version 1.0. (See accompanying
00008 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
00009 //
00010 
00011 #ifndef ASIO_DETAIL_SERVICE_BASE_HPP
00012 #define ASIO_DETAIL_SERVICE_BASE_HPP
00013 
00014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
00015 # pragma once
00016 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
00017 
00018 #include "asio/detail/push_options.hpp"
00019 
00020 #include "asio/io_service.hpp"
00021 #include "asio/detail/service_id.hpp"
00022 
00023 namespace asio {
00024 namespace detail {
00025 
00026 // Special service base class to keep classes header-file only.
00027 template <typename Type>
00028 class service_base
00029   : public asio::io_service::service
00030 {
00031 public:
00032   static asio::detail::service_id<Type> id;
00033 
00034   // Constructor.
00035   service_base(asio::io_service& io_service)
00036     : asio::io_service::service(io_service)
00037   {
00038   }
00039 };
00040 
00041 template <typename Type>
00042 asio::detail::service_id<Type> service_base<Type>::id;
00043 
00044 } // namespace detail
00045 } // namespace asio
00046 
00047 #include "asio/detail/pop_options.hpp"
00048 
00049 #endif // ASIO_DETAIL_SERVICE_BASE_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Castor
Author(s): Carpe Noctem
autogenerated on Fri Nov 8 2013 11:05:39