mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 03:56:10 +08:00
First version of the SOurce SDK 2013
This commit is contained in:
55
public/tier3/tier3dm.h
Normal file
55
public/tier3/tier3dm.h
Normal file
@ -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
|
||||
|
Reference in New Issue
Block a user