32 #ifndef _INCLUDE_SOURCEMOD_FORWARDINTERFACE_H_
33 #define _INCLUDE_SOURCEMOD_FORWARDINTERFACE_H_
48 #include <sp_vm_api.h>
52 #define SMINTERFACE_FORWARDMANAGER_NAME "IForwardManager"
53 #define SMINTERFACE_FORWARDMANAGER_VERSION 3
85 #define SP_PARAMTYPE_ANY 0
86 #define SP_PARAMFLAG_BYREF (1<<0)
87 #define SP_PARAMTYPE_CELL (1<<1)
88 #define SP_PARAMTYPE_FLOAT (2<<1)
89 #define SP_PARAMTYPE_STRING (3<<1)|SP_PARAMFLAG_BYREF
90 #define SP_PARAMTYPE_ARRAY (4<<1)|SP_PARAMFLAG_BYREF
91 #define SP_PARAMTYPE_VARARG (5<<1)
98 Param_Any = SP_PARAMTYPE_ANY,
99 Param_Cell = SP_PARAMTYPE_CELL,
100 Param_Float = SP_PARAMTYPE_FLOAT,
101 Param_String = SP_PARAMTYPE_STRING,
102 Param_Array = SP_PARAMTYPE_ARRAY,
103 Param_VarArgs = SP_PARAMTYPE_VARARG,
104 Param_CellByRef = SP_PARAMTYPE_CELL|SP_PARAMFLAG_BYREF,
105 Param_FloatByRef = SP_PARAMTYPE_FLOAT|SP_PARAMFLAG_BYREF,
126 virtual void Preprocess(IPluginFunction *fun,
FwdParamInfo *params)
151 virtual const char *GetForwardName() =0;
158 virtual unsigned int GetFunctionCount() =0;
165 virtual ExecType GetExecType() =0;
174 virtual int Execute(cell_t *result,
IForwardFilter *filter=NULL) =0;
185 virtual int PushArray(cell_t *inarray,
unsigned int cells,
int flags=0) =0;
201 virtual bool RemoveFunction(IPluginFunction *func) =0;
209 virtual unsigned int RemoveFunctionsOfPlugin(
IPlugin *plugin) =0;
220 virtual bool AddFunction(IPluginFunction *func) =0;
231 virtual bool AddFunction(IPluginContext *ctx, funcid_t index) =0;
241 virtual bool RemoveFunction(IPluginContext *ctx, funcid_t index) =0;
252 return SMINTERFACE_FORWARDMANAGER_NAME;
256 return SMINTERFACE_FORWARDMANAGER_VERSION;
260 if (version < 2 || version > GetInterfaceVersion())
282 virtual IForward *CreateForward(
const char *name,
284 unsigned int num_params,
285 const ParamType *types,
305 const ParamType *types,
323 virtual void ReleaseForward(
IForward *forward) =0;
389 #endif //_INCLUDE_SOURCEMOD_FORWARDINTERFACE_H_
Managed Forward, same as IForward, except the collection can be modified.
Definition: IForwardSys.h:191
virtual ~IForward()
Definition: IForwardSys.h:142
Defines the interface for the Plugin System, which manages loaded plugins.
virtual unsigned int GetInterfaceVersion()
Must return an integer defining the interface's version.
Definition: IForwardSys.h:254
Defines the base functionality required by a shared interface.
Definition: IShareSys.h:92
Unmanaged Forward, abstracts calling multiple functions as "forwards," or collections of functions...
Definition: IForwardSys.h:138
Encapsulates a run-time plugin as maintained by SourceMod.
Definition: IPluginSys.h:101
Provides functions for creating/destroying managed and unmanaged forwards.
Definition: IForwardSys.h:247
virtual const char * GetInterfaceName()
Must return a string defining the interface's unique name.
Definition: IForwardSys.h:250
Definition: IForwardSys.h:123
Definition: IAdminSystem.h:63
virtual bool IsVersionCompatible(unsigned int version)
Must return whether the requested version number is backwards compatible. Note: This can be overridde...
Definition: IForwardSys.h:258
Definition: IForwardSys.h:108
Definition: IForwardSys.h:116