◆ AsyncProcessResultImplementation() [1/3]
| Acore::AsyncProcessResultImplementation::AsyncProcessResultImplementation |
( |
std::string |
executable_, |
|
|
std::vector< std::string > |
args_, |
|
|
std::string |
logger_, |
|
|
std::string |
input_file_, |
|
|
bool |
secure |
|
) |
| |
|
inlineexplicit |
std::vector< std::string > const args
Definition StartProcess.cpp:205
std::string const input_file
Definition StartProcess.cpp:207
bool const is_secure
Definition StartProcess.cpp:208
std::string const logger
Definition StartProcess.cpp:206
std::string const executable
Definition StartProcess.cpp:204
std::atomic< bool > was_terminated
Definition StartProcess.cpp:210
◆ AsyncProcessResultImplementation() [2/3]
◆ AsyncProcessResultImplementation() [3/3]
◆ GetFutureResult()
| std::future< int > & Acore::AsyncProcessResultImplementation::GetFutureResult |
( |
| ) |
|
|
inlineoverridevirtual |
Returns the future which contains the result of the process as soon it is finished.
Implements Acore::AsyncProcessResult.
261 {
264 }
#define ASSERT
Definition Errors.h:68
Optional< std::shared_ptr< std::future< int > > > result
Definition StartProcess.cpp:212
References ASSERT, and result.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ SetFuture()
| void Acore::AsyncProcessResultImplementation::SetFuture |
( |
std::future< int > |
result_ | ) |
|
|
inline |
254 {
255 result = std::make_shared<std::future<int>>(std::move(result_));
256 }
References result.
◆ StartProcess()
| int Acore::AsyncProcessResultImplementation::StartProcess |
( |
| ) |
|
|
inline |
229 {
231
233 {
234 int exitCode;
235 my_child = std::reference_wrapper<child>(c);
236
237 try
238 {
239 c.wait();
240 exitCode = c.exit_code();
241 }
242 catch (...)
243 {
244 exitCode = EXIT_FAILURE;
245 }
246
249
251 }
Optional< std::reference_wrapper< child > > my_child
Definition StartProcess.cpp:213
static int CreateChildProcess(T waiter, std::string const &executable, std::vector< std::string > const &argsVector, std::string const &logger, std::string const &input, bool secure)
Definition StartProcess.cpp:76
References args, ASSERT, Acore::CreateChildProcess(), executable, input_file, is_secure, logger, my_child, and was_terminated.
◆ Terminate()
| void Acore::AsyncProcessResultImplementation::Terminate |
( |
| ) |
|
|
inlineoverridevirtual |
◆ args
| std::vector<std::string> const Acore::AsyncProcessResultImplementation::args |
|
private |
◆ executable
| std::string const Acore::AsyncProcessResultImplementation::executable |
|
private |
◆ input_file
| std::string const Acore::AsyncProcessResultImplementation::input_file |
|
private |
◆ is_secure
| bool const Acore::AsyncProcessResultImplementation::is_secure |
|
private |
◆ logger
| std::string const Acore::AsyncProcessResultImplementation::logger |
|
private |
◆ my_child
| Optional<std::reference_wrapper<child> > Acore::AsyncProcessResultImplementation::my_child |
|
private |
◆ result
| Optional<std::shared_ptr<std::future<int> > > Acore::AsyncProcessResultImplementation::result |
|
private |
◆ was_terminated
| std::atomic<bool> Acore::AsyncProcessResultImplementation::was_terminated |
|
private |
The documentation for this class was generated from the following file: