SourcePawn::ICallable Class Reference

Represents what a function needs to implement in order to be callable. More...

#include <public/sourcepawn/sp_vm_api.h>

Inherited by SourceMod::IForward, and SourcePawn::IPluginFunction.

Inheritance diagram for SourcePawn::ICallable:

[legend]
List of all members.

Public Member Functions

virtual int PushCell (cell_t cell)=0
 Pushes a cell onto the current call.
virtual int PushCellByRef (cell_t *cell, int flags=SM_PARAM_COPYBACK)=0
 Pushes a cell by reference onto the current call. NOTE: On Execute, the pointer passed will be modified if copyback is enabled. NOTE: By reference parameters are cached and thus are not read until execution. This means you cannot push a pointer, change it, and push it again and expect two different values to come out.
virtual int PushFloat (float number)=0
 Pushes a float onto the current call.
virtual int PushFloatByRef (float *number, int flags=SM_PARAM_COPYBACK)=0
 Pushes a float onto the current call by reference. NOTE: On Execute, the pointer passed will be modified if copyback is enabled. NOTE: By reference parameters are cached and thus are not read until execution. This means you cannot push a pointer, change it, and push it again and expect two different values to come out.
virtual int PushArray (cell_t *inarray, unsigned int cells, int flags=0)=0
 Pushes an array of cells onto the current call.
virtual int PushString (const char *string)=0
 Pushes a string onto the current call.
virtual int PushStringEx (char *buffer, size_t length, int sz_flags, int cp_flags)=0
 Pushes a string or string buffer.
virtual void Cancel ()=0
 Cancels a function call that is being pushed but not yet executed. This can be used be reset for CallFunction() use.

Detailed Description

Represents what a function needs to implement in order to be callable.

Definition at line 87 of file sp_vm_api.h.


Member Function Documentation

virtual int SourcePawn::ICallable::PushCell ( cell_t  cell  )  [pure virtual]

Pushes a cell onto the current call.

Parameters:
cell Parameter value to push.
Returns:
Error code, if any.

virtual int SourcePawn::ICallable::PushCellByRef ( cell_t cell,
int  flags = SM_PARAM_COPYBACK 
) [pure virtual]

Pushes a cell by reference onto the current call. NOTE: On Execute, the pointer passed will be modified if copyback is enabled. NOTE: By reference parameters are cached and thus are not read until execution. This means you cannot push a pointer, change it, and push it again and expect two different values to come out.

Parameters:
cell Address containing parameter value to push.
flags Copy-back flags.
Returns:
Error code, if any.

virtual int SourcePawn::ICallable::PushFloat ( float  number  )  [pure virtual]

Pushes a float onto the current call.

Parameters:
number Parameter value to push.
Returns:
Error code, if any.

virtual int SourcePawn::ICallable::PushFloatByRef ( float *  number,
int  flags = SM_PARAM_COPYBACK 
) [pure virtual]

Pushes a float onto the current call by reference. NOTE: On Execute, the pointer passed will be modified if copyback is enabled. NOTE: By reference parameters are cached and thus are not read until execution. This means you cannot push a pointer, change it, and push it again and expect two different values to come out.

Parameters:
number Parameter value to push. &
flags Copy-back flags.
Returns:
Error code, if any.

virtual int SourcePawn::ICallable::PushArray ( cell_t inarray,
unsigned int  cells,
int  flags = 0 
) [pure virtual]

Pushes an array of cells onto the current call.

On Execute, the pointer passed will be modified if non-NULL and copy-back is enabled.

By reference parameters are cached and thus are not read until execution. This means you cannot push a pointer, change it, and push it again and expect two different values to come out.

Parameters:
inarray Array to copy, NULL if no initial array should be copied.
cells Number of cells to allocate and optionally read from the input array.
flags Whether or not changes should be copied back to the input array.
Returns:
Error code, if any.

Implemented in SourceMod::IForward.

virtual int SourcePawn::ICallable::PushString ( const char *  string  )  [pure virtual]

Pushes a string onto the current call.

Parameters:
string String to push.
Returns:
Error code, if any.

virtual int SourcePawn::ICallable::PushStringEx ( char *  buffer,
size_t  length,
int  sz_flags,
int  cp_flags 
) [pure virtual]

Pushes a string or string buffer.

NOTE: On Execute, the pointer passed will be modified if copy-back is enabled.

Parameters:
buffer Pointer to string buffer.
length Length of buffer.
sz_flags String flags. In copy mode, the string will be copied according to the handling (ascii, utf-8, binary, etc).
cp_flags Copy-back flags.
Returns:
Error code, if any.


The documentation for this class was generated from the following file:
Generated on Fri Aug 29 01:10:26 2008 for SourceMod SDK by  doxygen 1.5.1