X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fprocess.h;h=ed997f853e143a52bbfd386cda1e32115c937255;hb=6af098355f2b037a6f8084f9f6c741e462ffa614;hp=5413587cd54f164f38714926a53c445308a02461;hpb=ea60f3548d4769c356b796cb27cd690cdfe4b6d9;p=libs%2Fcore.git diff --git a/source/core/process.h b/source/core/process.h index 5413587..ed997f8 100644 --- a/source/core/process.h +++ b/source/core/process.h @@ -5,6 +5,8 @@ #include #include #include +#include "mspcore_api.h" +#include "noncopyable.h" namespace Msp { @@ -21,7 +23,7 @@ the process or capture its output, use an IO::Pipe. Redirections performed on the self object take effect immediately. It is recommended to perform such redirections directly on the Console objects. */ -class Process +class MSPCORE_API Process: private NonCopyable { public: typedef std::vector Arguments; @@ -29,20 +31,19 @@ public: private: struct Private; - Private *priv; + Private *priv = nullptr; FS::Path work_dir; - bool redirect; - IO::Base *cin; - IO::Base *cout; - IO::Base *cerr; - bool running; - bool finished; - unsigned exit_code; + bool redirect = false; + IO::Base *cin = nullptr; + IO::Base *cout = nullptr; + IO::Base *cerr = nullptr; + bool running = false; + bool finished = false; + unsigned exit_code = 0; static Process *_self; Process(const Private &); - void init(); public: Process(); ~Process();