sourcemod/core/sm_globals.h
David Anderson 388c062c96 added automatic native registration
added string include file
renamed typeutil and its functions
redid a bunch of the string natives
string natives now register

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40238
2006-12-30 07:23:17 +00:00

56 lines
1.1 KiB
C++

#ifndef _INCLUDE_SOURCEMOD_GLOBALS_H_
#define _INCLUDE_SOURCEMOD_GLOBALS_H_
/**
* @file Contains global headers that most files in SourceMod will need.
*/
#include <sp_vm_types.h>
#include <sp_vm_api.h>
#include "sm_platform.h"
#include "interfaces/IShareSys.h"
using namespace SourcePawn;
using namespace SourceMod;
/**
* @brief Any class deriving from this will be automatically initiated/shutdown by SourceMod
*/
class SMGlobalClass
{
friend class SourceModBase;
public:
SMGlobalClass();
public:
/**
* @brief Called when SourceMod is initially loading
*/
virtual void OnSourceModStartup(bool late)
{
}
/**
* @brief Called after all global classes have initialized
*/
virtual void OnSourceModAllInitialized()
{
}
/**
* @brief Called when SourceMod is shutting down
*/
virtual void OnSourceModShutdown()
{
}
private:
SMGlobalClass *m_pGlobalClassNext;
static SMGlobalClass *head;
};
extern ISourcePawnEngine *g_pSourcePawn;
extern IVirtualMachine *g_pVM;
#include "sm_autonatives.h"
#endif //_INCLUDE_SOURCEMOD_GLOBALS_H_