diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /devtools/syncfrommirror/Redirect.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'devtools/syncfrommirror/Redirect.h')
| -rw-r--r-- | devtools/syncfrommirror/Redirect.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/devtools/syncfrommirror/Redirect.h b/devtools/syncfrommirror/Redirect.h new file mode 100644 index 0000000..560644d --- /dev/null +++ b/devtools/syncfrommirror/Redirect.h @@ -0,0 +1,55 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +// +//=============================================================================// +#include "redir.h" + +#ifndef REDIRECT_H_INCLUDED__ +#define REDIRECT_H_INCLUDED__ + +class CRedirect : public CRedirector +{ +public: + + //-------------------------------------------------------------------------- + // constructor + //-------------------------------------------------------------------------- + CRedirect() + : m_pEdit(NULL), + m_bStopped(false) + { + } + + //-------------------------------------------------------------------------- + // destructor + //-------------------------------------------------------------------------- + virtual ~CRedirect(); + //-------------------------------------------------------------------------- + // public member functions + //-------------------------------------------------------------------------- + virtual void Run(LPCTSTR szCommand, CEdit *pEdit, LPCTSTR pszCurrentDirectory = NULL); + virtual void Stop(); + +protected: + + //-------------------------------------------------------------------------- + // member functions + //-------------------------------------------------------------------------- + virtual void WriteStdOut(LPCSTR pszOutput); + virtual void WriteStdError(LPCSTR pszError); + + void AppendText(LPCTSTR Text); + void PeekAndPump(); + + //-------------------------------------------------------------------------- + // member data + //-------------------------------------------------------------------------- + CEdit * m_pEdit; + bool m_bStopped; + +}; + +#endif // REDIRECT_H_INCLUDED__ |