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
12 \n**/
14 {
15 public:
19 ProgressInfo* log = nullptr;
20 bool windowless = false;
21 bool wait_for_completion = true;
22 bool make_child_process = false;
23 std::function<void()> on_complete_function;
24 public:
31 virtual void execute();
32 bool isRunning();
33 public:
34 static void CallApplication(const String& application, const String& args = String(), bool wait_for_completion = true, bool windowless = false, ProgressInfo* log = nullptr);
35 protected:
36 void* m_process_handle = nullptr;
38 bool m_is_running = false;
39 };
40#if NDEVR_SUPPORTS_THREADING
41 /**--------------------------------------------------------------------------------------------------
42 \brief Allows application to run on a seperate thread
43
44 \n**/
46 {
47 virtual void run() override;
48 };
49#endif
50}
51
#define NDEVR_BASE_API
Definition DLLInfo.h:57
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
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:14
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:23
LocalApplicationLauncher(const File &path)
Buffer< uint08 > findWindowIDs()
String args
Definition LocalApplicationLauncher.h:17
File application
Definition LocalApplicationLauncher.h:16
String environment
Definition LocalApplicationLauncher.h:18
Allows application to run on a seperate thread.
Definition LocalApplicationLauncher.h:46
A light-weight base class for Log that allows processes to update, without the need for additional in...
Definition ProgressInfo.hpp:48
The core String class for the NDEVR API.
Definition String.h:69
A thread is a single sequence stream within the software.
Definition Thread.h:67
Definition ACIColor.h:37
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer
Definition BaseValues.hpp:106
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...
Definition BaseValues.hpp:233