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/tier3/tier3dm.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'public/tier3/tier3dm.h')
| -rw-r--r-- | public/tier3/tier3dm.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/public/tier3/tier3dm.h b/public/tier3/tier3dm.h new file mode 100644 index 0000000..5ac6028 --- /dev/null +++ b/public/tier3/tier3dm.h @@ -0,0 +1,55 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: A higher level link library for general use in the game and tools. +// +//===========================================================================// + + +#ifndef TIER3DM_H +#define TIER3DM_H + +#if defined( _WIN32 ) +#pragma once +#endif + +#include "tier3/tier3.h" +#include "tier2/tier2dm.h" + +//----------------------------------------------------------------------------- +// Helper empty implementation of an IAppSystem for tier2 libraries +//----------------------------------------------------------------------------- +template< class IInterface, int ConVarFlag = 0 > +class CTier3DmAppSystem : public CTier2DmAppSystem< IInterface, ConVarFlag > +{ + typedef CTier2DmAppSystem< IInterface, ConVarFlag > BaseClass; + +public: + CTier3DmAppSystem( bool bIsPrimaryAppSystem = true ) : BaseClass( bIsPrimaryAppSystem ) + { + } + + virtual bool Connect( CreateInterfaceFn factory ) + { + if ( !BaseClass::Connect( factory ) ) + return false; + + if ( IsPrimaryAppSystem() ) + { + ConnectTier3Libraries( &factory, 1 ); + } + return true; + } + + virtual void Disconnect() + { + if ( IsPrimaryAppSystem() ) + { + DisconnectTier3Libraries(); + } + BaseClass::Disconnect(); + } +}; + + +#endif // TIER3DM_H + |