79 IO_MODE io_mode = IO_MODE::READ_WRITE,
80 const std::map<String, String>& env = {},
81 std::function<void()> idle_callback =
nullptr);
87 IO_MODE io_mode = IO_MODE::READ_WRITE,
88 const std::map<String, String>& env = {},
89 std::function<void()> idle_callback =
nullptr);
A wrapper around boost::process to conveniently start an external program and forward its outputs.
Definition ExternalProcess.h:33
std::function< void(const String &)> callbackStdErr_
Definition ExternalProcess.h:93
ExternalProcess()
default Ctor; callbacks for stdout/stderr are empty
RETURNSTATE
result of calling an external executable
Definition ExternalProcess.h:37
void setCallbacks(std::function< void(const String &)> callbackStdOut, std::function< void(const String &)> callbackStdErr)
re-wire the callbacks used during run()
IO_MODE
Open mode for the process.
Definition ExternalProcess.h:46
RETURNSTATE run(const String &exe, const std::vector< String > &args, const String &working_dir, const bool verbose, String &error_msg, IO_MODE io_mode=IO_MODE::READ_WRITE, const std::map< String, String > &env={}, std::function< void()> idle_callback=nullptr)
Runs a program and calls the callback functions from time to time if output from the external program...
RETURNSTATE run(const String &exe, const std::vector< String > &args, const String &working_dir, const bool verbose, IO_MODE io_mode=IO_MODE::READ_WRITE, const std::map< String, String > &env={}, std::function< void()> idle_callback=nullptr)
Same as other overload, just without a returned error message.
ExternalProcess(std::function< void(const String &)> callbackStdOut, std::function< void(const String &)> callbackStdErr)
set the callback functions to process stdout and stderr output when the external process generates it
std::function< void(const String &)> callbackStdOut_
Definition ExternalProcess.h:92
A more convenient string class.
Definition String.h:32
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19