3#include <Foundation/Containers/HybridArray.h>
4#include <Foundation/Strings/String.h>
5#include <Foundation/Strings/StringView.h>
6#include <Foundation/Time/Time.h>
7#include <Foundation/Types/Bitflags.h>
8#include <Foundation/Types/Delegate.h>
9#include <Foundation/Types/UniquePtr.h>
11using plOsProcessHandle =
void*;
12using plOsProcessID = plUInt32;
14#if PL_ENABLED(PL_SUPPORTS_PROCESSES)
15enum class plProcessState
23struct PL_FOUNDATION_DLL plProcessOptions
35 bool m_bHideConsoleWindow =
true;
51 template <
typename... ARGS>
67struct plProcessLaunchFlags
69 using StorageType = plUInt32;
75 Suspended = PL_BIT(1),
81 StorageType Detached : 1;
82 StorageType Suspended : 1;
86PL_DECLARE_FLAGS_OPERATORS(plProcessLaunchFlags);
89class PL_FOUNDATION_DLL plProcess
91 PL_DISALLOW_COPY_AND_ASSIGN(plProcess);
95 plProcess(plProcess&& rhs);
106 static plResult Execute(
const plProcessOptions& opt, plInt32* out_pExitCode =
nullptr);
132 plInt32 GetExitCode()
const;
137 plProcessState GetState()
const;
146 plOsProcessHandle GetProcessHandle()
const;
149 plOsProcessID GetProcessID()
const;
152 static plOsProcessID GetCurrentProcessID();
160 mutable plInt32 m_iExitCode = -0xFFFF;
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
plStringBuilder is a class that is meant for creating and modifying strings.
Definition StringBuilder.h:35
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
A Unique ptr manages an object and destroys that object when it goes out of scope....
Definition UniquePtr.h:10
The plBitflags class allows you to work with type-safe bitflags.
Definition Bitflags.h:82
A generic delegate class which supports static functions and member functions.
Definition Delegate.h:76
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54
The time class encapsulates a double value storing the time in seconds.
Definition Time.h:12
PL_ALWAYS_INLINE static constexpr plTime MakeZero()
Creates an instance of plTime that was initialized with zero.
Definition Time.h:42