cocos2d-x  3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LuaBasicConversions.h File Reference
#include "lua.h"
#include "tolua++.h"
#include "tolua_fix.h"
#include "cocos2d.h"

Macros

#define LUA_PRECONDITION(condition,...)

Functions

bool  (lua_State *L, int lo, const char *type, int def)
 If the typename of userdata at the given accepteable index of stack is equal to type it return true,otherwise return false . More...
 
template<class T >
const char *  (T *ret, const char *type)
 Get the real typename for the specified typename. More...
 
template<class T >
void  (lua_State *L, const char *type, T *ret)
 Push the native object by userdata format into the Lua stack by typename. More...
 
void  (lua_State *L, const cocos2d::MeshVertexAttrib &inValue)
 Push a table converted from a cocos2d::MeshVertexAttrib object into the Lua stack. More...
 
void  (lua_State *L, const std::vector< std::string > &inValue)
 Push a Lua array table converted from a std::vector<std::string> into the Lua stack. More...
 
void  (lua_State *L, const std::vector< int > &inValue)
 Push a Lua array table converted from a std::vector<int> into the Lua stack. More...
 
void  (lua_State *L, const std::vector< float > &inValue)
 Push a Lua array table converted from a std::vector<float> into the Lua stack. More...
 
void  (lua_State *L, const std::vector< unsigned short > &inValue)
 Push a Lua array table converted from a std::vector<unsigned short> into the Lua stack. More...
 
void  (lua_State *L, const cocos2d::Quaternion &inValue)
 Push a table converted from a cocos2d::Quaternion object into the Lua stack. More...
 
luaval_to_native

The following function are all used to convert the Lua values at the given acceptable index to the corresponding c++ values.

If the Lua values can be converted the return value is true, otherwise return false. If it happens error during the conversion process, it outputs the error msg in the console to provide infromation about the name of calling function, the typename of value at the given acceptable index, and so on.

bool  (lua_State *L, int lo, unsigned long *outValue, const char *funcName="")
 Get a unsigned long value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, unsigned short *outValue, const char *funcName="")
 Get a unsigned short value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, int *outValue, const char *funcName="")
 Get a int value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, unsigned int *outValue, const char *funcName="")
 Get a unsigned int value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, uint16_t *outValue, const char *funcName="")
 Get a uint16_t value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, bool *outValue, const char *funcName="")
 Get a boolean value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, double *outValue, const char *funcName="")
 Get a double value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, long long *outValue, const char *funcName="")
 Get a long long value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, std::string *outValue, const char *funcName="")
 Get a std::string value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, long *outValue, const char *funcName="")
 Get a long value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, ssize_t *outValue, const char *funcName="")
 Get a ssize_t value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, Size *outValue, const char *funcName="")
 Get a Size object value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, Rect *outValue, const char *funcName="")
 Get a Rect object value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, Color3B *outValue, const char *funcName="")
 Get a Color3B object value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, Color4B *outValue, const char *funcName="")
 Get a Color4B object value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, Color4F *outValue, const char *funcName="")
 Get a Color4F object value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, cocos2d::PhysicsMaterial *outValue, const char *funcName="")
 Get a PhysicsMaterial object value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, AffineTransform *outValue, const char *funcName="")
 If the value at the given accpetable index of stack is a table it returns true, otherwise returns false. More...
 
bool  (lua_State *L, int lo, FontDefinition *outValue, const char *funcName="")
 Get a FontDefinition object value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, cocos2d::Mat4 *outValue, const char *funcName="")
 Get a Mat object value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, __Array **outValue, const char *funcName="")
 Get a __Array object value frome the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, __Dictionary **outValue, const char *funcName="")
 Get a __Dictionary object value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, cocos2d::Vec2 **points, int *numPoints, const char *funcName="")
 Get a array of Vec2 object from the given accpetable index of stack. More...
 
bool  (lua_State *L, int argc, __Array **ret)
 Get a __Array object value by the argc numbers of Lua values in the stack. More...
 
bool  (lua_State *L, int argc, cocos2d::ValueVector *ret)
 Get a cocos2d::ValueVector object value by the argc numbers of Lua values in the stack. More...
 
bool  (lua_State *L, int lo, cocos2d::Vec2 *outValue, const char *funcName="")
 Get a Vec2 object value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, cocos2d::Vec3 *outValue, const char *funcName="")
 Get a Vec3 object value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, cocos2d::Vec4 *outValue, const char *funcName="")
 Get a Vec4 object value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, cocos2d::BlendFunc *outValue, const char *funcName="")
 Get a BlendFunc object value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, cocos2d::TTFConfig *outValue, const char *funcName="")
 Get a TTFConfig object value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, cocos2d::Uniform *outValue, const char *funcName="")
 Get a Uniform object value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, cocos2d::VertexAttrib *outValue, const char *funcName="")
 Get a VertexAttrib object value from the given accpetable index of stack. More...
 
template<class T >
bool  (lua_State *L, int argc, cocos2d::Vector< T > *ret)
 Get a cocos2d::Vector of type T objects by the argc numbers of Lua values in the stack. More...
 
template<class T >
bool  (lua_State *L, int lo, cocos2d::Vector< T > *ret, const char *funcName="")
 Get a cocos2d::Vector of type T objects from a Lua table in the stack. More...
 
bool  (lua_State *L, int lo, std::vector< std::string > *ret, const char *funcName="")
 Get a pointer points to a std::vector<std::string> from a Lua array table in the stack. More...
 
bool  (lua_State *L, int lo, std::vector< int > *ret, const char *funcName="")
 Get a pointer points to a std::vector<std::int> from a Lua array table in the stack. More...
 
template<class T >
bool  (lua_State *L, int lo, cocos2d::Map< std::string, T > *ret, const char *funcName="")
 Get a pointer points to a cocos2d::Map whose key/value pair is string value and T object from a Lua hash-map table in the stack. More...
 
bool  (lua_State *L, int lo, cocos2d::Value *ret, const char *funcName="")
 Get a cocos2d::Value object from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, cocos2d::ValueMap *ret, const char *funcName="")
 Get a cocos2d::ValueMap object from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, cocos2d::ValueMapIntKey *ret, const char *funcName="")
 Get a cocos2d::ValueMapIntKey object from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, cocos2d::ValueVector *ret, const char *funcName="")
 Get a cocos2d::ValueVector object from the given accpetable index of stack. More...
 
template<class T >
bool  (lua_State *L, int lo, const char *type, T **ret)
 Get a Type T object from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, cocos2d::MeshVertexAttrib *ret, const char *funcName="")
 Get a cocos2d::MeshVertexAttrib object value from the given accpetable index of stack. More...
 
bool  (lua_State *L, int lo, std::vector< float > *ret, const char *funcName="")
 Get a pointer points to a std::vector<float> from a Lua array table in the stack. More...
 
bool  (lua_State *L, int lo, std::vector< unsigned short > *ret, const char *funcName="")
 Get a pointer points to a std::vector<unsigned shortt> from a Lua array table in the stack. More...
 
bool  (lua_State *L, int lo, cocos2d::Quaternion *outValue, const char *funcName="")
 Get a cocos2d::Quaternion object value from the given accpetable index of stack. More...
 
native_to_luaval

The following function are all used to convert native c++ values to the the corresponding Lua values,then push it into the Lua stack.

void  (lua_State *L, const cocos2d::Vec2 &vec2)
 Push a table converted from a cocos2d::Vec2 object into the Lua stack. More...
 
void  (lua_State *L, const cocos2d::Vec3 &vec3)
 Push a table converted from a cocos2d::Vec3 object into the Lua stack. More...
 
void  (lua_State *L, const cocos2d::Vec4 &vec4)
 Push a table converted from a cocos2d::Vec4 object into the Lua stack. More...
 
void  (lua_State *L, const cocos2d::Vec2 *points, int count)
 Push a table converted from a cocos2d::Vec2 array into the Lua stack. More...
 
void  (lua_State *L, const Size &sz)
 Push a table converted from a cocos2d::Size object into the Lua stack. More...
 
void  (lua_State *L, const Rect &rt)
 Push a table converted from a cocos2d::Rect object into the Lua stack. More...
 
void  (lua_State *L, const Color3B &cc)
 Push a table converted from a cocos2d::Color3B object into the Lua stack. More...
 
void  (lua_State *L, const Color4B &cc)
 Push a table converted from a cocos2d::Color4B object into the Lua stack. More...
 
void  (lua_State *L, const Color4F &cc)
 Push a table converted from a cocos2d::Color4F object into the Lua stack. More...
 
void  (lua_State *L, const PhysicsMaterial &pm)
 Push a table converted from a cocos2d::PhysicsMaterial object into the Lua stack. More...
 
void  (lua_State *L, const PhysicsRayCastInfo &info)
 Push a table converted from a cocos2d::PhysicsRayCastInfo object into the Lua stack. More...
 
void  (lua_State *L, const PhysicsContactData *data)
 Push a table converted from a cocos2d::PhysicsContactData object into the Lua stack. More...
 
void  (lua_State *L, const AffineTransform &inValue)
 Push a table converted from a cocos2d::AffineTransform object into the Lua stack. More...
 
void  (lua_State *L, const FontDefinition &inValue)
 Push a table converted from a cocos2d::FontDefinition object into the Lua stack. More...
 
void  (lua_State *L, const cocos2d::Mat4 &mat)
 Push a table converted from a cocos2d::Mat4 object into the Lua stack. More...
 
void  (lua_State *L, const cocos2d::BlendFunc &func)
 Push a table converted from a cocos2d::BlendFunc object into the Lua stack. More...
 
void  (lua_State *L, const cocos2d::TTFConfig &config)
 Push a table converted from a cocos2d::TTFConfig object into the Lua stack. More...
 
void  (lua_State *L, const cocos2d::Uniform &uniform)
 Push a table converted from a cocos2d::Uniform object into the Lua stack. More...
 
void  (lua_State *L, const cocos2d::VertexAttrib &verAttrib)
 Push a table converted from a cocos2d::VertexAttrib object into the Lua stack. More...
 
template<class T >
void  (lua_State *L, const cocos2d::Vector< T > &inValue)
 Push a table converted from a cocos2d::Vector object into the Lua stack. More...
 
template<class T >
void  (lua_State *L, const cocos2d::Map< std::string, T > &v)
 Push a table converted from a cocos2d::Map object into the Lua stack. More...
 
void  (lua_State *L, const cocos2d::Value &inValue)
 Push a Lua value converted from a cocos2d::Value object into the Lua stack. More...
 
void  (lua_State *L, const cocos2d::ValueMap &inValue)
 Push a Lua hash table converted from a cocos2d::ValueMap object into the Lua stack. More...
 
void  (lua_State *L, const cocos2d::ValueMapIntKey &inValue)
 Push a Lua hash table converted from a cocos2d::ValueMapIntKey object into the Lua stack. More...
 
void  (lua_State *L, const cocos2d::ValueVector &inValue)
 Push a Lua array table converted from a cocos2d::ValueVector object into the Lua stack. More...
 

Variables

std::unordered_map
< std::string, std::string > 
g_luaType
std::unordered_map
< std::string, std::string > 
g_typeCast
var g_typeCast
local g_typeCast

Macro Definition Documentation

#define LUA_PRECONDITION (   condition,
  ... 
)
Value:
if( ! (condition) ) { \
cocos2d::log("lua: ERROR: File %s: Line: %d, Function: %s", __FILE__, __LINE__, __FUNCTION__ ); \
cocos2d::log(__VA_ARGS__); \
} \
var LUA_PRECONDITION (   var,
  ... 
)
Value:
if( ! (condition) ) { \
cocos2d::log("lua: ERROR: File %s: Line: %d, Function: %s", __FILE__, __LINE__, __FUNCTION__ ); \
cocos2d::log(__VA_ARGS__); \
} \
local LUA_PRECONDITION (   local,
  ... 
)
Value:
if( ! (condition) ) { \
cocos2d::log("lua: ERROR: File %s: Line: %d, Function: %s", __FILE__, __LINE__, __FUNCTION__ ); \
cocos2d::log(__VA_ARGS__); \
} \

Function Documentation

bool luaval_is_usertype ( lua_State *  L,
int  lo,
const char *  type,
int  def 
)

If the typename of userdata at the given accepteable index of stack is equal to type it return true,otherwise return false .

If def != 0, lo could greater than the top index of stack, return value is true. If the value of the given index is nil, retrun value also is true.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
typethe typename used to judge. def whether has default value.
Returns
Return true if the typename of userdata at the given accepteable index of stack is equal to type, otherwise return false.
var luaval_is_usertype ( var  L,
var  lo,
var  type,
var  def 
)

If the typename of userdata at the given accepteable index of stack is equal to type it return true,otherwise return false .

If def != 0, lo could greater than the top index of stack, return value is true. If the value of the given index is nil, retrun value also is true.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
typethe typename used to judge. def whether has default value.
Returns
Return true if the typename of userdata at the given accepteable index of stack is equal to type, otherwise return false.
local luaval_is_usertype ( local  L,
local  lo,
local  type,
local  def 
)

If the typename of userdata at the given accepteable index of stack is equal to type it return true,otherwise return false .

If def != 0, lo could greater than the top index of stack, return value is true. If the value of the given index is nil, retrun value also is true.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
typethe typename used to judge. def whether has default value.
Returns
Return true if the typename of userdata at the given accepteable index of stack is equal to type, otherwise return false.
bool luaval_to_ulong ( lua_State *  L,
int  lo,
unsigned long *  outValue,
const char *  funcName = "" 
)

Get a unsigned long value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a number or a string convertible to a number it returns true, otherwise returns false .

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store the value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a number or a string convertible to a number, otherwise return false.
var luaval_to_ulong ( var  L,
var  lo,
var  outValue,
var  funcName = "" 
)

Get a unsigned long value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a number or a string convertible to a number it returns true, otherwise returns false .

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store the value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a number or a string convertible to a number, otherwise return false.
local luaval_to_ulong ( local  L,
local  lo,
local  outValue,
local  funcName = "" 
)

Get a unsigned long value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a number or a string convertible to a number it returns true, otherwise returns false .

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store the value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a number or a string convertible to a number, otherwise return false.
bool luaval_to_ushort ( lua_State *  L,
int  lo,
unsigned short *  outValue,
const char *  funcName = "" 
)

Get a unsigned short value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a number or a string convertible to a number it returns true, otherwise returns false .

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store the unsigned short value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a number or a string convertible to a number, otherwise return false.
var luaval_to_ushort ( var  L,
var  lo,
var  outValue,
var  funcName = "" 
)

Get a unsigned short value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a number or a string convertible to a number it returns true, otherwise returns false .

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store the unsigned short value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a number or a string convertible to a number, otherwise return false.
local luaval_to_ushort ( local  L,
local  lo,
local  outValue,
local  funcName = "" 
)

Get a unsigned short value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a number or a string convertible to a number it returns true, otherwise returns false .

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store the unsigned short value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a number or a string convertible to a number, otherwise return false.
bool luaval_to_int32 ( lua_State *  L,
int  lo,
int *  outValue,
const char *  funcName = "" 
)

Get a int value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a number or a string convertible to a number it returns true, otherwise returns false .

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store the int value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a number or a string convertible to a number, otherwise return false.
var luaval_to_int32 ( var  L,
var  lo,
var  outValue,
var  funcName = "" 
)

Get a int value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a number or a string convertible to a number it returns true, otherwise returns false .

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store the int value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a number or a string convertible to a number, otherwise return false.
local luaval_to_int32 ( local  L,
local  lo,
local  outValue,
local  funcName = "" 
)

Get a int value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a number or a string convertible to a number it returns true, otherwise returns false .

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store the int value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a number or a string convertible to a number, otherwise return false.
bool luaval_to_uint32 ( lua_State *  L,
int  lo,
unsigned int *  outValue,
const char *  funcName = "" 
)

Get a unsigned int value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a number or a string convertible to a number it returns true, otherwise returns false .

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store the unsigned int value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a number or a string convertible to a number, otherwise return false.
var luaval_to_uint32 ( var  L,
var  lo,
var  outValue,
var  funcName = "" 
)

Get a unsigned int value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a number or a string convertible to a number it returns true, otherwise returns false .

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store the unsigned int value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a number or a string convertible to a number, otherwise return false.
local luaval_to_uint32 ( local  L,
local  lo,
local  outValue,
local  funcName = "" 
)

Get a unsigned int value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a number or a string convertible to a number it returns true, otherwise returns false .

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store the unsigned int value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a number or a string convertible to a number, otherwise return false.
bool luaval_to_uint16 ( lua_State *  L,
int  lo,
uint16_t outValue,
const char *  funcName = "" 
)

Get a uint16_t value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a number or a string convertible to a number it returns true, otherwise returns false .

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store the uint16_t value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a number or a string convertible to a number, otherwise return false.
bool luaval_to_boolean ( lua_State *  L,
int  lo,
bool *  outValue,
const char *  funcName = "" 
)

Get a boolean value from the given accpetable index of stack.

If the value at the given accpetable index of stack has type boolean it returns true, otherwise returns false. Any Lua value is different from false and nil, the value of conversion is true, otherwise the value is false. If the lo is non-valid index, the value of coversion also is false.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store the boolean value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a number or a string convertible to a number, otherwise return false.
bool luaval_to_number ( lua_State *  L,
int  lo,
double *  outValue,
const char *  funcName = "" 
)

Get a double value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a number or a string convertible to a number it returns true, otherwise returns false.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store the double value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a number or a string convertible to a number, otherwise return false.
bool luaval_to_long_long ( lua_State *  L,
int  lo,
long long *  outValue,
const char *  funcName = "" 
)

Get a long long value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a number or a string convertible to a number it returns true, otherwise returns false.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store the long long value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a number or a string convertible to a number, otherwise return false.
var luaval_to_long_long ( var  L,
var  lo,
var  outValue,
var  funcName = "" 
)

Get a long long value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a number or a string convertible to a number it returns true, otherwise returns false.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store the long long value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a number or a string convertible to a number, otherwise return false.
local luaval_to_long_long ( local  L,
local  lo,
local  outValue,
local  funcName = "" 
)

Get a long long value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a number or a string convertible to a number it returns true, otherwise returns false.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store the long long value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a number or a string convertible to a number, otherwise return false.
bool luaval_to_std_string ( lua_State *  L,
int  lo,
std::string *  outValue,
const char *  funcName = "" 
)

Get a std::string value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a string or a number convertible to a string it returns true, otherwise returns false.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store std::string value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is is a string or a number convertible to a string, otherwise return false.
var luaval_to_std_string ( var  L,
var  lo,
var  outValue,
var  funcName = "" 
)

Get a std::string value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a string or a number convertible to a string it returns true, otherwise returns false.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store std::string value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is is a string or a number convertible to a string, otherwise return false.
local luaval_to_std_string ( local  L,
local  lo,
local  outValue,
local  funcName = "" 
)

Get a std::string value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a string or a number convertible to a string it returns true, otherwise returns false.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store std::string value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is is a string or a number convertible to a string, otherwise return false.
bool luaval_to_long ( lua_State *  L,
int  lo,
long *  outValue,
const char *  funcName = "" 
)

Get a long value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a number or a string convertible to a number it returns true, otherwise returns false.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store the long value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a number or a string convertible to a number, otherwise return false.
var luaval_to_long ( var  L,
var  lo,
var  outValue,
var  funcName = "" 
)

Get a long value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a number or a string convertible to a number it returns true, otherwise returns false.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store the long value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a number or a string convertible to a number, otherwise return false.
local luaval_to_long ( local  L,
local  lo,
local  outValue,
local  funcName = "" 
)

Get a long value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a number or a string convertible to a number it returns true, otherwise returns false.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store the long value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a number or a string convertible to a number, otherwise return false.
bool luaval_to_ssize ( lua_State *  L,
int  lo,
ssize_t outValue,
const char *  funcName = "" 
)

Get a ssize_t value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a number or a string convertible to a number it returns true, otherwise returns false.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to store the ssize_t value converted from the Lua value.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a number or a string convertible to a number, otherwise return false.
bool luaval_to_size ( lua_State *  L,
int  lo,
Size outValue,
const char *  funcName = "" 
)

Get a Size object value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a table it returns true, otherwise returns false. If the table has the width and height key and the corresponding values are not nil, this function would assign the values to the corresponding members of outValue. Otherwise, the value of members of outValue would be 0.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to a Size object which stores the values from the Lua table.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luaval_to_rect ( lua_State *  L,
int  lo,
Rect outValue,
const char *  funcName = "" 
)

Get a Rect object value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a table it returns true, otherwise returns false. If the table has the x,y,width and height keys and the corresponding values are not nil, this function would assign the values to the corresponding members of outValue. Otherwise, the value of members of outValue would be 0.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to a Rect object which stores the values from the Lua table.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luaval_to_color3b ( lua_State *  L,
int  lo,
Color3B outValue,
const char *  funcName = "" 
)

Get a Color3B object value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a table it returns true, otherwise returns false. If the table has the r,g and b keys and the corresponding values are not nil, this function would assign the values to the corresponding members of outValue. Otherwise, the value of members of outValue would be 0.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to a Color3B object which stores the values from the Lua table.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luaval_to_color4b ( lua_State *  L,
int  lo,
Color4B outValue,
const char *  funcName = "" 
)

Get a Color4B object value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a table it returns true, otherwise returns false. If the table has the r,g, b and 'a' keys and the corresponding values are not nil, this function would assign the values to the corresponding members of outValue. Otherwise, the value of members of outValue would be 0.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to a Color4B object which stores the values from the Lua table.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luaval_to_color4f ( lua_State *  L,
int  lo,
Color4F outValue,
const char *  funcName = "" 
)

Get a Color4F object value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a table it returns true, otherwise returns false. If the table has the r,g, b and 'a' keys and the corresponding values are not nil, this function would assign the values to the corresponding members of outValue. Otherwise, the value of members of outValue would be 0.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to a Color4F object which stores the values from the Lua table.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luaval_to_physics_material ( lua_State *  L,
int  lo,
cocos2d::PhysicsMaterial *  outValue,
const char *  funcName = "" 
)

Get a PhysicsMaterial object value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a table it returns true, otherwise returns false. If the table has the density,restitution and 'friction' keys and the corresponding values are not nil, this function would assign the values to the corresponding members of outValue. Otherwise, the value of members of outValue would be 0.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to a cocos2d::PhysicsMaterial object which stores the values from the Lua table.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luaval_to_affinetransform ( lua_State *  L,
int  lo,
AffineTransform outValue,
const char *  funcName = "" 
)

If the value at the given accpetable index of stack is a table it returns true, otherwise returns false.

If the table has the a, b, c, d , tx and ty keys and the corresponding values are not nil, this function would assign the values to the corresponding members of outValue. Otherwise, the value of members of outValue would be 0.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to a AffineTransform object which stores the values from the Lua table.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luaval_to_fontdefinition ( lua_State *  L,
int  lo,
FontDefinition outValue,
const char *  funcName = "" 
)

Get a FontDefinition object value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a table it returns true, otherwise returns false. If the table has the fontName, fontSize, fontAlignmentH, fontAlignmentV , fontFillColor ,fontDimensions, shadowEnabled and strokeEnabled keys and the corresponding values are not nil, this function would assign the values to the corresponding members of outValue. Otherwise, the value of members of outValue would be 0. If the values about shadowEnabled and strokeEnabled are true, there would be more keys such as shadowOffset, shadowBlur ,shadowOpacity, strokeColor, and strokeSize.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to a FontDefinition object which stores the values from the Lua table.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luaval_to_mat4 ( lua_State *  L,
int  lo,
cocos2d::Mat4 *  outValue,
const char *  funcName = "" 
)

Get a Mat object value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a table it returns true, otherwise returns false. The table is array-table which begin the index starts at 1.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to a Mat object which stores the values from the Lua table.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
var luaval_to_mat4 ( var  L,
var  lo,
var  outValue,
var  funcName = "" 
)

Get a Mat object value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a table it returns true, otherwise returns false. The table is array-table which begin the index starts at 1.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to a Mat object which stores the values from the Lua table.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
local luaval_to_mat4 ( local  L,
local  lo,
local  outValue,
local  funcName = "" 
)

Get a Mat object value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a table it returns true, otherwise returns false. The table is array-table which begin the index starts at 1.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to a Mat object which stores the values from the Lua table.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luaval_to_array ( lua_State *  L,
int  lo,
__Array **  outValue,
const char *  funcName = "" 
)

Get a __Array object value frome the given accpetable index of stack.

Because __Array is deprecated, so this function would be not called anymore.

bool luaval_to_dictionary ( lua_State *  L,
int  lo,
__Dictionary **  outValue,
const char *  funcName = "" 
)

Get a __Dictionary object value from the given accpetable index of stack.

Because __Dictionary is deprecated, so this function would be not called anymore.

var luaval_to_dictionary ( var  L,
var  lo,
var  outValue,
var  funcName = "" 
)

Get a __Dictionary object value from the given accpetable index of stack.

Because __Dictionary is deprecated, so this function would be not called anymore.

local luaval_to_dictionary ( local  L,
local  lo,
local  outValue,
local  funcName = "" 
)

Get a __Dictionary object value from the given accpetable index of stack.

Because __Dictionary is deprecated, so this function would be not called anymore.

bool luaval_to_array_of_vec2 ( lua_State *  L,
int  lo,
cocos2d::Vec2 **  points,
int *  numPoints,
const char *  funcName = "" 
)

Get a array of Vec2 object from the given accpetable index of stack.

If the value at the given accpetable index of stack is a table it returns true, otherwise returns false.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
pointsthe pointer to a array of Vec2 object which stores the values from the Lua table.
numPointsa int pointer to store the size of a Vec2 object array.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
var luaval_to_array_of_vec2 ( var  L,
var  lo,
var  points,
var  numPoints,
var  funcName = "" 
)

Get a array of Vec2 object from the given accpetable index of stack.

If the value at the given accpetable index of stack is a table it returns true, otherwise returns false.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
pointsthe pointer to a array of Vec2 object which stores the values from the Lua table.
numPointsa int pointer to store the size of a Vec2 object array.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
local luaval_to_array_of_vec2 ( local  L,
local  lo,
local  points,
local  numPoints,
local  funcName = "" 
)

Get a array of Vec2 object from the given accpetable index of stack.

If the value at the given accpetable index of stack is a table it returns true, otherwise returns false.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
pointsthe pointer to a array of Vec2 object which stores the values from the Lua table.
numPointsa int pointer to store the size of a Vec2 object array.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luavals_variadic_to_array ( lua_State *  L,
int  argc,
__Array **  ret 
)

Get a __Array object value by the argc numbers of Lua values in the stack.

Because __Array is deprecated, so this function would be not called anymore.

bool
luavals_variadic_to_ccvaluevector
( lua_State *  L,
int  argc,
cocos2d::ValueVector ret 
)

Get a cocos2d::ValueVector object value by the argc numbers of Lua values in the stack.

Parameters
Lthe current lua_State.
argcthe numbers of Lua values in the stack.
retthe pointer to a ValueVector object which stores the values from the Lua table.
Returns
Return false if argc equal to 0 or L equal to nullptr, otherwise return true.
var
luavals_variadic_to_ccvaluevector
( var  L,
var  argc,
var  ret 
)

Get a cocos2d::ValueVector object value by the argc numbers of Lua values in the stack.

Parameters
Lthe current lua_State.
argcthe numbers of Lua values in the stack.
retthe pointer to a ValueVector object which stores the values from the Lua table.
Returns
Return false if argc equal to 0 or L equal to nullptr, otherwise return true.
local
luavals_variadic_to_ccvaluevector
( local  L,
local  argc,
local  ret 
)

Get a cocos2d::ValueVector object value by the argc numbers of Lua values in the stack.

Parameters
Lthe current lua_State.
argcthe numbers of Lua values in the stack.
retthe pointer to a ValueVector object which stores the values from the Lua table.
Returns
Return false if argc equal to 0 or L equal to nullptr, otherwise return true.
bool luaval_to_vec2 ( lua_State *  L,
int  lo,
cocos2d::Vec2 *  outValue,
const char *  funcName = "" 
)

Get a Vec2 object value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a table it returns true, otherwise returns false. If the table has the x,and 'y' keys and the corresponding values are not nil, this function would assign the values to the corresponding members of outValue. Otherwise, the value of members of outValue would be 0.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to a Vec2 object which stores the values from the Lua table.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luaval_to_vec3 ( lua_State *  L,
int  lo,
cocos2d::Vec3 *  outValue,
const char *  funcName = "" 
)

Get a Vec3 object value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a table it returns true, otherwise returns false. If the table has the x, 'y' and z keys and the corresponding values are not nil, this function would assign the values to the corresponding members of outValue. Otherwise, the value of members of outValue would be 0.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to a Vec3 object which stores the values from the Lua table.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luaval_to_vec4 ( lua_State *  L,
int  lo,
cocos2d::Vec4 *  outValue,
const char *  funcName = "" 
)

Get a Vec4 object value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a table it returns true, otherwise returns false. If the table has the x, 'y', z and w keys and the corresponding values are not nil, this function would assign the values to the corresponding members of outValue. Otherwise, the value of members of outValue would be 0.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to a Vec4 object which stores the values from the Lua table.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luaval_to_blendfunc ( lua_State *  L,
int  lo,
cocos2d::BlendFunc outValue,
const char *  funcName = "" 
)

Get a BlendFunc object value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a table it returns true, otherwise returns false. If the table has the src and 'dst' keys and the corresponding values are not nil, this function would assign the values to the corresponding members of outValue. Otherwise, the value of members of outValue would be 0.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to a BlendFunc object which stores the values from the Lua table.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luaval_to_ttfconfig ( lua_State *  L,
int  lo,
cocos2d::TTFConfig *  outValue,
const char *  funcName = "" 
)

Get a TTFConfig object value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a table it returns true, otherwise returns false. If the table has the fontFilePath, fontSize, glyphs, customGlyphs, distanceFieldEnabled and 'outlineSize' keys and the corresponding values are not nil, this function would assign the values to the corresponding members of outValue. Otherwise, the value of members of outValue would be given the default value.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to a TTFConfig object which stores the values from the Lua table.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luaval_to_uniform ( lua_State *  L,
int  lo,
cocos2d::Uniform outValue,
const char *  funcName = "" 
)

Get a Uniform object value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a table it returns true, otherwise returns false. If the table has the location, size, type and name keys and the corresponding values are not nil, this function would assign the values to the corresponding members of outValue. Otherwise, the value of members of outValue would be given the default value.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to a Uniform object which stores the values from the Lua table.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luaval_to_vertexattrib ( lua_State *  L,
int  lo,
cocos2d::VertexAttrib outValue,
const char *  funcName = "" 
)

Get a VertexAttrib object value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a table it returns true, otherwise returns false. If the table has the index, size, type and name keys and the corresponding values are not nil, this function would assign the values to the corresponding members of outValue. Otherwise, the value of members of outValue would be given the default value.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
outValuethe pointer to a VertexAttrib object which stores the values from the Lua table.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luavals_variadic_to_ccvector ( lua_State *  L,
int  argc,
cocos2d::Vector< T > *  ret 
)

Get a cocos2d::Vector of type T objects by the argc numbers of Lua values in the stack.

Parameters
Lthe current lua_State.
argcthe numbers of Lua values in the stack.
reta cocos2d::Vector of type T objects.
Returns
Return false if argc equal to 0 , L equal to nullptr or the Lua userdata at the index isn't cc.Ref type, otherwise return true.
var luavals_variadic_to_ccvector ( var  L,
var  argc,
var  ret 
)

Get a cocos2d::Vector of type T objects by the argc numbers of Lua values in the stack.

Parameters
Lthe current lua_State.
argcthe numbers of Lua values in the stack.
reta cocos2d::Vector of type T objects.
Returns
Return false if argc equal to 0 , L equal to nullptr or the Lua userdata at the index isn't cc.Ref type, otherwise return true.
local luavals_variadic_to_ccvector ( local  L,
local  argc,
local  ret 
)

Get a cocos2d::Vector of type T objects by the argc numbers of Lua values in the stack.

Parameters
Lthe current lua_State.
argcthe numbers of Lua values in the stack.
reta cocos2d::Vector of type T objects.
Returns
Return false if argc equal to 0 , L equal to nullptr or the Lua userdata at the index isn't cc.Ref type, otherwise return true.
bool luaval_to_ccvector ( lua_State *  L,
int  lo,
cocos2d::Vector< T > *  ret,
const char *  funcName = "" 
)

Get a cocos2d::Vector of type T objects from a Lua table in the stack.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta cocos2d::Vector of type T objects.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
var luaval_to_ccvector ( var  L,
var  lo,
var  ret,
var  funcName = "" 
)

Get a cocos2d::Vector of type T objects from a Lua table in the stack.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta cocos2d::Vector of type T objects.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
local luaval_to_ccvector ( local  L,
local  lo,
local  ret,
local  funcName = "" 
)

Get a cocos2d::Vector of type T objects from a Lua table in the stack.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta cocos2d::Vector of type T objects.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luaval_to_std_vector_string ( lua_State *  L,
int  lo,
std::vector< std::string > *  ret,
const char *  funcName = "" 
)

Get a pointer points to a std::vector<std::string> from a Lua array table in the stack.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a std::vector<std::string>.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
var luaval_to_std_vector_string ( var  L,
var  lo,
var  ret,
var  funcName = "" 
)

Get a pointer points to a std::vector<std::string> from a Lua array table in the stack.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a std::vector<std::string>.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
local luaval_to_std_vector_string ( local  L,
local  lo,
local  ret,
local  funcName = "" 
)

Get a pointer points to a std::vector<std::string> from a Lua array table in the stack.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a std::vector<std::string>.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luaval_to_std_vector_int ( lua_State *  L,
int  lo,
std::vector< int > *  ret,
const char *  funcName = "" 
)

Get a pointer points to a std::vector<std::int> from a Lua array table in the stack.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a std::vector<int>.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
var luaval_to_std_vector_int ( var  L,
var  lo,
var  ret,
var  funcName = "" 
)

Get a pointer points to a std::vector<std::int> from a Lua array table in the stack.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a std::vector<int>.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
local luaval_to_std_vector_int ( local  L,
local  lo,
local  ret,
local  funcName = "" 
)

Get a pointer points to a std::vector<std::int> from a Lua array table in the stack.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a std::vector<int>.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luaval_to_ccmap_string_key ( lua_State *  L,
int  lo,
cocos2d::Map< std::string, T > *  ret,
const char *  funcName = "" 
)

Get a pointer points to a cocos2d::Map whose key/value pair is string value and T object from a Lua hash-map table in the stack.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a cocos2d::Map whose key/value pair is string value and T object.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
var luaval_to_ccmap_string_key ( var  L,
var  lo,
var  ret,
var  funcName = "" 
)

Get a pointer points to a cocos2d::Map whose key/value pair is string value and T object from a Lua hash-map table in the stack.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a cocos2d::Map whose key/value pair is string value and T object.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
local luaval_to_ccmap_string_key ( local  L,
local  lo,
local  ret,
local  funcName = "" 
)

Get a pointer points to a cocos2d::Map whose key/value pair is string value and T object from a Lua hash-map table in the stack.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a cocos2d::Map whose key/value pair is string value and T object.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luaval_to_ccvalue ( lua_State *  L,
int  lo,
cocos2d::Value ret,
const char *  funcName = "" 
)

Get a cocos2d::Value object from the given accpetable index of stack.

The type of Lua value at the index could be a Lua table, LUA_TSTRING, LUA_TBOOLEAN and LUA_TNUMBER.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a cocos2d::Value object.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the L and ret is not nullptr,otherwise return false.
var luaval_to_ccvalue ( var  L,
var  lo,
var  ret,
var  funcName = "" 
)

Get a cocos2d::Value object from the given accpetable index of stack.

The type of Lua value at the index could be a Lua table, LUA_TSTRING, LUA_TBOOLEAN and LUA_TNUMBER.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a cocos2d::Value object.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the L and ret is not nullptr,otherwise return false.
local luaval_to_ccvalue ( local  L,
local  lo,
local  ret,
local  funcName = "" 
)

Get a cocos2d::Value object from the given accpetable index of stack.

The type of Lua value at the index could be a Lua table, LUA_TSTRING, LUA_TBOOLEAN and LUA_TNUMBER.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a cocos2d::Value object.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the L and ret is not nullptr,otherwise return false.
bool luaval_to_ccvaluemap ( lua_State *  L,
int  lo,
cocos2d::ValueMap ret,
const char *  funcName = "" 
)

Get a cocos2d::ValueMap object from the given accpetable index of stack.

The type of Lua value at the index should be a Lua table.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a cocos2d::ValueMap object.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the type of Lua value at the index is a Lua table, otherwise return false.
var luaval_to_ccvaluemap ( var  L,
var  lo,
var  ret,
var  funcName = "" 
)

Get a cocos2d::ValueMap object from the given accpetable index of stack.

The type of Lua value at the index should be a Lua table.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a cocos2d::ValueMap object.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the type of Lua value at the index is a Lua table, otherwise return false.
local luaval_to_ccvaluemap ( local  L,
local  lo,
local  ret,
local  funcName = "" 
)

Get a cocos2d::ValueMap object from the given accpetable index of stack.

The type of Lua value at the index should be a Lua table.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a cocos2d::ValueMap object.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the type of Lua value at the index is a Lua table, otherwise return false.
bool luaval_to_ccvaluemapintkey ( lua_State *  L,
int  lo,
cocos2d::ValueMapIntKey ret,
const char *  funcName = "" 
)

Get a cocos2d::ValueMapIntKey object from the given accpetable index of stack.

The type of Lua value at the index should be a Lua table.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a cocos2d::ValueMapIntKey object.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the type of Lua value at the index is a Lua table, otherwise return false.
var luaval_to_ccvaluemapintkey ( var  L,
var  lo,
var  ret,
var  funcName = "" 
)

Get a cocos2d::ValueMapIntKey object from the given accpetable index of stack.

The type of Lua value at the index should be a Lua table.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a cocos2d::ValueMapIntKey object.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the type of Lua value at the index is a Lua table, otherwise return false.
local luaval_to_ccvaluemapintkey ( local  L,
local  lo,
local  ret,
local  funcName = "" 
)

Get a cocos2d::ValueMapIntKey object from the given accpetable index of stack.

The type of Lua value at the index should be a Lua table.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a cocos2d::ValueMapIntKey object.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the type of Lua value at the index is a Lua table, otherwise return false.
bool luaval_to_ccvaluevector ( lua_State *  L,
int  lo,
cocos2d::ValueVector ret,
const char *  funcName = "" 
)

Get a cocos2d::ValueVector object from the given accpetable index of stack.

The type of Lua value at the index should be a Lua array table.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a cocos2d::ValueVector object.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the type of Lua value at the index is a Lua table, otherwise return false.
var luaval_to_ccvaluevector ( var  L,
var  lo,
var  ret,
var  funcName = "" 
)

Get a cocos2d::ValueVector object from the given accpetable index of stack.

The type of Lua value at the index should be a Lua array table.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a cocos2d::ValueVector object.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the type of Lua value at the index is a Lua table, otherwise return false.
local luaval_to_ccvaluevector ( local  L,
local  lo,
local  ret,
local  funcName = "" 
)

Get a cocos2d::ValueVector object from the given accpetable index of stack.

The type of Lua value at the index should be a Lua array table.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a cocos2d::ValueVector object.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the type of Lua value at the index is a Lua table, otherwise return false.
bool luaval_to_object ( lua_State *  L,
int  lo,
const char *  type,
T **  ret 
)

Get a Type T object from the given accpetable index of stack.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
typea string pointer points to the type name.
retthe pointer points to a Type T object.
Returns
Return true if the type of Lua value at the index is a Lua userdata, otherwise return false.
var luaval_to_object ( var  L,
var  lo,
var  type,
var  ret 
)

Get a Type T object from the given accpetable index of stack.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
typea string pointer points to the type name.
retthe pointer points to a Type T object.
Returns
Return true if the type of Lua value at the index is a Lua userdata, otherwise return false.
local luaval_to_object ( local  L,
local  lo,
local  type,
local  ret 
)

Get a Type T object from the given accpetable index of stack.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
typea string pointer points to the type name.
retthe pointer points to a Type T object.
Returns
Return true if the type of Lua value at the index is a Lua userdata, otherwise return false.
bool luaval_to_mesh_vertex_attrib ( lua_State *  L,
int  lo,
cocos2d::MeshVertexAttrib ret,
const char *  funcName = "" 
)

Get a cocos2d::MeshVertexAttrib object value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a table it returns true, otherwise returns false. If the table has the size, type, vertexAttrib, vertexAttrib and attribSizeBytes keys and the corresponding values are not nil, this function would assign the values to the corresponding members of outValue.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
retthe pointer to a cocos2d::MeshVertexAttrib object which stores the values from the Lua table.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luaval_to_std_vector_float ( lua_State *  L,
int  lo,
std::vector< float > *  ret,
const char *  funcName = "" 
)

Get a pointer points to a std::vector<float> from a Lua array table in the stack.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a std::vector<float>.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luaval_to_std_vector_ushort ( lua_State *  L,
int  lo,
std::vector< unsigned short > *  ret,
const char *  funcName = "" 
)

Get a pointer points to a std::vector<unsigned shortt> from a Lua array table in the stack.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a std::vector<unsigned short>.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
var luaval_to_std_vector_ushort ( var  L,
var  lo,
var  ret,
var  funcName = "" 
)

Get a pointer points to a std::vector<unsigned shortt> from a Lua array table in the stack.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a std::vector<unsigned short>.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
local luaval_to_std_vector_ushort ( local  L,
local  lo,
local  ret,
local  funcName = "" 
)

Get a pointer points to a std::vector<unsigned shortt> from a Lua array table in the stack.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
reta pointer points to a std::vector<unsigned short>.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
bool luaval_to_quaternion ( lua_State *  L,
int  lo,
cocos2d::Quaternion *  outValue,
const char *  funcName = "" 
)

Get a cocos2d::Quaternion object value from the given accpetable index of stack.

If the value at the given accpetable index of stack is a table it returns true, otherwise returns false. If the table has the x, y, z and w keys and the corresponding values are not nil, this function would assign the values to the corresponding members of outValue.Otherwise, the value of members of outValue would be 0.

Parameters
Lthe current lua_State.
lothe given accpetable index of stack.
retthe pointer to a cocos2d::Quaternion object which stores the values from the Lua table.
funcNamethe name of calling function, it is used for error output in the debug model.
Returns
Return true if the value at the given accpetable index of stack is a table, otherwise return false.
void vec2_to_luaval ( lua_State *  L,
const cocos2d::Vec2 &  vec2 
)

Push a table converted from a cocos2d::Vec2 object into the Lua stack.

The format of table as follows: {x=numberValue1, y=numberValue2}

Parameters
Lthe current lua_State.
vec2a cocos2d::Vec2 object.
void vec3_to_luaval ( lua_State *  L,
const cocos2d::Vec3 &  vec3 
)

Push a table converted from a cocos2d::Vec3 object into the Lua stack.

The format of table as follows: {x=numberValue1, y=numberValue2, z=numberValue3}

Parameters
Lthe current lua_State.
vec3a cocos2d::Vec3 object.
var vec3_to_luaval ( var  L,
var  vec3 
)

Push a table converted from a cocos2d::Vec3 object into the Lua stack.

The format of table as follows: {x=numberValue1, y=numberValue2, z=numberValue3}

Parameters
Lthe current lua_State.
vec3a cocos2d::Vec3 object.
local vec3_to_luaval ( local  L,
local  vec3 
)

Push a table converted from a cocos2d::Vec3 object into the Lua stack.

The format of table as follows: {x=numberValue1, y=numberValue2, z=numberValue3}

Parameters
Lthe current lua_State.
vec3a cocos2d::Vec3 object.
void vec4_to_luaval ( lua_State *  L,
const cocos2d::Vec4 &  vec4 
)

Push a table converted from a cocos2d::Vec4 object into the Lua stack.

The format of table as follows: {x=numberValue1, y=numberValue2, z=numberValue3, w=numberValue4}

Parameters
Lthe current lua_State.
vec3a cocos2d::Vec4 object.
var vec4_to_luaval ( var  L,
var  vec4 
)

Push a table converted from a cocos2d::Vec4 object into the Lua stack.

The format of table as follows: {x=numberValue1, y=numberValue2, z=numberValue3, w=numberValue4}

Parameters
Lthe current lua_State.
vec3a cocos2d::Vec4 object.
local vec4_to_luaval ( local  L,
local  vec4 
)

Push a table converted from a cocos2d::Vec4 object into the Lua stack.

The format of table as follows: {x=numberValue1, y=numberValue2, z=numberValue3, w=numberValue4}

Parameters
Lthe current lua_State.
vec3a cocos2d::Vec4 object.
void vec2_array_to_luaval ( lua_State *  L,
const cocos2d::Vec2 *  points,
int  count 
)

Push a table converted from a cocos2d::Vec2 array into the Lua stack.

The table size is count. The format of table as follows: {vec2_table1,vec2_table2,...,vec2_tableCount}.

Parameters
Lthe current lua_State.
pointsa pointer points to a cocos2d::Vec2 array. count the number of cocos2d::Vec2 object should be converted to a Lua table and push into the Lua stack.
var vec2_array_to_luaval ( var  L,
var  points,
var  count 
)

Push a table converted from a cocos2d::Vec2 array into the Lua stack.

The table size is count. The format of table as follows: {vec2_table1,vec2_table2,...,vec2_tableCount}.

Parameters
Lthe current lua_State.
pointsa pointer points to a cocos2d::Vec2 array. count the number of cocos2d::Vec2 object should be converted to a Lua table and push into the Lua stack.
local vec2_array_to_luaval ( local  L,
local  points,
local  count 
)

Push a table converted from a cocos2d::Vec2 array into the Lua stack.

The table size is count. The format of table as follows: {vec2_table1,vec2_table2,...,vec2_tableCount}.

Parameters
Lthe current lua_State.
pointsa pointer points to a cocos2d::Vec2 array. count the number of cocos2d::Vec2 object should be converted to a Lua table and push into the Lua stack.
void size_to_luaval ( lua_State *  L,
const Size sz 
)

Push a table converted from a cocos2d::Size object into the Lua stack.

The format of table as follows: {width=numberValue1, height=numberValue2}

Parameters
Lthe current lua_State.
sza cocos2d::Size object.
var size_to_luaval ( var  L,
var  sz 
)

Push a table converted from a cocos2d::Size object into the Lua stack.

The format of table as follows: {width=numberValue1, height=numberValue2}

Parameters
Lthe current lua_State.
sza cocos2d::Size object.
local size_to_luaval ( local  L,
local  sz 
)

Push a table converted from a cocos2d::Size object into the Lua stack.

The format of table as follows: {width=numberValue1, height=numberValue2}

Parameters
Lthe current lua_State.
sza cocos2d::Size object.
void rect_to_luaval ( lua_State *  L,
const Rect rt 
)

Push a table converted from a cocos2d::Rect object into the Lua stack.

The format of table as follows: {x=numberValue1, y=numberValue2, width=numberValue3, height=numberValue4}

Parameters
Lthe current lua_State.
sza cocos2d::Rect object.
var rect_to_luaval ( var  L,
var  rt 
)

Push a table converted from a cocos2d::Rect object into the Lua stack.

The format of table as follows: {x=numberValue1, y=numberValue2, width=numberValue3, height=numberValue4}

Parameters
Lthe current lua_State.
sza cocos2d::Rect object.
local rect_to_luaval ( local  L,
local  rt 
)

Push a table converted from a cocos2d::Rect object into the Lua stack.

The format of table as follows: {x=numberValue1, y=numberValue2, width=numberValue3, height=numberValue4}

Parameters
Lthe current lua_State.
sza cocos2d::Rect object.
void color3b_to_luaval ( lua_State *  L,
const Color3B cc 
)

Push a table converted from a cocos2d::Color3B object into the Lua stack.

The format of table as follows: {r=numberValue1, g=numberValue2, b=numberValue3}

Parameters
Lthe current lua_State.
cca cocos2d::Color3B object.
var color3b_to_luaval ( var  L,
var  cc 
)

Push a table converted from a cocos2d::Color3B object into the Lua stack.

The format of table as follows: {r=numberValue1, g=numberValue2, b=numberValue3}

Parameters
Lthe current lua_State.
cca cocos2d::Color3B object.
local color3b_to_luaval ( local  L,
local  cc 
)

Push a table converted from a cocos2d::Color3B object into the Lua stack.

The format of table as follows: {r=numberValue1, g=numberValue2, b=numberValue3}

Parameters
Lthe current lua_State.
cca cocos2d::Color3B object.
void color4b_to_luaval ( lua_State *  L,
const Color4B cc 
)

Push a table converted from a cocos2d::Color4B object into the Lua stack.

The format of table as follows: {r=numberValue1, g=numberValue2, b=numberValue3, a=numberValue4}

Parameters
Lthe current lua_State.
cca cocos2d::Color4B object.
var color4b_to_luaval ( var  L,
var  cc 
)

Push a table converted from a cocos2d::Color4B object into the Lua stack.

The format of table as follows: {r=numberValue1, g=numberValue2, b=numberValue3, a=numberValue4}

Parameters
Lthe current lua_State.
cca cocos2d::Color4B object.
local color4b_to_luaval ( local  L,
local  cc 
)

Push a table converted from a cocos2d::Color4B object into the Lua stack.

The format of table as follows: {r=numberValue1, g=numberValue2, b=numberValue3, a=numberValue4}

Parameters
Lthe current lua_State.
cca cocos2d::Color4B object.
void color4f_to_luaval ( lua_State *  L,
const Color4F cc 
)

Push a table converted from a cocos2d::Color4F object into the Lua stack.

The format of table as follows: {r=numberValue1, g=numberValue2, b=numberValue3, a=numberValue4}

Parameters
Lthe current lua_State.
cca cocos2d::Color4F object.
var color4f_to_luaval ( var  L,
var  cc 
)

Push a table converted from a cocos2d::Color4F object into the Lua stack.

The format of table as follows: {r=numberValue1, g=numberValue2, b=numberValue3, a=numberValue4}

Parameters
Lthe current lua_State.
cca cocos2d::Color4F object.
local color4f_to_luaval ( local  L,
local  cc 
)

Push a table converted from a cocos2d::Color4F object into the Lua stack.

The format of table as follows: {r=numberValue1, g=numberValue2, b=numberValue3, a=numberValue4}

Parameters
Lthe current lua_State.
cca cocos2d::Color4F object.
void physics_material_to_luaval ( lua_State *  L,
const PhysicsMaterial pm 
)

Push a table converted from a cocos2d::PhysicsMaterial object into the Lua stack.

The format of table as follows: {density=numberValue1, restitution=numberValue2, friction=numberValue3}

Parameters
Lthe current lua_State.
pma cocos2d::PhysicsMaterial object.
var physics_material_to_luaval ( var  L,
var  pm 
)

Push a table converted from a cocos2d::PhysicsMaterial object into the Lua stack.

The format of table as follows: {density=numberValue1, restitution=numberValue2, friction=numberValue3}

Parameters
Lthe current lua_State.
pma cocos2d::PhysicsMaterial object.
local physics_material_to_luaval ( local  L,
local  pm 
)

Push a table converted from a cocos2d::PhysicsMaterial object into the Lua stack.

The format of table as follows: {density=numberValue1, restitution=numberValue2, friction=numberValue3}

Parameters
Lthe current lua_State.
pma cocos2d::PhysicsMaterial object.
void physics_raycastinfo_to_luaval ( lua_State *  L,
const PhysicsRayCastInfo info 
)

Push a table converted from a cocos2d::PhysicsRayCastInfo object into the Lua stack.

The format of table as follows: {shape=userdata, start=vec2_table1, ended=vec2_table2, contact=vec2_table3, normal=vec2_table4, fraction=numberValue}

Parameters
Lthe current lua_State.
infoa cocos2d::PhysicsRayCastInfo object.
var physics_raycastinfo_to_luaval ( var  L,
var  info 
)

Push a table converted from a cocos2d::PhysicsRayCastInfo object into the Lua stack.

The format of table as follows: {shape=userdata, start=vec2_table1, ended=vec2_table2, contact=vec2_table3, normal=vec2_table4, fraction=numberValue}

Parameters
Lthe current lua_State.
infoa cocos2d::PhysicsRayCastInfo object.
local physics_raycastinfo_to_luaval ( local  L,
local  info 
)

Push a table converted from a cocos2d::PhysicsRayCastInfo object into the Lua stack.

The format of table as follows: {shape=userdata, start=vec2_table1, ended=vec2_table2, contact=vec2_table3, normal=vec2_table4, fraction=numberValue}

Parameters
Lthe current lua_State.
infoa cocos2d::PhysicsRayCastInfo object.
void physics_contactdata_to_luaval ( lua_State *  L,
const PhysicsContactData data 
)

Push a table converted from a cocos2d::PhysicsContactData object into the Lua stack.

The format of table as follows: {points=vec2_array_table, normal=vec2_table, POINT_MAX=numberValue}

Parameters
Lthe current lua_State.
dataa cocos2d::PhysicsContactData object.
var physics_contactdata_to_luaval ( var  L,
var  data 
)

Push a table converted from a cocos2d::PhysicsContactData object into the Lua stack.

The format of table as follows: {points=vec2_array_table, normal=vec2_table, POINT_MAX=numberValue}

Parameters
Lthe current lua_State.
dataa cocos2d::PhysicsContactData object.
local physics_contactdata_to_luaval ( local  L,
local  data 
)

Push a table converted from a cocos2d::PhysicsContactData object into the Lua stack.

The format of table as follows: {points=vec2_array_table, normal=vec2_table, POINT_MAX=numberValue}

Parameters
Lthe current lua_State.
dataa cocos2d::PhysicsContactData object.
void affinetransform_to_luaval ( lua_State *  L,
const AffineTransform inValue 
)

Push a table converted from a cocos2d::AffineTransform object into the Lua stack.

The format of table as follows: {a=numberValue1, b=numberValue2, c=numberValue3, d=numberValue4,tx=numberValue5, ty=numberValue6}

Parameters
Lthe current lua_State.
inValuea cocos2d::AffineTransform object.
var affinetransform_to_luaval ( var  L,
var  inValue 
)

Push a table converted from a cocos2d::AffineTransform object into the Lua stack.

The format of table as follows: {a=numberValue1, b=numberValue2, c=numberValue3, d=numberValue4,tx=numberValue5, ty=numberValue6}

Parameters
Lthe current lua_State.
inValuea cocos2d::AffineTransform object.
local affinetransform_to_luaval ( local  L,
local  inValue 
)

Push a table converted from a cocos2d::AffineTransform object into the Lua stack.

The format of table as follows: {a=numberValue1, b=numberValue2, c=numberValue3, d=numberValue4,tx=numberValue5, ty=numberValue6}

Parameters
Lthe current lua_State.
inValuea cocos2d::AffineTransform object.
void fontdefinition_to_luaval ( lua_State *  L,
const FontDefinition inValue 
)

Push a table converted from a cocos2d::FontDefinition object into the Lua stack.

The format of table as follows: {fontName=stringValue1, fontSize=numberValue1, fontAlignmentH=numberValue2, fontAlignmentV=numberValue3,fontFillColor=color3b_table1, fontDimensions=size_table1, shadowEnabled=booleanValue1, shadowOffset=size_table2, shadowBlur=numberValue4, shadowOpacity=numberValue5, shadowEnabled=booleanValue2, strokeColor=color3b_table2, strokeSize=size_table3}

Parameters
Lthe current lua_State.
inValuea cocos2d::FontDefinition object.
var fontdefinition_to_luaval ( var  L,
var  inValue 
)

Push a table converted from a cocos2d::FontDefinition object into the Lua stack.

The format of table as follows: {fontName=stringValue1, fontSize=numberValue1, fontAlignmentH=numberValue2, fontAlignmentV=numberValue3,fontFillColor=color3b_table1, fontDimensions=size_table1, shadowEnabled=booleanValue1, shadowOffset=size_table2, shadowBlur=numberValue4, shadowOpacity=numberValue5, shadowEnabled=booleanValue2, strokeColor=color3b_table2, strokeSize=size_table3}

Parameters
Lthe current lua_State.
inValuea cocos2d::FontDefinition object.
local fontdefinition_to_luaval ( local  L,
local  inValue 
)

Push a table converted from a cocos2d::FontDefinition object into the Lua stack.

The format of table as follows: {fontName=stringValue1, fontSize=numberValue1, fontAlignmentH=numberValue2, fontAlignmentV=numberValue3,fontFillColor=color3b_table1, fontDimensions=size_table1, shadowEnabled=booleanValue1, shadowOffset=size_table2, shadowBlur=numberValue4, shadowOpacity=numberValue5, shadowEnabled=booleanValue2, strokeColor=color3b_table2, strokeSize=size_table3}

Parameters
Lthe current lua_State.
inValuea cocos2d::FontDefinition object.
void mat4_to_luaval ( lua_State *  L,
const cocos2d::Mat4 &  mat 
)

Push a table converted from a cocos2d::Mat4 object into the Lua stack.

The format of table as follows: {numberValue1, numberValue2, ..., numberValue16}

Parameters
Lthe current lua_State.
mata cocos2d::Mat4 object.
var mat4_to_luaval ( var  L,
var  mat 
)

Push a table converted from a cocos2d::Mat4 object into the Lua stack.

The format of table as follows: {numberValue1, numberValue2, ..., numberValue16}

Parameters
Lthe current lua_State.
mata cocos2d::Mat4 object.
local mat4_to_luaval ( local  L,
local  mat 
)

Push a table converted from a cocos2d::Mat4 object into the Lua stack.

The format of table as follows: {numberValue1, numberValue2, ..., numberValue16}

Parameters
Lthe current lua_State.
mata cocos2d::Mat4 object.
void blendfunc_to_luaval ( lua_State *  L,
const cocos2d::BlendFunc func 
)

Push a table converted from a cocos2d::BlendFunc object into the Lua stack.

The format of table as follows: {src=numberValue1, dst=numberValue2}

Parameters
Lthe current lua_State.
funca cocos2d::BlendFunc object.
var blendfunc_to_luaval ( var  L,
var  func 
)

Push a table converted from a cocos2d::BlendFunc object into the Lua stack.

The format of table as follows: {src=numberValue1, dst=numberValue2}

Parameters
Lthe current lua_State.
funca cocos2d::BlendFunc object.
local blendfunc_to_luaval ( local  L,
local  func 
)

Push a table converted from a cocos2d::BlendFunc object into the Lua stack.

The format of table as follows: {src=numberValue1, dst=numberValue2}

Parameters
Lthe current lua_State.
funca cocos2d::BlendFunc object.
void ttfconfig_to_luaval ( lua_State *  L,
const cocos2d::TTFConfig &  config 
)

Push a table converted from a cocos2d::TTFConfig object into the Lua stack.

The format of table as follows: {fontFilePath=stringValue1, fontSize=numberValue1, glyphs=numberValue2, customGlyphs=stringValue2,distanceFieldEnabled=booleanValue1, outlineSize=numberValue3}

Parameters
Lthe current lua_State.
configa cocos2d::TTFConfig object.
var ttfconfig_to_luaval ( var  L,
var  config 
)

Push a table converted from a cocos2d::TTFConfig object into the Lua stack.

The format of table as follows: {fontFilePath=stringValue1, fontSize=numberValue1, glyphs=numberValue2, customGlyphs=stringValue2,distanceFieldEnabled=booleanValue1, outlineSize=numberValue3}

Parameters
Lthe current lua_State.
configa cocos2d::TTFConfig object.
local ttfconfig_to_luaval ( local  L,
local  config 
)

Push a table converted from a cocos2d::TTFConfig object into the Lua stack.

The format of table as follows: {fontFilePath=stringValue1, fontSize=numberValue1, glyphs=numberValue2, customGlyphs=stringValue2,distanceFieldEnabled=booleanValue1, outlineSize=numberValue3}

Parameters
Lthe current lua_State.
configa cocos2d::TTFConfig object.
void uniform_to_luaval ( lua_State *  L,
const cocos2d::Uniform uniform 
)

Push a table converted from a cocos2d::Uniform object into the Lua stack.

The format of table as follows: {location=numberValue1, size=numberValue2, type=numberValue3, name=stringValue1}

Parameters
Lthe current lua_State.
uniforma cocos2d::Uniform object.
var uniform_to_luaval ( var  L,
var  uniform 
)

Push a table converted from a cocos2d::Uniform object into the Lua stack.

The format of table as follows: {location=numberValue1, size=numberValue2, type=numberValue3, name=stringValue1}

Parameters
Lthe current lua_State.
uniforma cocos2d::Uniform object.
local uniform_to_luaval ( local  L,
local  uniform 
)

Push a table converted from a cocos2d::Uniform object into the Lua stack.

The format of table as follows: {location=numberValue1, size=numberValue2, type=numberValue3, name=stringValue1}

Parameters
Lthe current lua_State.
uniforma cocos2d::Uniform object.
void vertexattrib_to_luaval ( lua_State *  L,
const cocos2d::VertexAttrib verAttrib 
)

Push a table converted from a cocos2d::VertexAttrib object into the Lua stack.

The format of table as follows: {index=numberValue1, size=numberValue2, type=numberValue3, name=stringValue1}

Parameters
Lthe current lua_State.
verAttriba cocos2d::VertexAttrib object.
var vertexattrib_to_luaval ( var  L,
var  verAttrib 
)

Push a table converted from a cocos2d::VertexAttrib object into the Lua stack.

The format of table as follows: {index=numberValue1, size=numberValue2, type=numberValue3, name=stringValue1}

Parameters
Lthe current lua_State.
verAttriba cocos2d::VertexAttrib object.
local vertexattrib_to_luaval ( local  L,
local  verAttrib 
)

Push a table converted from a cocos2d::VertexAttrib object into the Lua stack.

The format of table as follows: {index=numberValue1, size=numberValue2, type=numberValue3, name=stringValue1}

Parameters
Lthe current lua_State.
verAttriba cocos2d::VertexAttrib object.
void ccvector_to_luaval ( lua_State *  L,
const cocos2d::Vector< T > &  inValue 
)

Push a table converted from a cocos2d::Vector object into the Lua stack.

The format of table as follows: {userdata1, userdata2, ..., userdataVectorSize} The object in the cocos2d::Vector which would be pushed into the table should be Ref type.

Parameters
Lthe current lua_State.
verAttriba cocos2d::Vector object.
var ccvector_to_luaval ( var  L,
var  inValue 
)

Push a table converted from a cocos2d::Vector object into the Lua stack.

The format of table as follows: {userdata1, userdata2, ..., userdataVectorSize} The object in the cocos2d::Vector which would be pushed into the table should be Ref type.

Parameters
Lthe current lua_State.
verAttriba cocos2d::Vector object.
local ccvector_to_luaval ( local  L,
local  inValue 
)

Push a table converted from a cocos2d::Vector object into the Lua stack.

The format of table as follows: {userdata1, userdata2, ..., userdataVectorSize} The object in the cocos2d::Vector which would be pushed into the table should be Ref type.

Parameters
Lthe current lua_State.
verAttriba cocos2d::Vector object.
void ccmap_string_key_to_luaval ( lua_State *  L,
const cocos2d::Map< std::string, T > &  v 
)

Push a table converted from a cocos2d::Map object into the Lua stack.

The format of table as follows: {name1=userdata1, name2=userdata2, ..., nameMapSize=userdataMapSize} The object in the cocos2d::Map which would be pushed into the table should be Ref type.

Parameters
Lthe current lua_State.
verAttriba cocos2d::Map object.
var ccmap_string_key_to_luaval ( var  L,
var  v 
)

Push a table converted from a cocos2d::Map object into the Lua stack.

The format of table as follows: {name1=userdata1, name2=userdata2, ..., nameMapSize=userdataMapSize} The object in the cocos2d::Map which would be pushed into the table should be Ref type.

Parameters
Lthe current lua_State.
verAttriba cocos2d::Map object.
local ccmap_string_key_to_luaval ( local  L,
local  v 
)

Push a table converted from a cocos2d::Map object into the Lua stack.

The format of table as follows: {name1=userdata1, name2=userdata2, ..., nameMapSize=userdataMapSize} The object in the cocos2d::Map which would be pushed into the table should be Ref type.

Parameters
Lthe current lua_State.
verAttriba cocos2d::Map object.
void ccvalue_to_luaval ( lua_State *  L,
const cocos2d::Value inValue 
)

Push a Lua value converted from a cocos2d::Value object into the Lua stack.

Different cocos2d::Value type, different Lua value pushed into the Lua stack. Value::Type::BOOLEAN -> push a boolean value into the Lua stack. Value::Type::FLOAT,Value::Type::DOUBLE -> push a number value into the Lua stack. Value::Type::INTEGER -> push a integer value into the Lua stack. Value::Type::STRING -> push a string value into the Lua stack. Value::Type::VECTOR -> push a array table into the Lua stack. Value::Type::MAP -> push a hash table into the Lua stack. Value::Type::INT_KEY_MAP -> push a hash table into the Lua stack.

Parameters
Lthe current lua_State.
verAttriba cocos2d::Value object.
void ccvaluemap_to_luaval ( lua_State *  L,
const cocos2d::ValueMap inValue 
)

Push a Lua hash table converted from a cocos2d::ValueMap object into the Lua stack.

The type of value of the key/value pair would be boolean,number, integer, string, array table, hash table.

Parameters
Lthe current lua_State.
verAttriba cocos2d::ValueMap object.
var ccvaluemap_to_luaval ( var  L,
var  inValue 
)

Push a Lua hash table converted from a cocos2d::ValueMap object into the Lua stack.

The type of value of the key/value pair would be boolean,number, integer, string, array table, hash table.

Parameters
Lthe current lua_State.
verAttriba cocos2d::ValueMap object.
local ccvaluemap_to_luaval ( local  L,
local  inValue 
)

Push a Lua hash table converted from a cocos2d::ValueMap object into the Lua stack.

The type of value of the key/value pair would be boolean,number, integer, string, array table, hash table.

Parameters
Lthe current lua_State.
verAttriba cocos2d::ValueMap object.
void ccvaluemapintkey_to_luaval ( lua_State *  L,
const cocos2d::ValueMapIntKey inValue 
)

Push a Lua hash table converted from a cocos2d::ValueMapIntKey object into the Lua stack.

The type of value of the key/value pair would be boolean,number, integer, string, array table, hash table.

Parameters
Lthe current lua_State.
verAttriba cocos2d::Map object.
var ccvaluemapintkey_to_luaval ( var  L,
var  inValue 
)

Push a Lua hash table converted from a cocos2d::ValueMapIntKey object into the Lua stack.

The type of value of the key/value pair would be boolean,number, integer, string, array table, hash table.

Parameters
Lthe current lua_State.
verAttriba cocos2d::Map object.
local ccvaluemapintkey_to_luaval ( local  L,
local  inValue 
)

Push a Lua hash table converted from a cocos2d::ValueMapIntKey object into the Lua stack.

The type of value of the key/value pair would be boolean,number, integer, string, array table, hash table.

Parameters
Lthe current lua_State.
verAttriba cocos2d::Map object.
void ccvaluevector_to_luaval ( lua_State *  L,
const cocos2d::ValueVector inValue 
)

Push a Lua array table converted from a cocos2d::ValueVector object into the Lua stack.

The type of value of the key/value pair would be boolean,number, integer, string, array table, hash table.

Parameters
Lthe current lua_State.
verAttriba cocos2d::ValueVector object.
var ccvaluevector_to_luaval ( var  L,
var  inValue 
)

Push a Lua array table converted from a cocos2d::ValueVector object into the Lua stack.

The type of value of the key/value pair would be boolean,number, integer, string, array table, hash table.

Parameters
Lthe current lua_State.
verAttriba cocos2d::ValueVector object.
local ccvaluevector_to_luaval ( local  L,
local  inValue 
)

Push a Lua array table converted from a cocos2d::ValueVector object into the Lua stack.

The type of value of the key/value pair would be boolean,number, integer, string, array table, hash table.

Parameters
Lthe current lua_State.
verAttriba cocos2d::ValueVector object.
const char* getLuaTypeName ( T *  ret,
const char *  type 
)

Get the real typename for the specified typename.

Because all override functions wouldn't be bound,so we must use typeid to get the real class name.

Parameters
Tthe pointer points to a object.
typethe string pointer points to specified typename.
Returns
return the pointer points to the real typename, or nullptr.
var getLuaTypeName ( var  ret,
var  type 
)

Get the real typename for the specified typename.

Because all override functions wouldn't be bound,so we must use typeid to get the real class name.

Parameters
Tthe pointer points to a object.
typethe string pointer points to specified typename.
Returns
return the pointer points to the real typename, or nullptr.
local getLuaTypeName ( local  ret,
local  type 
)

Get the real typename for the specified typename.

Because all override functions wouldn't be bound,so we must use typeid to get the real class name.

Parameters
Tthe pointer points to a object.
typethe string pointer points to specified typename.
Returns
return the pointer points to the real typename, or nullptr.
void object_to_luaval ( lua_State *  L,
const char *  type,
T *  ret 
)

Push the native object by userdata format into the Lua stack by typename.

Parameters
Lthe current lua_State.
typethe string pointer points to the typename.
retthe native object pointer.
var object_to_luaval ( var  L,
var  type,
var  ret 
)

Push the native object by userdata format into the Lua stack by typename.

Parameters
Lthe current lua_State.
typethe string pointer points to the typename.
retthe native object pointer.
local object_to_luaval ( local  L,
local  type,
local  ret 
)

Push the native object by userdata format into the Lua stack by typename.

Parameters
Lthe current lua_State.
typethe string pointer points to the typename.
retthe native object pointer.
void mesh_vertex_attrib_to_luaval ( lua_State *  L,
const cocos2d::MeshVertexAttrib inValue 
)

Push a table converted from a cocos2d::MeshVertexAttrib object into the Lua stack.

The format of table as follows: {size=numberValue1, type=numberValue2, vertexAttrib=numberValue3, attribSizeBytes=numberValue4}

Parameters
Lthe current lua_State.
inValuea cocos2d::MeshVertexAttrib object.
var mesh_vertex_attrib_to_luaval ( var  L,
var  inValue 
)

Push a table converted from a cocos2d::MeshVertexAttrib object into the Lua stack.

The format of table as follows: {size=numberValue1, type=numberValue2, vertexAttrib=numberValue3, attribSizeBytes=numberValue4}

Parameters
Lthe current lua_State.
inValuea cocos2d::MeshVertexAttrib object.
local mesh_vertex_attrib_to_luaval ( local  L,
local  inValue 
)

Push a table converted from a cocos2d::MeshVertexAttrib object into the Lua stack.

The format of table as follows: {size=numberValue1, type=numberValue2, vertexAttrib=numberValue3, attribSizeBytes=numberValue4}

Parameters
Lthe current lua_State.
inValuea cocos2d::MeshVertexAttrib object.
void ccvector_std_string_to_luaval ( lua_State *  L,
const std::vector< std::string > &  inValue 
)

Push a Lua array table converted from a std::vector<std::string> into the Lua stack.

The format of table as follows: {stringValue1, stringValue2, ..., stringVectorSize}

Parameters
Lthe current lua_State.
inValuea std::vector<std::string> value.
var ccvector_std_string_to_luaval ( var  L,
var  inValue 
)

Push a Lua array table converted from a std::vector<std::string> into the Lua stack.

The format of table as follows: {stringValue1, stringValue2, ..., stringVectorSize}

Parameters
Lthe current lua_State.
inValuea std::vector<std::string> value.
local ccvector_std_string_to_luaval ( local  L,
local  inValue 
)

Push a Lua array table converted from a std::vector<std::string> into the Lua stack.

The format of table as follows: {stringValue1, stringValue2, ..., stringVectorSize}

Parameters
Lthe current lua_State.
inValuea std::vector<std::string> value.
void ccvector_int_to_luaval ( lua_State *  L,
const std::vector< int > &  inValue 
)

Push a Lua array table converted from a std::vector<int> into the Lua stack.

The format of table as follows: {numberValue1, numberValue2, ..., numberVectorSize}

Parameters
Lthe current lua_State.
inValuea std::vector<int> vaule.
var ccvector_int_to_luaval ( var  L,
var  inValue 
)

Push a Lua array table converted from a std::vector<int> into the Lua stack.

The format of table as follows: {numberValue1, numberValue2, ..., numberVectorSize}

Parameters
Lthe current lua_State.
inValuea std::vector<int> vaule.
local ccvector_int_to_luaval ( local  L,
local  inValue 
)

Push a Lua array table converted from a std::vector<int> into the Lua stack.

The format of table as follows: {numberValue1, numberValue2, ..., numberVectorSize}

Parameters
Lthe current lua_State.
inValuea std::vector<int> vaule.
void ccvector_float_to_luaval ( lua_State *  L,
const std::vector< float > &  inValue 
)

Push a Lua array table converted from a std::vector<float> into the Lua stack.

The format of table as follows: {numberValue1, numberValue2, ..., numberVectorSize}

Parameters
Lthe current lua_State.
inValuea std::vector<float> vaule.
var ccvector_float_to_luaval ( var  L,
var  inValue 
)

Push a Lua array table converted from a std::vector<float> into the Lua stack.

The format of table as follows: {numberValue1, numberValue2, ..., numberVectorSize}

Parameters
Lthe current lua_State.
inValuea std::vector<float> vaule.
local ccvector_float_to_luaval ( local  L,
local  inValue 
)

Push a Lua array table converted from a std::vector<float> into the Lua stack.

The format of table as follows: {numberValue1, numberValue2, ..., numberVectorSize}

Parameters
Lthe current lua_State.
inValuea std::vector<float> vaule.
void ccvector_ushort_to_luaval ( lua_State *  L,
const std::vector< unsigned short > &  inValue 
)

Push a Lua array table converted from a std::vector<unsigned short> into the Lua stack.

The format of table as follows: {numberValue1, numberValue2, ..., numberVectorSize}

Parameters
Lthe current lua_State.
inValuea std::vector<float> vaule.
var ccvector_ushort_to_luaval ( var  L,
var  inValue 
)

Push a Lua array table converted from a std::vector<unsigned short> into the Lua stack.

The format of table as follows: {numberValue1, numberValue2, ..., numberVectorSize}

Parameters
Lthe current lua_State.
inValuea std::vector<float> vaule.
local ccvector_ushort_to_luaval ( local  L,
local  inValue 
)

Push a Lua array table converted from a std::vector<unsigned short> into the Lua stack.

The format of table as follows: {numberValue1, numberValue2, ..., numberVectorSize}

Parameters
Lthe current lua_State.
inValuea std::vector<float> vaule.
void quaternion_to_luaval ( lua_State *  L,
const cocos2d::Quaternion &  inValue 
)

Push a table converted from a cocos2d::Quaternion object into the Lua stack.

The format of table as follows: {x=numberValue1, y=numberValue2, z=numberValue3, w=numberValue4}

Parameters
Lthe current lua_State.
inValuea cocos2d::Quaternion object.
var quaternion_to_luaval ( var  L,
var  inValue 
)

Push a table converted from a cocos2d::Quaternion object into the Lua stack.

The format of table as follows: {x=numberValue1, y=numberValue2, z=numberValue3, w=numberValue4}

Parameters
Lthe current lua_State.
inValuea cocos2d::Quaternion object.
local quaternion_to_luaval ( local  L,
local  inValue 
)

Push a table converted from a cocos2d::Quaternion object into the Lua stack.

The format of table as follows: {x=numberValue1, y=numberValue2, z=numberValue3, w=numberValue4}

Parameters
Lthe current lua_State.
inValuea cocos2d::Quaternion object.

Variable Documentation

std::unordered_map<std::string,
std::string> g_luaType
var g_luaType
local g_luaType
std::unordered_map<std::string,
std::string> g_typeCast
var g_typeCast
local g_typeCast