Fix minor typos

This commit is contained in:
mogemimi 2015-10-14 12:42:51 +09:00
parent 40aa4187be
commit 59d7868d4c
8 changed files with 41 additions and 41 deletions

View File

@ -108,14 +108,14 @@ public:
* If value of package["loaded"][moduleFileName] is existed, it would set the vaule nil.Then,it calls executeString function.
*
* @param moduleFileName String object holding the filename of the script file that is to be executed.
* @return 0 if the string is excuted correctly or other if the string is excuted wrongly.
* @return 0 if the string is executed correctly or other if the string is executed wrongly.
*/
virtual int reload(const char* moduleFileName);
/**
* Remove the related reference about the Ref object stored in the Lua table by set the value of corresponding key nil:
* The related Lua tables are toluafix_refid_ptr_mapping,toluafix_refid_type_mapping,tolua_value_root and object_Metatable["tolua_ubox"] or tolua_ubox.
* Meanwhile set the corresponding userdata nullptr and remove the all the lua function refrence corresponding to this object.
* Meanwhile set the corresponding userdata nullptr and remove the all the lua function reference corresponding to this object.
*
* In current mechanism, this function is called in the destructor of Ref object, developer don't call this functions.
*
@ -126,14 +126,14 @@ public:
/**
* Remove Lua function reference by nHandler by setting toluafix_refid_function_mapping[nHandle] nil.
*
* @param nHandler the function refrence index to find the correspoinding Lua function pointer.
* @param nHandler the function reference index to find the correspoinding Lua function pointer.
*/
virtual void removeScriptHandler(int nHandler) override;
/**
* Reallocate Lua function reference index to the Lua function pointer to add refrence.
* Reallocate Lua function reference index to the Lua function pointer to add reference.
*
* @param nHandler the function refrence index to find the correspoinding Lua function pointer.
* @param nHandler the function reference index to find the correspoinding Lua function pointer.
*/
virtual int reallocateScriptHandler(int nHandler) override;
@ -141,7 +141,7 @@ public:
* Execute script code contained in the given string.
*
* @param codes holding the valid script code that should be executed.
* @return 0 if the string is excuted correctly,other if the string is excuted wrongly.
* @return 0 if the string is executed correctly, other if the string is executed wrongly.
*/
virtual int executeString(const char* codes) override;

View File

@ -97,7 +97,7 @@ public:
/**
* Remove the related reference about the Ref object stored in the Lua table by set the value of corresponding key nil:
* The related Lua tables are toluafix_refid_ptr_mapping,toluafix_refid_type_mapping,tolua_value_root and object_Metatable["tolua_ubox"] or tolua_ubox.
* Meanwhile set the corresponding userdata nullptr and remove the all the lua function refrence corresponding to this object.
* Meanwhile set the corresponding userdata nullptr and remove the all the lua function reference corresponding to this object.
*
* In current mechanism, this function is called in the destructor of Ref object, developer don't call this functions.
*
@ -108,14 +108,14 @@ public:
/**
* Remove Lua function reference by nHandler by setting toluafix_refid_function_mapping[nHandle] nil.
*
* @param nHandler the function refrence index to find the correspoinding Lua function pointer.
* @param nHandler the function reference index to find the correspoinding Lua function pointer.
*/
virtual void removeScriptHandler(int nHandler);
/**
* Reallocate Lua function reference index to the Lua function pointer to add refrence.
* Reallocate Lua function reference index to the Lua function pointer to add reference.
*
* @param nHandler the function refrence index to find the correspoinding Lua function pointer.
* @param nHandler the function reference index to find the correspoinding Lua function pointer.
*/
virtual int reallocateScriptHandler(int nHandler);
@ -123,7 +123,7 @@ public:
* Execute script code contained in the given string.
*
* @param codes holding the valid script code that should be executed.
* @return 0 if the string is excuted correctly,other if the string is excuted wrongly.
* @return 0 if the string is executed correctly, other if the string is executed wrongly.
*/
virtual int executeString(const char* codes);
@ -324,7 +324,7 @@ public:
* Load the Lua chunks from the zip file
*
* @param zipFilePath file path to zip file.
* @return 1 if load sucessfully otherwise 0.
* @return 1 if load successfully otherwise 0.
*/
int loadChunksFromZIP(const char *zipFilePath);
@ -332,7 +332,7 @@ public:
* Load the Lua chunks from current lua_State.
*
* @param L the current lua_State.
* @return 1 if load sucessfully otherwise 0.
* @return 1 if load successfully otherwise 0.
*/
int luaLoadChunksFromZIP(lua_State *L);

View File

@ -208,7 +208,7 @@ public:
/**
* Get the typename of the Ref object.
*
* @return the refrence of _ccobjectType.
* @return the reference of _ccobjectType.
*/
const std::string& getObjectTypename(void) const {
return *_ccobjectType;
@ -244,7 +244,7 @@ public:
/**
* Get the boolean value of LuaValue object.
*
* @return the refrence about string value.
* @return the reference about string value.
*/
const std::string& stringValue(void) const {
return *_field.stringValue;

View File

@ -326,7 +326,7 @@ extern bool luaval_to_fontdefinition(lua_State* L, int lo, FontDefinition* outVa
extern bool luaval_to_mat4(lua_State* L, int lo, cocos2d::Mat4* outValue , const char* funcName = "");
/**
* Get a __Array object value frome the given accpetable index of stack.
* Get a __Array object value from the given accpetable index of stack.
* Because __Array is deprecated, so this function would be not called anymore.
*/
extern bool luaval_to_array(lua_State* L,int lo, __Array** outValue, const char* funcName = "");

View File

@ -113,8 +113,8 @@ protected:
/**
* In order to reduce the coupling of lua script engine and native c++ engine.
* In the current mechanism, for the class derived frome the Ref, we constuct a mapping relationship among c++ Ref object ,HandlerType and the refrence index corresponding to the pointer of Lua function.Then, using the ScriptHandlerMgr to manager uniformly.
* By this mechanism,when native c++ Ref object wants to call the Lua function, we didn't insert the processing code in the native c++ class.
* In the current mechanism, for the class derived from the Ref, we constuct a mapping relationship among c++ Ref object, HandlerType and the reference index corresponding to the pointer of Lua function. Then, using the ScriptHandlerMgr to manager uniformly.
* By this mechanism, when native c++ Ref object wants to call the Lua function, we didn't insert the processing code in the native c++ class.
*/
class ScriptHandlerMgr
{
@ -259,10 +259,10 @@ public:
static void destroyInstance(void);
/**
* Construct or update the mapping relationship among c++ Ref object ,HandlerType and the refrence index corresponding to the pointer of Lua function.
* Construct or update the mapping relationship among c++ Ref object ,HandlerType and the reference index corresponding to the pointer of Lua function.
*
* @param object a Ref object.
* @param handler a refrence index corresponding to the pointer of Lua function.
* @param handler a reference index corresponding to the pointer of Lua function.
* @param handlerType ScriptHandlerMgr::HandlerType.
* @lua registerScriptHandler
* @js NA
@ -270,8 +270,8 @@ public:
void addObjectHandler(void* object,int handler,ScriptHandlerMgr::HandlerType handlerType);
/**
* By the handlerType and object, find the correct refrence index corresponding to the pointer of Lua function.
* If found, remove the refrence of Lua function corresponding to this index in the 'toluafix_refid_function_mapping' table.
* By the handlerType and object, find the correct reference index corresponding to the pointer of Lua function.
* If found, remove the reference of Lua function corresponding to this index in the 'toluafix_refid_function_mapping' table.
*
* @param object a Ref object.
* @param handlerType ScriptHandlerMgr::HandlerType.
@ -281,7 +281,7 @@ public:
void removeObjectHandler(void* object,ScriptHandlerMgr::HandlerType handlerType);
/**
* By the handlerType and object, find the correct refrence index corresponding to the pointer of Lua function.
* By the handlerType and object, find the correct reference index corresponding to the pointer of Lua function.
*
* @param object a Ref object.
* @param handlerType ScriptHandlerMgr::HandlerType.
@ -292,8 +292,8 @@ public:
int getObjectHandler(void* object,ScriptHandlerMgr::HandlerType handlerType);
/**
* Remove the all relationship among the object, HandlerType and the refrence index corresponding to the pointer of Lua function.
* Meanwhile, remove the refrence of Lua function corresponding to the indexs the object has in the 'toluafix_refid_function_mapping' table.
* Remove the all relationship among the object, HandlerType and the reference index corresponding to the pointer of Lua function.
* Meanwhile, remove the reference of Lua function corresponding to the indexs the object has in the 'toluafix_refid_function_mapping' table.
*
* @param object the Ref object.
* @js NA
@ -301,13 +301,13 @@ public:
void removeObjectAllHandlers(void* object);
/**
* Add customizable relationship among c++ Ref object, HandlerType and the refrence index corresponding to the pointer of Lua function.
* Add customizable relationship among c++ Ref object, HandlerType and the reference index corresponding to the pointer of Lua function.
* In the customizable relationship, we don't pass the HandlerType, it will obtain the HandlerType by auto-increasing.
* The HandlerTypes used to customizable relationship are between EVENT_CUSTOM_BEGAN(10000) and EVENT_CUSTOM_ENDED(11000).
* If the HandlerType increased more than 12,it would trigger assert.
*
* @param object the Ref object.
* @param handler a refrence index corresponding to the pointer of Lua function.
* @param handler a reference index corresponding to the pointer of Lua function.
* @return ScriptHandlerMgr::HandlerType the value of current ScriptHandlerMgr::HandlerType after adding.
* @lua NA
* @js NA

View File

@ -80,12 +80,12 @@ public:
const char* getNodeTypeName(Node* pNode);
/**
* Set relationship between the Lua callback function refrence index handle and the node.
* Set relationship between the Lua callback function reference index handle and the node.
* According to the different controlEvents values,we would choose different ScriptHandlerMgr::HandlerTyp.
* When node receive the events information should be passed on to Lua, it would find the Lua callback funtion by the Lua callback function refrence index.
* When node receive the events information should be passed on to Lua, it would find the Lua callback function by the Lua callback function reference index.
*
* @param node the node object should pass on the events information to Lua,when the events are triggered.
* @param handle the Lua callback function refrence index.
* @param handle the Lua callback function reference index.
* @param controlEvents the combination value of Control::EventType, default 0.
* @js NA
*/

View File

@ -38,7 +38,7 @@ public:
///@cond
/**
* Bind callStaticMethod of LuaJavaBridge to Lua.
* In current mechanism,we could call LuaJavaBridge.callStaticMethod(className, methodName, args) in Lua directly.
* In current mechanism, we could call LuaJavaBridge.callStaticMethod(className, methodName, args) in Lua directly.
* Meanwhile the callStaticMethod of LuaObjcBridge binding function is wrapped in the luaj.lua
*/
static void luaopen_luaj(lua_State *L);
@ -57,10 +57,10 @@ public:
/**
* Release a reference count for the Lua functionId, If the reference count is still greater than 0,save this reference in the Lua table named luaj_function_id_retain.
* Otherwise, remove the refrence about this functionId in the luaj_function_id table and the luaj_function_id_retain table by set the corresponding value nil.
* Otherwise, remove the reference about this functionId in the luaj_function_id table and the luaj_function_id_retain table by set the corresponding value nil.
*
* @param functionId the id of Lua function.
* @return the reference count of the functionId if the luaj_function_id table, the luaj_function_id_retain table and the corresponding value for functionId exists a reference count for the Lua functionId is still greater than 0,and otherwise return 0.
* @return the reference count of the functionId if the luaj_function_id table, the luaj_function_id_retain table and the corresponding value for functionId exists a reference count for the Lua functionId is still greater than 0, and otherwise return 0.
*
* @lua NA
* @js NA
@ -72,7 +72,7 @@ public:
*
* @param functionId the values corresponding to the Lua function.
* @param arg the string pointer point to the argument.
* @return a number value returned frome the Lua function when call sucessfully, otherwise return -1 or the opposite number for one of the three numbers LUA_ERRRUN,LUA_ERRMEM and LUA_ERRERR.
* @return a number value returned from the Lua function when call successfully, otherwise return -1 or the opposite number for one of the three numbers LUA_ERRRUN, LUA_ERRMEM and LUA_ERRERR.
*
* @lua NA
* @js NA
@ -84,7 +84,7 @@ public:
*
* @param functionName the name of global function.
* @param arg the string pointer point to the argument.
* @return a number value returned frome the Lua function when call sucessfully, otherwise return -1 or the opposite number for one of the three numbers LUA_ERRRUN,LUA_ERRMEM and LUA_ERRERR.
* @return a number value returned from the Lua function when call successfully, otherwise return -1 or the opposite number for one of the three numbers LUA_ERRRUN, LUA_ERRMEM and LUA_ERRERR.
*
* @lua NA
* @js NA

View File

@ -21,7 +21,7 @@ TOLUA_API void toluafix_open(lua_State* L);
* If the userdata correspondings to the ptr don't exist, it would call lua_newuserdata to new a userdata.
* If the userdata correspondings to the ptr exist,it would update the metatable information of the super.
* In addition, this function would update some table in the Lua registry,such as toluafix_refid_ptr_mapping, toluafix_refid_type_mapping,tolua_value_root,and so on.
* Meanwhile, Add a refrence about the userdata corresponding to the ptr in the tolua_ubox table.
* Meanwhile, Add a reference about the userdata corresponding to the ptr in the tolua_ubox table.
* The ptr should be point to a Ref object.
*
* @param L the current lua_State.
@ -41,8 +41,8 @@ TOLUA_API int toluafix_pushusertype_ccobject(lua_State* L,
/**
* Find the value of Ref object pointer in the Lua registry by the refid.
* Then, remove the corresponding refrence in some table in the Lua registry by refid, such as toluafix_refid_type_mapping, toluafix_refid_ptr_mapping,tolua_value_root,and so on.
* Set the value of userdata nullptr and remove the refrence of userdata in the tolua_ubox table.
* Then, remove the corresponding reference in some table in the Lua registry by refid, such as toluafix_refid_type_mapping, toluafix_refid_ptr_mapping,tolua_value_root,and so on.
* Set the value of userdata nullptr and remove the reference of userdata in the tolua_ubox table.
* This function is called in the destructor of the Ref automatically.
*
* @param L the current lua_State.
@ -54,13 +54,13 @@ TOLUA_API int toluafix_pushusertype_ccobject(lua_State* L,
TOLUA_API int toluafix_remove_ccobject_by_refid(lua_State* L, int refid);
/**
* Get the refrence id of the Lua function at the given accepteable index lo of stack.
* Meanwhile add refrence about the Lua function through the toluafix_refid_function_mapping table in the Lua registry.
* Get the reference id of the Lua function at the given accepteable index lo of stack.
* Meanwhile add reference about the Lua function through the toluafix_refid_function_mapping table in the Lua registry.
*
* @param L the current lua_State.
* @param lo the given accepteable index lo of stack.
* @param def useless.
* @return 0 if the type of value at the given accepteable index lo of stack is not LUA_TFUNCTION; otherwise return the refrence id.
* @return 0 if the type of value at the given accepteable index lo of stack is not LUA_TFUNCTION; otherwise return the reference id.
* @lua NA
* @js NA
*/