/usr/include/boost/process
Edit: /usr/include/boost/process/cmd.hpp (3072B)
// Copyright (c) 2006, 2007 Julio M. Merino Vidal
// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling
// Copyright (c) 2009 Boris Schaeling
// Copyright (c) 2010 Felipe Tanus, Boris Schaeling
// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling
// Copyright (c) 2016 Klemens D. Morgenstern
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_PROCESS_DETAIL_CMD_LINE_HPP
#define BOOST_PROCESS_DETAIL_CMD_LINE_HPP
#include
#include
#include
#include
#include
#if defined(BOOST_POSIX_API)
#include
#elif defined(BOOST_WINDOWS_API)
#include
#endif
/** \file boost/process/cmd.hpp
*
* This header provides the \xmlonly cmd\endxmlonly property.
*
\xmlonly
namespace boost {
namespace process {
unspecified cmd;
}
}
\endxmlonly
*/
namespace boost { namespace process { namespace detail {
struct cmd_
{
constexpr cmd_() = default;
template
inline api::cmd_setter_ operator()(const Char *s) const
{
return api::cmd_setter_(s);
}
template
inline api::cmd_setter_ operator= (const Char *s) const
{
return api::cmd_setter_(s);
}
template
inline api::cmd_setter_ operator()(const std::basic_string &s) const
{
return api::cmd_setter_(s);
}
template
inline api::cmd_setter_ operator= (const std::basic_string &s) const
{
return api::cmd_setter_(s);
}
};
template<> struct is_wchar_t> : std::true_type {};
template<>
struct char_converter>
{
static api::cmd_setter_ conv(const api::cmd_setter_ & in)
{
return { ::boost::process::detail::convert(in.str()) };
}
};
template<>
struct char_converter>
{
static api::cmd_setter_ conv(const api::cmd_setter_ & in)
{
return { ::boost::process::detail::convert(in.str()) };
}
};
}
/** The cmd property allows to explicitly set commands for the execution.
The overload form applies when only one string is passed to a launching function.
The string will be internally parsed and split at spaces.
The following expressions are valid, with `value` being either a C-String or
a `std::basic_string` with `char` or `wchar_t`.
\code{.cpp}
cmd="value";
cmd(value);
\endcode
The property can only be used for assignments.
*/
constexpr static ::boost::process::detail::cmd_ cmd;
}}
#endif