Lua SPOT
v1.0

se.krka.kahlua.stdlib
Class CoroutineLib

java.lang.Object
  extended by se.krka.kahlua.stdlib.CoroutineLib
All Implemented Interfaces:
JavaFunction

public class CoroutineLib
extends java.lang.Object
implements JavaFunction


Constructor Summary
CoroutineLib(int index)
           
 
Method Summary
 int call(LuaCallFrame callFrame, int nArguments)
          General contract

Input:
callFrame = the frame that contains all the arguments, and where all the results should be put.
nArgs = number of function arguments
callFrame.get(i) = an argument (0 <= i < nArgs)
static void register(LuaState state)
           
 java.lang.String toString()
           
static int yield(LuaCallFrame callFrame, int nArguments)
           
static void yieldHelper(LuaCallFrame callFrame, LuaCallFrame argsCallFrame, int nArguments)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CoroutineLib

public CoroutineLib(int index)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

register

public static void register(LuaState state)

call

public int call(LuaCallFrame callFrame,
                int nArguments)
Description copied from interface: JavaFunction
General contract

Input:
callFrame = the frame that contains all the arguments, and where all the results should be put.
nArgs = number of function arguments
callFrame.get(i) = an argument (0 <= i < nArgs)

Specified by:
call in interface JavaFunction
Parameters:
callFrame - - the current callframe for the function
nArguments - - number of function arguments
Returns:
N - number of return values. The N top objects on the stack are considered the return values

yield

public static int yield(LuaCallFrame callFrame,
                        int nArguments)

yieldHelper

public static void yieldHelper(LuaCallFrame callFrame,
                               LuaCallFrame argsCallFrame,
                               int nArguments)

Lua SPOT
v1.0