SourceMod::IForwardManager Class Reference

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

#include <public/IForwardSys.h>

Inherits SourceMod::SMInterface.

Inheritance diagram for SourceMod::IForwardManager:

[legend]
Collaboration diagram for SourceMod::IForwardManager:
[legend]
List of all members.

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.
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.
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.
virtual IForwardFindForward (const char *name, IChangeableForward **ifchng)=0
 Finds a forward by name. Does not return anonymous forwards (named NULL or "").
virtual void ReleaseForward (IForward *forward)=0
 Frees and destroys a forward object.

Detailed Description

Provides functions for creating/destroying managed and unmanaged forwards.

Definition at line 227 of file IForwardSys.h.


Member Function Documentation

virtual bool SourceMod::IForwardManager::IsVersionCompatible ( unsigned int  version  )  [inline, virtual]

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

Parameters:
version Version number to compare against.
Returns:
True if compatible, false otherwise.

Reimplemented from SourceMod::SMInterface.

Definition at line 238 of file IForwardSys.h.

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:
name Name of public function to use in forward.
et Execution type to be used.
num_params Number of parameter this function will have. NOTE: For varargs, this should include the vararg parameter.
types Array 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:
name Name of forward (unused except for lookup, can be NULL for anonymous).
et Execution type to be used.
num_params Number of parameter this function will have. NOTE: For varargs, this should include the vararg parameter.
types Array 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:
name Name of forward.
ifchng Optionally store either NULL or an IChangeableForward pointer depending on type of forward.
Returns:
IForward pointer, or NULL if none found matching the name.

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

Frees and destroys a forward object.

Parameters:
forward An IForward created by CreateForward() or CreateForwardEx().


The documentation for this class was generated from the following file:
Generated on Fri Nov 21 07:10:03 2008 for SourceMod SDK by  doxygen 1.5.1