AUI Framework  master
Cross-platform module-based framework for developing C++20 desktop applications
AChildProcess Class Reference

Detailed Description

Creates child process of this application.

Public Member Functions

const auto & getApplicationFile () const
 
const auto & getArgs () const
 
const auto & getWorkingDirectory () const
 
APath getPathToExecutable () override
 
AOptional< int > exitCodeNonBlocking () const noexcept
 
bool isFinished () const noexcept
 
void run (ASubProcessExecutionFlags flags=ASubProcessExecutionFlags::DEFAULT)
 Launches process.
 
int waitForExitCode () override
 Wait for process to be finished. More...
 
uint32_t getPid () const noexcept override
 
size_t processMemory () const override
 Obtain process memory usage. More...
 
APath getModuleName () override
 
const _< IOutputStream > & getStdInStream () const
 
- Public Member Functions inherited from AProcess
void kill () const noexcept
 
- Public Member Functions inherited from aui::noncopyable
 noncopyable (const noncopyable &)=delete
 
noncopyableoperator= (const noncopyable &)=delete
 
- Public Member Functions inherited from AObject
_< AObjectsharedPtr ()
 
_weak< AObjectweakPtr ()
 
void clearSignals () noexcept
 
template<AAnySignal Signal, ACompatibleSlotFor< Signal > Function>
void connect (Signal &signal, Function &&function)
 
void setSignalsEnabled (bool enabled)
 
bool isSignalsEnabled () const noexcept
 
template<ASignalInvokable T>
void operator^ (T &&t)
 
_< AAbstractThreadgetThread () const
 
bool isSlotsCallsOnlyOnMyThread () const noexcept
 
void setSlotsCallsOnlyOnMyThread (bool slotsCallsOnlyOnMyThread)
 

Signals and public fields

emits finished
 
emits< AByteBufferstdOut
 
emits< AByteBufferstdErr
 

Friends

class AProcess
 

Additional Inherited Members

- Static Public Member Functions inherited from AProcess
static _< AChildProcesscreate (ProcessCreationInfo args)
 Launches an executable. More...
 
static _< AChildProcessmake (AString applicationFile, AString args={}, APath workingDirectory={})
 Launches an executable. More...
 
static int executeWaitForExit (AString applicationFile, AString args={}, APath workingDirectory={}, ASubProcessExecutionFlags flags=ASubProcessExecutionFlags::DEFAULT)
 Launches executable. More...
 
static AVector< _< AProcess > > all ()
 
static _< AProcessself ()
 
static _< AProcessfindAnotherSelfInstance (const AString &yourProjectName)
 tempFileName file name which will be used as lock More...
 
static _< AProcessfromPid (uint32_t pid)
 
- Static Public Member Functions inherited from AObject
static void disconnect ()
 
template<AAnySignal Signal, aui::derived_from< AObject > Object, ACompatibleSlotFor< Signal > Function>
static void connect (Signal &signal, Object *object, Function &&function)
 
template<AAnySignal Signal, aui::derived_from< AObject > Object, ACompatibleSlotFor< Signal > Function>
static void connect (Signal &signal, Object &object, Function &&function)
 
template<AAnySignal Signal, aui::derived_from< AObject > Object, ACompatibleSlotFor< Signal > Function>
static void connect (Signal &signal, _< Object > object, Function &&function)
 
static void moveToThread (aui::no_escape< AObject > object, _< AAbstractThread > thread)
 
- Protected Member Functions inherited from AObject
void setThread (_< AAbstractThread > thread)
 Set thread of the object.
 

Member Function Documentation

◆ getModuleName()

APath AChildProcess::getModuleName ( )
overridevirtual
Returns
process' executable file name.

Implements AProcess.

◆ getPathToExecutable()

APath AChildProcess::getPathToExecutable ( )
inlineoverridevirtual
Returns
path to the process' executable.

Implements AProcess.

◆ getPid()

uint32_t AChildProcess::getPid ( ) const
overridevirtualnoexcept
Returns
process' ID.

Implements AProcess.

◆ processMemory()

size_t AChildProcess::processMemory ( ) const
overridevirtual

Obtain process memory usage.

Implements AProcess.

◆ waitForExitCode()

int AChildProcess::waitForExitCode ( )
overridevirtual

Wait for process to be finished.

Returns
exit code

Implements AProcess.

#include <AUI/Platform/AProcess.h>


The documentation for this class was generated from the following files:
Inheritance diagram for AChildProcess:
Collaboration diagram for AChildProcess: