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 /public/movieobjects/idmemakefileutils.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'public/movieobjects/idmemakefileutils.h')
| -rw-r--r-- | public/movieobjects/idmemakefileutils.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/public/movieobjects/idmemakefileutils.h b/public/movieobjects/idmemakefileutils.h new file mode 100644 index 0000000..7145f30 --- /dev/null +++ b/public/movieobjects/idmemakefileutils.h @@ -0,0 +1,75 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Interface for makefiles to build differently depending on where they are run from +// +//===========================================================================// + +#ifndef IDMEMAKEFILEUTILS_H +#define IDMEMAKEFILEUTILS_H + +#ifdef _WIN32 +#pragma once +#endif + +#include "appframework/IAppSystem.h" +#include "vstdlib/iprocessutils.h" + + +//----------------------------------------------------------------------------- +// Forward declarations +//----------------------------------------------------------------------------- +class CDmElement; + + +//----------------------------------------------------------------------------- +// Interface version +//----------------------------------------------------------------------------- +#define DMEMAKEFILE_UTILS_INTERFACE_VERSION "VDmeMakeFileUtils001" + + +//----------------------------------------------------------------------------- +// Interface for makefiles to build differently depending on where they are run from +//----------------------------------------------------------------------------- +enum CompilationState_t +{ + COMPILATION_SUCCESSFUL = 0, + COMPILATION_NOT_COMPLETE, + COMPILATION_FAILED, +}; + +abstract_class IDmeMakefileUtils : public IAppSystem +{ +public: + // Methods related to compilation + virtual void PerformCompile( CDmElement *pElement, bool bBuildAllDependencies ) = 0; + + // Are we in the middle of compiling something? + virtual bool IsCurrentlyCompiling( ) = 0; + + // Returns the size of the buffer to pass into UpdateCompilation() + virtual int GetCompileOutputSize() = 0; + + // Updates the compilation + virtual CompilationState_t UpdateCompilation( char *pOutputBuf, int nBufLen ) = 0; + + // Aborts the compilation + virtual void AbortCurrentCompilation() = 0; + + // Opens an external editor for this element + virtual void PerformOpenEditor( CDmElement *pElement ) = 0; + + // Returns the exit code of the failed compilation (if COMPILATION_FAILED occurred) + virtual int GetExitCode() = 0; + + // Somewhere in here, we need a method of populating choice lists + // for things like choosing vstInfoNodes to export for DCC makefiles +}; + + +//----------------------------------------------------------------------------- +// Default implementation +//----------------------------------------------------------------------------- +IDmeMakefileUtils* GetDefaultDmeMakefileUtils(); + + +#endif // IDMEMAKEFILEUTILS_H |