Преглед изворни кода

Removed ScriptController methods for querying types and setNil().

Darryl Gough пре 13 година
родитељ
комит
c5ee684b9f
2 измењених фајлова са 0 додато и 167 уклоњено
  1. 0 70
      gameplay/src/ScriptController.cpp
  2. 0 97
      gameplay/src/ScriptController.h

+ 0 - 70
gameplay/src/ScriptController.cpp

@@ -372,70 +372,6 @@ std::string ScriptController::loadUrl(const char* url)
     return id;
 }
 
-bool ScriptController::isNil(const char* name)
-{
-    lua_getglobal(_lua, name);
-    bool b = lua_isnil(_lua, -1) != 0;
-    lua_pop(_lua, 1);
-    return b;
-}
-
-bool ScriptController::isBool(const char* name)
-{
-    lua_getglobal(_lua, name);
-    bool b = lua_isboolean(_lua, -1) != 0;
-    lua_pop(_lua, 1);
-    return b;
-}
-
-bool ScriptController::isNumber(const char* name)
-{
-    lua_getglobal(_lua, name);
-    bool b = lua_isnumber(_lua, -1) != 0;
-    lua_pop(_lua, 1);
-    return b;
-}
-
-bool ScriptController::isString(const char* name)
-{
-    lua_getglobal(_lua, name);
-    bool b = lua_isstring(_lua, -1) != 0;
-    lua_pop(_lua, 1);
-    return b;
-}
-
-bool ScriptController::isTable(const char* name)
-{
-    lua_getglobal(_lua, name);
-    bool b = lua_istable(_lua, -1) != 0;
-    lua_pop(_lua, 1);
-    return b;
-}
-
-bool ScriptController::isThread(const char* name)
-{
-    lua_getglobal(_lua, name);
-    bool b = lua_isthread(_lua, -1) != 0;
-    lua_pop(_lua, 1);
-    return b;
-}
-
-bool ScriptController::isUserData(const char* name)
-{
-    lua_getglobal(_lua, name);
-    bool b = lua_isuserdata(_lua, -1) != 0;
-    lua_pop(_lua, 1);
-    return b;
-}
-
-bool ScriptController::isFunction(const char* name)
-{
-    lua_getglobal(_lua, name);
-    bool b = lua_isfunction(_lua, -1) != 0;
-    lua_pop(_lua, 1);
-    return b;
-}
-
 bool ScriptController::getBool(const char* name, bool defaultValue)
 {
     lua_getglobal(_lua, name);
@@ -532,12 +468,6 @@ const char* ScriptController::getString(const char* name)
     return s;
 }
 
-void ScriptController::setNil(const char* name)
-{
-    lua_pushnil(_lua);
-    lua_setglobal(_lua, name);
-}
-
 void ScriptController::setBool(const char* name, bool v)
 {
     lua_pushboolean(_lua, v);

+ 0 - 97
gameplay/src/ScriptController.h

@@ -426,94 +426,6 @@ public:
      */
     template<typename T> T executeFunction(const char* func, const char* args, va_list* list);
 
-    /**
-     * Returns true if the global variable is nil.
-     * 
-     * @param name The name of the global variable.
-     * 
-     * @return True if the global variable is nil, false otherwise.
-     * 
-     * @script{ignore}
-     */
-    bool isNil(const char* name);
-
-    /**
-     * Returns true if the global variable is a boolean.
-     * 
-     * @param name The name of the global variable.
-     * 
-     * @return True if the global variable is a boolean, false otherwise.
-     * 
-     * @script{ignore}
-     */
-    bool isBool(const char* name);
-
-    /**
-     * Returns true if the global variable is a number.
-     * 
-     * @param name The name of the global variable.
-     * 
-     * @return Returns true if the global variable is a number, false otherwise.
-     * 
-     * @script{ignore}
-     */
-    bool isNumber(const char* name);
-
-    /**
-     * Returns true if the global variable is a string.
-     * 
-     * @param name The name of the global variable.
-     * 
-     * @return Returns true if the global variable is a string, false otherwise.
-     * 
-     * @script{ignore}
-     */
-    bool isString(const char* name);
-
-    /**
-     * Returns true if the global variable is a table.
-     * 
-     * @param name The name of the global variable.
-     * 
-     * @return Returns true if the global variable is a table, false otherwise.
-     * 
-     * @script{ignore}
-     */
-    bool isTable(const char* name);
-
-    /**
-     * Returns true if the global variable is a thread.
-     * 
-     * @param name The name of the global variable.
-     * 
-     * @return Returns true if the global variable is a thread, false otherwise.
-     * 
-     * @script{ignore}
-     */
-    bool isThread(const char* name);
-
-    /**
-     * Returns true if the global variable is a userdata.
-     * 
-     * @param name The name of the global variable.
-     * 
-     * @return Returns true if the global variable is a userdata, false otherwise.
-     * 
-     * @script{ignore}
-     */
-    bool isUserData(const char* name);
-
-    /**
-     * Returns true if the global variable is a function.
-     * 
-     * @param name The name of the global variable.
-     * 
-     * @return Returns true if the global variable is a function, false otherwise.
-     * 
-     * @script{ignore}
-     */
-    bool isFunction(const char* name);
-
     /**
      * Gets the global boolean script variable with the given name.
      * 
@@ -669,15 +581,6 @@ public:
      */
     template<typename T>T* getObjectPointer(const char* type, const char* name);
 
-    /**
-     * Sets the global variable to nil.
-     * 
-     * @param name The name of the global variable.
-     * 
-     * @script{ignore}
-     */
-    void setNil(const char* name);
-
     /**
      * Sets the global boolean script variable with the given name to the given value.
      *