finished massive reorganization - IPluginFunction is now part of the VM, NOT the plugin system! This is how it should have been in the first place...
1 #ifndef _INCLUDE_SOURCEMOD_BASEFUNCTION_H_
2 #define _INCLUDE_SOURCEMOD_BASEFUNCTION_H_
4 #include "sm_globals.h"
8 int flags; /* Copy-back flags */
9 bool marked; /* Whether this is marked as being used */
10 cell_t local_addr; /* Local address to free */
11 cell_t *phys_addr; /* Physical address of our copy */
12 cell_t *orig_addr; /* Original address to copy back to */
13 ucell_t size; /* Size of array in bytes */
18 class CFunction : public IPluginFunction
20 friend class SourcePawnEngine;
22 CFunction(funcid_t funcid, IPluginContext *pContext);
24 virtual int PushCell(cell_t cell);
25 virtual int PushCellByRef(cell_t *cell, int flags);
26 virtual int PushFloat(float number);
27 virtual int PushFloatByRef(float *number, int flags);
28 virtual int PushArray(cell_t *inarray, unsigned int cells, cell_t **phys_addr, int copyback);
29 virtual int PushString(const char *string);
30 virtual int PushStringEx(char *buffer, size_t length, int sz_flags, int cp_flags);
31 virtual cell_t *GetAddressOfPushedParam(unsigned int param);
32 virtual int Execute(cell_t *result);
33 virtual void Cancel();
34 virtual int CallFunction(const cell_t *params, unsigned int num_params, cell_t *result);
35 virtual IPluginContext *GetParentContext();
37 void Set(funcid_t funcid, IPluginContext *plugin);
39 int _PushString(const char *string, int sz_flags, int cp_flags, size_t len);
40 inline int SetError(int err)
47 IPluginContext *m_pContext;
48 cell_t m_params[SP_MAX_EXEC_PARAMS];
49 ParamInfo m_info[SP_MAX_EXEC_PARAMS];
50 unsigned int m_curparam;
55 #endif //_INCLUDE_SOURCEMOD_BASEFUNCTION_H_