• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2006, 2007 Julio M. Merino Vidal
2 // Copyright (c) 2008 Ilya Sokolov, Boris Schaeling
3 // Copyright (c) 2009 Boris Schaeling
4 // Copyright (c) 2010 Felipe Tanus, Boris Schaeling
5 // Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling
6 // Copyright (c) 2016 Klemens D. Morgenstern
7 //
8 // Distributed under the Boost Software License, Version 1.0. (See accompanying
9 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
10 
11 #ifndef BOOST_PROCESS_DETAIL_HANDLER_BASE_HPP
12 #define BOOST_PROCESS_DETAIL_HANDLER_BASE_HPP
13 
14 #include <system_error>
15 
16 namespace boost { namespace process { namespace detail {
17 
18 template<template <class> class Template>
19 struct make_handler_t
20 {
make_handler_tboost::process::detail::make_handler_t21     constexpr make_handler_t() {}
22     template<typename Handler>
operator ()boost::process::detail::make_handler_t23     constexpr Template<Handler> operator()(Handler handler) const {return Template<Handler>(handler);}
24     template<typename Handler>
operator =boost::process::detail::make_handler_t25     constexpr Template<Handler> operator= (Handler handler) const {return Template<Handler>(handler);}
26     template<typename Handler>
operator +=boost::process::detail::make_handler_t27     constexpr Template<Handler> operator+=(Handler handler) const {return Template<Handler>(handler);}
28 };
29 
30 
31 struct handler_base
32 {
33     using resource_type = void;
34 
35     template <class Executor>
on_setupboost::process::detail::handler_base36     void on_setup(Executor&) const {}
37 
38     template <class Executor>
on_errorboost::process::detail::handler_base39     void on_error(Executor&, const std::error_code &) const {}
40 
41     template <class Executor>
on_successboost::process::detail::handler_base42     void on_success(Executor&) const {}
43 
44 };
45 
46 
47 }}}
48 
49 #endif
50