52 #ifndef __PCL_ExternalProcess_h
53 #define __PCL_ExternalProcess_h
57 #ifndef __PCL_BUILDING_PIXINSIGHT_APPLICATION
84 namespace ExternalProcessError
113 #ifndef __PCL_WINDOWS
131 using error_code = ExternalProcessError::value_type;
232 bool WaitForStarted(
int ms = 6000 );
253 bool WaitForFinished(
int ms = 6000 );
277 bool WaitForDataAvailable(
int ms = 6000 );
301 bool WaitForDataWritten(
int ms = 6000 );
353 void CloseStandardInput();
367 void CloseStandardOutput();
381 void CloseStandardError();
411 void RedirectStandardOutput(
const String& filePath,
bool append =
false );
456 void RedirectStandardError(
const String& filePath,
bool append =
false );
482 void RedirectStandardInput(
const String& filePath );
487 String WorkingDirectory()
const;
498 void SetWorkingDirectory(
const String& dirPath );
506 bool IsRunning()
const;
513 bool IsStarting()
const;
518 bool HasCrashed()
const;
527 pid_type PID()
const;
533 int ExitCode()
const;
605 void Write(
const String& text );
619 void Write(
const char* text );
625 void Write(
const void* data,
size_type count );
650 void SetEnvironment(
const StringList& environment );
829 EventHandlers() =
default;
830 EventHandlers(
const EventHandlers& ) =
default;
831 EventHandlers& operator =(
const EventHandlers& ) =
default;
837 void* CloneHandle()
const override;
839 friend class ExternalProcessPrivate;
840 friend class ExternalProcessEventDispatcher;
847 #endif // __PCL_BUILDING_PIXINSIGHT_APPLICATION
849 #endif // __PCL_ExternalProcess_h