SourceMod SDK  1.7
IForwardSys.h File Reference

Defines the interface for managing collections ("forwards") of plugin calls. More...

#include <IPluginSys.h>
#include <sp_vm_api.h>

Go to the source code of this file.

Classes

struct  SourceMod::ByrefInfo
 
struct  SourceMod::FwdParamInfo
 
class  SourceMod::IForwardFilter
 
class  SourceMod::IForward
 Unmanaged Forward, abstracts calling multiple functions as "forwards," or collections of functions. More...
 
class  SourceMod::IChangeableForward
 Managed Forward, same as IForward, except the collection can be modified. More...
 
class  SourceMod::IForwardManager
 Provides functions for creating/destroying managed and unmanaged forwards. More...
 

Macros

#define SMINTERFACE_FORWARDMANAGER_NAME   "IForwardManager"
 
#define SMINTERFACE_FORWARDMANAGER_VERSION   3
 
#define SP_PARAMTYPE_ANY   0
 
#define SP_PARAMFLAG_BYREF   (1<<0)
 
#define SP_PARAMTYPE_CELL   (1<<1)
 
#define SP_PARAMTYPE_FLOAT   (2<<1)
 
#define SP_PARAMTYPE_STRING   (3<<1)|SP_PARAMFLAG_BYREF
 
#define SP_PARAMTYPE_ARRAY   (4<<1)|SP_PARAMFLAG_BYREF
 
#define SP_PARAMTYPE_VARARG   (5<<1)
 

Enumerations

enum  ResultType { SourceMod::Pl_Continue = 0, SourceMod::Pl_Changed = 1, SourceMod::Pl_Handled = 3, SourceMod::Pl_Stop = 4 }
 Defines the event hook result types plugins can return.
 
enum  ExecType {
  SourceMod::ET_Ignore = 0, SourceMod::ET_Single = 1, SourceMod::ET_Event = 2, SourceMod::ET_Hook = 3,
  SourceMod::ET_LowEvent = 4
}
 Defines how a forward iterates through plugin functions.
 
enum  ParamType {
  SourceMod::Param_Any = SP_PARAMTYPE_ANY, SourceMod::Param_Cell = SP_PARAMTYPE_CELL, SourceMod::Param_Float = SP_PARAMTYPE_FLOAT, SourceMod::Param_String = SP_PARAMTYPE_STRING,
  SourceMod::Param_Array = SP_PARAMTYPE_ARRAY, SourceMod::Param_VarArgs = SP_PARAMTYPE_VARARG, SourceMod::Param_CellByRef = SP_PARAMTYPE_CELL|SP_PARAMFLAG_BYREF, SourceMod::Param_FloatByRef = SP_PARAMTYPE_FLOAT|SP_PARAMFLAG_BYREF
}
 Describes the various ways to pass parameters to plugins.
 

Detailed Description

Defines the interface for managing collections ("forwards") of plugin calls.

vim: set ts=4 :

SourceMod

Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 3.0, as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

As a special exception, AlliedModders LLC gives you permission to link the code of this program (as well as its derivative works) to "Half-Life 2," the "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software by the Valve Corporation. You must obey the GNU General Public License in all respects for all other code used. Additionally, AlliedModders LLC grants this exception to all derivative works. AlliedModders LLC defines further exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), or http://www.sourcemod.net/license.php.

Version: $Id$

The Forward System is responsible for managing automated collections of IPluginFunctions. It thus provides wrappers to calling many functions at once. There are two types of such wrappers: Managed and Unmanaged. Confusingly, these terms refer to whether the user manages the forwards, not Core. Managed forwards are completely managed by the user, and are custom editable collections. Unmanaged forwards are the opposite, and will only work on a single global function name in all plugins.