Process class for running external programs They will run immediately after creation.
More...
#include <process.hxx>
|
|
Status | m_status |
| | Process status.
|
| |
|
STARTUPINFO | m_siStartInfo |
| | Startup information.
|
| |
|
PROCESS_INFORMATION | m_piProcInfo |
| | Process information.
|
| |
|
Pipe * | m_pstdout |
| | Standard output pipe.
|
| |
|
Pipe * | m_pstdin |
| | Standard input pipe.
|
| |
|
Pipe * | m_pstderr |
| | Standard error pipe.
|
| |
|
std::filesystem::path | m_program |
| | Program path.
|
| |
|
std::vector< std::string > | m_arguments |
| | Program arguments.
|
| |
|
std::unique_ptr< std::thread > | m_forwarder |
| | Forwarder thread.
|
| |
|
| STORMBYTE_SYSTEM_PUBLIC std::ostream & | operator<< (std::ostream &ostream, const Process &proc) |
| |
Process class for running external programs They will run immediately after creation.
◆ Status
◆ Process() [1/4]
| StormByte::System::Process::Process |
( |
const std::filesystem::path & |
prog, |
|
|
const std::vector< std::string > & |
args = std::vector< std::string >() |
|
) |
| |
Constructor
- Parameters
-
| prog | program |
| args | arguments |
◆ Process() [2/4]
| StormByte::System::Process::Process |
( |
std::filesystem::path && |
prog, |
|
|
std::vector< std::string > && |
args = std::vector< std::string >() |
|
) |
| |
Constructor
- Parameters
-
| prog | program |
| args | arguments |
◆ Process() [3/4]
| StormByte::System::Process::Process |
( |
const Process & |
proc | ) |
|
|
delete |
Copy constructor (deleted)
- Parameters
-
◆ Process() [4/4]
| StormByte::System::Process::Process |
( |
Process && |
proc | ) |
|
|
noexcept |
Move constructor
- Parameters
-
◆ ~Process()
| virtual StormByte::System::Process::~Process |
( |
| ) |
|
|
virtualnoexcept |
◆ operator<<() [1/2]
| Process & StormByte::System::Process::operator<< |
( |
const std::string & |
str | ) |
|
Writes to the process stdin
- Parameters
-
- Returns
- Process reference
◆ operator<<() [2/2]
| void StormByte::System::Process::operator<< |
( |
const System::_EoF & |
eof | ) |
|
Writes EOF to the process stdin
- Parameters
-
◆ operator=() [1/2]
| Process & StormByte::System::Process::operator= |
( |
const Process & |
proc | ) |
|
|
delete |
Assignment operator (deleted)
- Parameters
-
◆ operator=() [2/2]
Move assignment operator
- Parameters
-
◆ operator>>() [1/2]
Binds current process stdout to a process stdin
- Parameters
-
- Returns
- Process reference
◆ operator>>() [2/2]
| std::string & StormByte::System::Process::operator>> |
( |
std::string & |
str | ) |
const |
Outputs the process stdout to a string
- Parameters
-
- Returns
- string reference
◆ Pid()
| PROCESS_INFORMATION StormByte::System::Process::Pid |
( |
| ) |
|
Gets the process id
- Returns
- process id
◆ Resume()
| void StormByte::System::Process::Resume |
( |
| ) |
|
◆ Suspend()
| void StormByte::System::Process::Suspend |
( |
| ) |
|
◆ Wait()
| DWORD StormByte::System::Process::Wait |
( |
| ) |
|
|
noexcept |
Waits for the process to finish
- Returns
- exit code
◆ operator<<
| STORMBYTE_SYSTEM_PUBLIC std::ostream & operator<< |
( |
std::ostream & |
ostream, |
|
|
const Process & |
proc |
|
) |
| |
|
friend |
Outputs the process stdout to an ostream
- Parameters
-
- Returns
- ostream reference
Outputs the process to an ostream
- Parameters
-
- Returns
- ostream reference
The documentation for this class was generated from the following file:
- /home/runner/work/StormByte-System/StormByte-System/lib/public/StormByte/system/process.hxx