1 // Copyright (c) 2016 Klemens D. Morgenstern 2 // 3 // Distributed under the Boost Software License, Version 1.0. (See accompanying 4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 6 7 #ifndef BOOST_PROCESS_WINDOWS_CMD_HPP_ 8 #define BOOST_PROCESS_WINDOWS_CMD_HPP_ 9 10 #include <string> 11 12 namespace boost 13 { 14 namespace process 15 { 16 namespace detail 17 { 18 namespace windows 19 { 20 21 template<typename CharType> 22 struct cmd_setter_ : ::boost::process::detail::handler_base 23 { 24 typedef CharType value_type; 25 typedef std::basic_string<value_type> string_type; 26 cmd_setter_boost::process::detail::windows::cmd_setter_27 cmd_setter_(string_type && cmd_line) : _cmd_line(std::move(cmd_line)) {} cmd_setter_boost::process::detail::windows::cmd_setter_28 cmd_setter_(const string_type & cmd_line) : _cmd_line(cmd_line) {} 29 template <class Executor> on_setupboost::process::detail::windows::cmd_setter_30 void on_setup(Executor& exec) 31 { 32 exec.cmd_line = _cmd_line.c_str(); 33 } strboost::process::detail::windows::cmd_setter_34 const string_type & str() const {return _cmd_line;} 35 36 private: 37 string_type _cmd_line; 38 }; 39 40 } 41 42 43 } 44 } 45 } 46 47 48 49 #endif /* INCLUDE_BOOST_PROCESS_WINDOWS_ARGS_HPP_ */ 50