public/sample_ext/sdk/smsdk_ext.h File Reference

Contains wrappers for making Extensions easier to write. More...

#include "smsdk_config.h"
#include <IExtensionSys.h>
#include <IHandleSys.h>
#include <sp_vm_api.h>
#include <sm_platform.h>
#include <ISourceMod.h>
#include <ISmmPlugin.h>
#include <eiface.h>

Include dependency graph for smsdk_ext.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SDKExtension

Defines

#define SM_MKIFACE(name)   SMINTERFACE_##name##_NAME, SMINTERFACE_##name##_VERSION
#define SM_GET_IFACE(prefix, addr)
#define SM_GET_LATE_IFACE(prefix, addr)   g_pShareSys->RequestInterface(SM_MKIFACE(prefix), myself, (SMInterface **)&addr)
#define SM_CHECK_IFACE(prefix, addr)

Variables

IExtensionmyself
IShareSysg_pShareSys
IShareSyssharesys
ISourceModg_pSM
ISourceModsmutils
IVEngineServer * engine
IServerGameDLL * gamedll


Detailed Description

Contains wrappers for making Extensions easier to write.

Definition in file smsdk_ext.h.


Define Documentation

#define SM_MKIFACE ( name   )     SMINTERFACE_##name##_NAME, SMINTERFACE_##name##_VERSION

Creates a SourceMod interface macro pair

Definition at line 300 of file smsdk_ext.h.

#define SM_GET_IFACE ( prefix,
addr   ) 

Value:

if (!g_pShareSys->RequestInterface(SM_MKIFACE(prefix), myself, (SMInterface **)&addr)) \
          { \
                    if (error != NULL && maxlength) \
                    { \
                              size_t len = snprintf(error, maxlength, "Could not find interface: %s", SMINTERFACE_##prefix##_NAME); \
                              if (len >= maxlength) \
                              { \
                                        error[maxlength - 1] = '\0'; \
                              } \
                    } \
                    return false; \
          }
Automates retrieving SourceMod interfaces

Definition at line 302 of file smsdk_ext.h.

#define SM_GET_LATE_IFACE ( prefix,
addr   )     g_pShareSys->RequestInterface(SM_MKIFACE(prefix), myself, (SMInterface **)&addr)

Automates retrieving SourceMod interfaces when needed outside of SDK_OnLoad()

Definition at line 316 of file smsdk_ext.h.

#define SM_CHECK_IFACE ( prefix,
addr   ) 

Value:

if (!addr) \
          { \
                    if (error != NULL && maxlength) \
                    { \
                              size_t len = snprintf(error, maxlength, "Could not find interface: %s", SMINTERFACE_##prefix##_NAME); \
                              if (len >= maxlength) \
                              { \
                                        error[maxlength - 1] = '\0'; \
                              } \
                    } \
                    return false; \
          }
Validates a SourceMod interface pointer

Definition at line 319 of file smsdk_ext.h.


Variable Documentation

IExtension* myself

Ourself

Definition at line 142 of file sm_sdk_config.cpp.

IShareSys* g_pShareSys

Share system

Definition at line 42 of file smsdk_ext.cpp.

IShareSys* sharesys

Share system

Definition at line 144 of file sm_sdk_config.cpp.

ISourceMod* g_pSM

SourceMod helpers

Definition at line 44 of file smsdk_ext.cpp.

ISourceMod* smutils

SourceMod helpers

Definition at line 45 of file smsdk_ext.cpp.

IVEngineServer* engine

IVEngineServer pointer

Definition at line 25 of file stub_mm.cpp.

IServerGameDLL* gamedll

IServerGameDLL pointer

Definition at line 290 of file smsdk_ext.cpp.


Generated on Sun Dec 28 23:26:28 2008 for SourceMod SDK by  doxygen 1.5.1