yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
aefd1e3e0
master
1// slang-process-util.h 2#ifndef SLANG_PROCESS_UTIL_H 3#define SLANG_PROCESS_UTIL_H 4 5#include "slang-process.h" 6 7namespace Slang 8{ 9 10struct ExecuteResult 11{ 12typedef int ResultCode ; 13 14void init () 15 { 16resultCode = 0 ; 17standardOutput = String (); 18standardError = String (); 19debugLayer = String (); 20 } 21 22ResultCode resultCode ; 23String standardOutput ; 24String standardError ; 25String debugLayer ; 26}; 27 28struct ProcessUtil 29{ 30/// Execute the command line 31static SlangResult execute (const CommandLine & commandLine ,ExecuteResult & outExecuteResult ); 32 33/// Read from read from streams until process terminates. 34/// Passing nullptr for a stream, will just discard what's in the stream 35static SlangResult readUntilTermination ( 36Process * process , 37List < Byte >* outStdOut , 38List < Byte >* stdError ); 39 40/// Read streams from process. 41static SlangResult readUntilTermination (Process * process ,ExecuteResult & outExecuteResult ); 42}; 43 44}// namespace Slang 45 46#endif // SLANG_PROCESS_UTIL_H