SourceMod SDK  1.7
SourceMod::IForwardManager Class Referenceabstract

Provides functions for creating/destroying managed and unmanaged forwards. More...

#include <public/IForwardSys.h>

Inheritance diagram for SourceMod::IForwardManager:
SourceMod::SMInterface

Public Member Functions

virtual const char * GetInterfaceName ()
 Must return a string defining the interface's unique name.
 
virtual unsigned int GetInterfaceVersion ()
 Must return an integer defining the interface's version.
 
virtual bool IsVersionCompatible (unsigned int version)
 Must return whether the requested version number is backwards compatible. Note: This can be overridden for breaking changes or custom versioning. More...
 
virtual IForwardCreateForward (const char *name, ExecType et, unsigned int num_params, const ParamType *types,...)=0
 Creates a managed forward. This forward exists globally. The name used to create the forward is used as its public function in all target plugins. As new non-private plugins become loaded or unloaded, they will be automatically added or removed. This is ideal for global, static forwards that are never changed. More...
 
virtual IChangeableForwardCreateForwardEx (const char *name, ExecType et, int num_params, const ParamType *types,...)=0
 Creates an unmanaged forward. This forward exists privately. Unlike managed forwards, no functions are ever added by the Manager. However, functions will be removed automatically if their parent plugin is unloaded. More...
 
virtual IForwardFindForward (const char *name, IChangeableForward **ifchng)=0
 Finds a forward by name. Does not return anonymous forwards (named NULL or ""). More...
 
virtual void ReleaseForward (IForward *forward)=0
 Frees and destroys a forward object. More...
 

Detailed Description

Provides functions for creating/destroying managed and unmanaged forwards.

Member Function Documentation

virtual IForward* SourceMod::IForwardManager::CreateForward ( const char *  name,
ExecType  et,
unsigned int  num_params,
const ParamType *  types,
  ... 
)
pure virtual

Creates a managed forward. This forward exists globally. The name used to create the forward is used as its public function in all target plugins. As new non-private plugins become loaded or unloaded, they will be automatically added or removed. This is ideal for global, static forwards that are never changed.

Parameters
nameName of public function to use in forward.
etExecution type to be used.
num_paramsNumber of parameter this function will have. NOTE: For varargs, this should include the vararg parameter.
typesArray of type information about each parameter. If NULL, types are read off the vararg stream.
...If types is NULL, num_params ParamTypes should be pushed.
Returns
A new IForward on success, NULL if type combination is impossible.
virtual IChangeableForward* SourceMod::IForwardManager::CreateForwardEx ( const char *  name,
ExecType  et,
int  num_params,
const ParamType *  types,
  ... 
)
pure virtual

Creates an unmanaged forward. This forward exists privately. Unlike managed forwards, no functions are ever added by the Manager. However, functions will be removed automatically if their parent plugin is unloaded.

Parameters
nameName of forward (unused except for lookup, can be NULL for anonymous).
etExecution type to be used.
num_paramsNumber of parameter this function will have. NOTE: For varargs, this should include the vararg parameter.
typesArray of type information about each parameter. If NULL, types are read off the vararg stream.
...If types is NULL, num_params ParamTypes should be pushed.
Returns
A new IChangeableForward on success, NULL if type combination is impossible.
virtual IForward* SourceMod::IForwardManager::FindForward ( const char *  name,
IChangeableForward **  ifchng 
)
pure virtual

Finds a forward by name. Does not return anonymous forwards (named NULL or "").

Parameters
nameName of forward.
ifchngOptionally store either NULL or an IChangeableForward pointer depending on type of forward.
Returns
IForward pointer, or NULL if none found matching the name.
virtual bool SourceMod::IForwardManager::IsVersionCompatible ( unsigned int  version)
inlinevirtual

Must return whether the requested version number is backwards compatible. Note: This can be overridden for breaking changes or custom versioning.

Parameters
versionVersion number to compare against.
Returns
True if compatible, false otherwise.

Reimplemented from SourceMod::SMInterface.

virtual void SourceMod::IForwardManager::ReleaseForward ( IForward forward)
pure virtual

Frees and destroys a forward object.

Parameters
forwardAn IForward created by CreateForward() or CreateForwardEx().

The documentation for this class was generated from the following file: