API Documentation
Loading...
Searching...
No Matches
LocalApplicationLauncher.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/Thread.h>
4#include <NDEVR/File.h>
5#include <functional>
6namespace NDEVR
7{
8 class ProgressInfo;
9 /**--------------------------------------------------------------------------------------------------
10 \brief Information and logic for launching an application seperate from the current software
11 *-----------------------------------------------------------------------------------------------**/
13 {
14 public:
18 ProgressInfo* log = nullptr;
19 bool windowless = false;
20 bool wait_for_completion = true;
21 bool make_child_process = false;
22 std::function<void()> on_complete_function;
23 public:
30 virtual void execute();
31 bool isRunning();
32 public:
33 static void CallApplication(const String& application, const String& args = String(), bool wait_for_completion = true, bool windowless = false, ProgressInfo* log = nullptr);
34 protected:
35 void* m_process_handle = nullptr;
37 bool m_is_running = false;
38 };
39#if NDEVR_SUPPORTS_THREADING
40 /**--------------------------------------------------------------------------------------------------
41 \brief Allows application to run on a seperate thread
42 *-----------------------------------------------------------------------------------------------**/
44 {
45 virtual void run() override;
46 };
47#endif
48}
49
#define NDEVR_BASE_API
Definition DLLInfo.h:78
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:59
Logic for reading or writing to a file as well as navigating filesystems.
Definition File.h:48
Information and logic for launching an application seperate from the current software.
Definition LocalApplicationLauncher.h:13
static void CallApplication(const String &application, const String &args=String(), bool wait_for_completion=true, bool windowless=false, ProgressInfo *log=nullptr)
std::function< void()> on_complete_function
Definition LocalApplicationLauncher.h:22
LocalApplicationLauncher(const File &path)
Buffer< uint08 > findWindowIDs()
String args
Definition LocalApplicationLauncher.h:16
File application
Definition LocalApplicationLauncher.h:15
String environment
Definition LocalApplicationLauncher.h:17
Allows application to run on a seperate thread.
Definition LocalApplicationLauncher.h:44
A light-weight base class for Log that allows processes to update, without the need for.
Definition ProgressInfo.hpp:48
The core String class for the software.
Definition String.h:47
A thread is a single sequence stream within the software.
Definition Thread.h:66
Definition ACIColor.h:37
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer
Definition BaseValues.hpp:104
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved.
Definition BaseValues.hpp:230