NDEVR
API Documentation
LocalApplicationLauncherThread

Launches an external application on a separate thread. More...

Inheritance diagram for LocalApplicationLauncherThread:
[legend]
Collaboration diagram for LocalApplicationLauncherThread:
[legend]

Private Member Functions

virtual void run () override
 Executes the application launch on a separate thread.

Additional Inherited Members

Public Member Functions inherited from LocalApplicationLauncher
 LocalApplicationLauncher (const StringView &path)
 Constructs a LocalApplicationLauncher with the given executable path.
virtual ~LocalApplicationLauncher ()
 Destructor.
bool applicationFileExists () const
 Checks whether the application executable file exists on disk.
void bringToFront ()
 Brings the launched application window to the foreground.
virtual void execute ()
 Launches the application with the configured parameters.
Buffer< uint08findWindowIDs ()
 Finds the window identifiers associated with the launched process.
bool isRunning ()
 Checks whether the launched application is currently running.
void killProcess ()
 Terminates the launched process.
Public Member Functions inherited from Thread
 Thread ()
 Constructs a Thread with a default name.
 Thread (const StringView &name)
 Constructs a Thread with the specified name.
virtual ~Thread ()
 Destroys the Thread and cleans up resources.
void detach ()
 Detaches the thread, allowing it to run independently.
void forceStop ()
 Forces the running flag to false without waiting for the thread to finish.
bool isPrimaryThread () const
 Checks whether this thread is the primary thread.
bool isRunning () const
 Checks whether the thread is currently running.
void join ()
 Blocks the calling thread until this thread finishes execution.
virtual void requestStopThread ()
 Requests the thread to stop without blocking.
void setIsPrimaryThread (bool is_primary_thread)
 Sets whether this thread should be treated as the primary thread.
void setThreadName (const StringView &name)
 Sets the name of this thread.
virtual bool shouldExitThread () const
 Checks whether the thread has been requested to exit.
void start ()
 Starts the thread execution.
virtual void stopThread ()
 Stops the thread and waits for it to finish.
const StringthreadName () const
 Gets the name assigned to this thread.
Static Public Member Functions inherited from LocalApplicationLauncher
static void CallApplication (const StringView &application, const StringView &args=StringView(), bool wait_for_completion=true, bool windowless=false, LogPtr log=LogPtr())
 Convenience function to launch an application in a single call.
Static Public Member Functions inherited from Thread
static ThreadCurrentThread ()
 Gets a reference to the Thread object for the calling thread.
static String CurrentThreadName ()
 Gets the name of the current thread.
static void ServiceVirtualThreads ()
 Services any virtual threads that require periodic execution.
static void SetCurrentThreadName (const StringView &name)
 Sets the name of the current thread.
static void StopAllThreads ()
 Stops all tracked threads.
Public Attributes inherited from LocalApplicationLauncher
String application
 The path or name of the application executable to launch.
String args
 Command-line arguments to pass to the application.
String environment
 Environment variables to set for the launched process.
LogPtr log
 Log instance for recording output and errors from the launched process.
bool make_child_process = false
 Whether to launch the application as a child process of the current process.
std::function< void()> on_complete_function
 Callback invoked when the launched application completes execution.
bool wait_for_completion = true
 Whether to block until the launched application exits.
bool windowless = false
 Whether to launch the application without a visible window.
Protected Member Functions inherited from Thread
const std::thread & self ()
 Gets a const reference to the underlying std::thread.
Protected Attributes inherited from LocalApplicationLauncher
String m_error_log_buffer
 Buffer for accumulating stderr output from the launched process.
bool m_is_running = false
 Tracks whether the launched process is currently running.
String m_log_buffer
 Buffer for accumulating stdout output from the launched process.
void * m_process_handle = nullptr
 Native handle to the launched process.
uint08 m_process_id = Constant<uint08>::Invalid
 The OS-assigned process identifier of the launched application.
Protected Attributes inherited from Thread
volatile bool m_is_running = false
 Whether the thread is currently running.
volatile bool m_is_single_run = true
 Whether the thread should execute only once before stopping.

Detailed Description

Launches an external application on a separate thread.



Definition at line 83 of file LocalApplicationLauncher.h.


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