aboutsummaryrefslogtreecommitdiff
path: root/sp/src/public/tier3/tier3dm.h
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
committerJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
commit39ed87570bdb2f86969d4be821c94b722dc71179 (patch)
treeabc53757f75f40c80278e87650ea92808274aa59 /sp/src/public/tier3/tier3dm.h
downloadsource-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz
source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip
First version of the SOurce SDK 2013
Diffstat (limited to 'sp/src/public/tier3/tier3dm.h')
-rw-r--r--sp/src/public/tier3/tier3dm.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/sp/src/public/tier3/tier3dm.h b/sp/src/public/tier3/tier3dm.h
new file mode 100644
index 00000000..78424ad9
--- /dev/null
+++ b/sp/src/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
+