index

Reference: asIScriptGeneric

class asIScriptGeneric
{
public:
  void   *GetEngine();

  void   *GetObject();
	
  asDWORD GetArgDWord(asUINT arg);
  asQWORD GetArgQWord(asUINT arg);
  float   GetArgFloat(asUINT arg);
  double  GetArgDouble(asUINT arg);
  void   *GetArgObject(asUINT arg);

  int     SetReturnDWord(asDWORD val);
  int     SetReturnQWord(asQWORD val);
  int     SetReturnFloat(float val);
  int     SetReturnDouble(double val);
  int     SetReturnObject(void *obj);
};

GetEngine

int GetEngine();

Description

This method returns the engine, for which this generic call is registered.

Returns

The engine pointer.

GetObject

void *GetObject();

Description

Retrieve the object pointer for the generic class method.

Returns

The object pointer.

GetArg

asDWORD GetArgDWord(asUINT arg);
asQWORD GetArgQWord(asUINT arg);
float   GetArgFloat(asUINT arg);
double  GetArgDouble(asUINT arg);
void   *GetArgObject(asUINT arg);

Description

Gets the value of an argument, based on the index of the argument.

Arguments with the type of an object, shouldn't be released as the library will automatically do this when the function returns.

Parameters

arg 

The index of the argument, beginning with 0.

Returns

The value of the argument.

SetReturn

int SetReturnDWord(asDWORD val);
int SetReturnQWord(asQWORD val);
int SetReturnFloat(float val);
int SetReturnDouble(double val);
int SetReturnObject(void *obj);

Description

Sets the value that should be returned to the calling function.

If the function returns an object, the library will automatically do what is necessary based on how the object was declared, i.e. if the function was registered to return a handle then the library will call the addref behaviour. If it was registered to return an object by value, then the library will make a copy of the object.

Parameters

val 

The return value.

obj 

A pointer to an object.

Returns

A negative value if the method fails.

top