File indexing completed on 2025-04-10 08:42:58
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_PROCESS_DETAIL_CMD_LINE_HPP
0012 #define BOOST_PROCESS_DETAIL_CMD_LINE_HPP
0013
0014 #include <boost/winapi/config.hpp>
0015 #include <boost/process/v1/detail/config.hpp>
0016 #include <boost/process/v1/detail/handler_base.hpp>
0017 #include <boost/process/v1/detail/traits/cmd_or_exe.hpp>
0018 #include <boost/process/v1/detail/traits/wchar_t.hpp>
0019
0020 #if defined(BOOST_POSIX_API)
0021 #include <boost/process/v1/detail/posix/cmd.hpp>
0022 #elif defined(BOOST_WINDOWS_API)
0023 #include <boost/process/v1/detail/windows/cmd.hpp>
0024 #endif
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041 namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail {
0042
0043
0044 struct cmd_
0045 {
0046 constexpr cmd_() = default;
0047
0048 template<typename Char>
0049 inline api::cmd_setter_<Char> operator()(const Char *s) const
0050 { return api::cmd_setter_<Char>(s);
0051 }
0052 template<typename Char>
0053 inline api::cmd_setter_<Char> operator= (const Char *s) const
0054 {
0055 return api::cmd_setter_<Char>(s);
0056 }
0057
0058 template<typename Char>
0059 inline api::cmd_setter_<Char> operator()(const std::basic_string<Char> &s) const
0060 {
0061 return api::cmd_setter_<Char>(s);
0062 }
0063 template<typename Char>
0064 inline api::cmd_setter_<Char> operator= (const std::basic_string<Char> &s) const
0065 {
0066 return api::cmd_setter_<Char>(s);
0067 }
0068 };
0069
0070 template<> struct is_wchar_t<api::cmd_setter_<wchar_t>> : std::true_type {};
0071
0072
0073
0074 template<>
0075 struct char_converter<char, api::cmd_setter_<wchar_t>>
0076 {
0077 static api::cmd_setter_<char> conv(const api::cmd_setter_<wchar_t> & in)
0078 {
0079 return { ::boost::process::v1::detail::convert(in.str()) };
0080 }
0081 };
0082
0083 template<>
0084 struct char_converter<wchar_t, api::cmd_setter_<char>>
0085 {
0086 static api::cmd_setter_<wchar_t> conv(const api::cmd_setter_<char> & in)
0087 {
0088 return { ::boost::process::v1::detail::convert(in.str()) };
0089 }
0090 };
0091
0092
0093
0094
0095
0096
0097 }
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117 constexpr static ::boost::process::v1::detail::cmd_ cmd;
0118
0119 }}}
0120
0121 #endif