TrinityCore
Trinity::AsyncProcessResultImplementation Class Reference
+ Inheritance diagram for Trinity::AsyncProcessResultImplementation:

Public Member Functions

 AsyncProcessResultImplementation (std::string executable_, std::vector< std::string > args_, std::string logger_, std::string input_file_, bool secure)
 
 AsyncProcessResultImplementation (AsyncProcessResultImplementation const &)=delete
 
AsyncProcessResultImplementationoperator= (AsyncProcessResultImplementation const &)=delete
 
 AsyncProcessResultImplementation (AsyncProcessResultImplementation &&)=delete
 
AsyncProcessResultImplementationoperator= (AsyncProcessResultImplementation &&)=delete
 
 ~AsyncProcessResultImplementation ()=default
 
int32 StartProcess ()
 
void SetFuture (std::future< int32 > result_)
 
std::future< int32 > & GetFutureResult () override
 
void Terminate () override
 Tries to terminate the process. More...
 
- Public Member Functions inherited from Trinity::AsyncProcessResult
virtual ~AsyncProcessResult ()
 
virtual std::future< int32 > & GetFutureResult ()=0
 
virtual void Terminate ()=0
 Tries to terminate the process. More...
 

Private Attributes

std::string const executable
 
std::vector< std::string > const args
 
std::string const logger
 
std::string const input_file
 
bool const is_secure
 
std::atomic< bool > was_terminated
 
Optional< std::future< int > > futureResult
 
Optional< bp::child > my_child
 

Detailed Description

Definition at line 41 of file StartProcess.cpp.

Constructor & Destructor Documentation

◆ AsyncProcessResultImplementation() [1/3]

Trinity::AsyncProcessResultImplementation::AsyncProcessResultImplementation ( std::string  executable_,
std::vector< std::string >  args_,
std::string  logger_,
std::string  input_file_,
bool  secure 
)
inlineexplicit

Definition at line 56 of file StartProcess.cpp.

◆ AsyncProcessResultImplementation() [2/3]

Trinity::AsyncProcessResultImplementation::AsyncProcessResultImplementation ( AsyncProcessResultImplementation const &  )
delete

◆ AsyncProcessResultImplementation() [3/3]

Trinity::AsyncProcessResultImplementation::AsyncProcessResultImplementation ( AsyncProcessResultImplementation &&  )
delete

◆ ~AsyncProcessResultImplementation()

Trinity::AsyncProcessResultImplementation::~AsyncProcessResultImplementation ( )
default

Member Function Documentation

◆ GetFutureResult()

std::future< int32 > & Trinity::AsyncProcessResultImplementation::GetFutureResult ( )
inlineoverridevirtual

Returns the future which contains the result of the process as soon it is finished.

Implements Trinity::AsyncProcessResult.

Definition at line 182 of file StartProcess.cpp.

◆ operator=() [1/2]

AsyncProcessResultImplementation & Trinity::AsyncProcessResultImplementation::operator= ( AsyncProcessResultImplementation &&  )
delete

◆ operator=() [2/2]

AsyncProcessResultImplementation & Trinity::AsyncProcessResultImplementation::operator= ( AsyncProcessResultImplementation const &  )
delete

◆ SetFuture()

void Trinity::AsyncProcessResultImplementation::SetFuture ( std::future< int32 result_)
inline

Definition at line 175 of file StartProcess.cpp.

◆ StartProcess()

int32 Trinity::AsyncProcessResultImplementation::StartProcess ( )
inline

Definition at line 70 of file StartProcess.cpp.

+ Here is the caller graph for this function:

◆ Terminate()

void Trinity::AsyncProcessResultImplementation::Terminate ( )
inlineoverridevirtual

Tries to terminate the process.

Implements Trinity::AsyncProcessResult.

Definition at line 189 of file StartProcess.cpp.

Member Data Documentation

◆ args

std::vector<std::string> const Trinity::AsyncProcessResultImplementation::args
private

Definition at line 45 of file StartProcess.cpp.

◆ executable

std::string const Trinity::AsyncProcessResultImplementation::executable
private

Definition at line 44 of file StartProcess.cpp.

◆ futureResult

Optional<std::future<int> > Trinity::AsyncProcessResultImplementation::futureResult
private

Definition at line 52 of file StartProcess.cpp.

◆ input_file

std::string const Trinity::AsyncProcessResultImplementation::input_file
private

Definition at line 47 of file StartProcess.cpp.

◆ is_secure

bool const Trinity::AsyncProcessResultImplementation::is_secure
private

Definition at line 48 of file StartProcess.cpp.

◆ logger

std::string const Trinity::AsyncProcessResultImplementation::logger
private

Definition at line 46 of file StartProcess.cpp.

◆ my_child

Optional<bp::child> Trinity::AsyncProcessResultImplementation::my_child
private

Definition at line 53 of file StartProcess.cpp.

◆ was_terminated

std::atomic<bool> Trinity::AsyncProcessResultImplementation::was_terminated
private

Definition at line 50 of file StartProcess.cpp.


The documentation for this class was generated from the following file: