Changeset 2026 for code/branches/objecthierarchy/src/core
- Timestamp:
- Oct 28, 2008, 3:06:23 PM (16 years ago)
- Location:
- code/branches/objecthierarchy/src/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/core/LuaBind.cc
r1961 r2026 123 123 isRunning_ = true; 124 124 int error = 0; 125 std::string init = "local scr = orxonox.LuaBind:getInstance()\nlocal debug = print\nprint = function(s)\nscr:luaPrint(s)\nend\ninclude = function(f)\nfile = io.open(f)\ncontent = file:read(\"*a\")\nfile:close()\nsource = scr:replaceLuaTags(content)\ndebug(source)\nassert(loadstring(source))()\nend\n";125 std::string init = "local scr = orxonox.LuaBind:getInstance()\nlocal debug = print\nprint = function(s)\nscr:luaPrint(s)\nend\ninclude = function(f)\nfile = assert(io.open(\"" + this->includePath_ + "\"..\"/\"..f))\ncontent = file:read(\"*a\")\nfile:close()\nsource = scr:replaceLuaTags(content)\nassert(loadstring(source))()\nend\n"; 126 126 init += luaSource_; 127 127 #if LUA_VERSION_NUM == 501 -
code/branches/objecthierarchy/src/core/LuaBind.h
r1959 r2026 79 79 std::string replaceLuaTags(const std::string& text); // tolua_export 80 80 81 inline void setIncludePath(const std::string& includepath) 82 { this->includePath_ = includepath; } 83 81 84 private: 82 85 LuaBind(); … … 87 90 lua_State* luaState_; 88 91 bool isRunning_; 92 std::string includePath_; 89 93 90 94 }; // tolua_export
Note: See TracChangeset
for help on using the changeset viewer.