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 /hammer/shell.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'hammer/shell.h')
| -rw-r--r-- | hammer/shell.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/hammer/shell.h b/hammer/shell.h new file mode 100644 index 0000000..2873f9d --- /dev/null +++ b/hammer/shell.h @@ -0,0 +1,56 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Handles parsing and routing of shell commands to their handlers. +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef SHELL_H +#define SHELL_H +#pragma once + + +class CMapDoc; +struct ShellDispatchTable_t; + + +class CShell +{ + public: + + CShell(void); + ~CShell(void); + + void SetDocument(CMapDoc *pDoc); + bool RunCommand(const char *pszCommand); + + private: + + // + // Shell command handlers. + // + bool BeginSession(const char *pszCommand, const char *pszArguments); + bool CheckMapVersion(const char *pszCommand, const char *pszArguments); + bool EndSession(const char *pszCommand, const char *pszArguments); + bool EntityCreate(const char *pszCommand, const char *pszArguments); + bool EntityDelete(const char *pszCommand, const char *pszArguments); + bool EntitySetKeyValue(const char *pszCommand, const char *pszArguments); + bool EntityRotateIncremental(const char *pszCommand, const char *pszArguments); + bool NodeCreate(const char *pszCommand, const char *pszArguments); + bool NodeDelete(const char *pszCommand, const char *pszArguments); + bool NodeLinkCreate(const char *pszCommand, const char *pszArguments); + bool NodeLinkDelete(const char *pszCommand, const char *pszArguments); + bool ReleaseVideoMemory(const char *pszCommand, const char *pszArguments); + bool GrabVideoMemory(const char *pszCommand, const char *pszArguments); + + // + // Utility functions. + // + bool DoVersionCheck(const char *pszArguments); + + static ShellDispatchTable_t m_DispatchTable[]; + + CMapDoc *m_pDoc; +}; + +#endif // SHELL_H |