3#include <NDEVR/Thread.h>
78#if NDEVR_SUPPORTS_THREADING
88 virtual void run()
override;
The equivelent of std::vector but with a bit more control.
A light-weight base class for Log that allows processes to update, without the need for additional in...
Launches an external application on a separate thread.
virtual void run() override
Executes the application launch on a separate thread.
String m_error_log_buffer
Buffer for accumulating stderr output from the launched process.
String args
Command-line arguments to pass to the application.
String application
The path or name of the application executable to launch.
bool wait_for_completion
Whether to block until the launched application exits.
bool windowless
Whether to launch the application without a visible window.
String m_log_buffer
Buffer for accumulating stdout output from the launched process.
std::function< void()> on_complete_function
Callback invoked when the launched application completes execution.
Buffer< uint08 > findWindowIDs()
Finds the window identifiers associated with the launched process.
virtual ~LocalApplicationLauncher()
Destructor.
void * m_process_handle
Native handle to the launched process.
uint08 m_process_id
The OS-assigned process identifier of the launched application.
bool isRunning()
Checks whether the launched application is currently running.
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.
String environment
Environment variables to set for the launched process.
bool make_child_process
Whether to launch the application as a child process of the current process.
LocalApplicationLauncher(const StringView &path)
Constructs a LocalApplicationLauncher with the given executable path.
void bringToFront()
Brings the launched application window to the foreground.
virtual void execute()
Launches the application with the configured parameters.
bool m_is_running
Tracks whether the launched process is currently running.
LogPtr log
Log instance for recording output and errors from the launched process.
void killProcess()
Terminates the launched process.
bool applicationFileExists() const
Checks whether the application executable file exists on disk.
A light-weight wrapper that will be a no-op if there is not a valid log reference,...
The core String View class for the NDEVR API.
The core String class for the NDEVR API.
Thread()
Constructs a Thread with a default name.
The primary namespace for the NDEVR SDK.
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer