Changeset 999 for code/branches/script/src/orxonox/core/Script.h
- Timestamp:
- Apr 6, 2008, 2:43:12 AM (17 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
code/branches/script/src/orxonox/core/Script.h
r996 r999 21 21 { // tolua_export 22 22 public: 23 Script(); // tolua_export24 ~Script();23 inline static Script* getInstance() { if (!Script::singletonRef) Script::singletonRef = new Script(); return Script::singletonRef; } 24 inline ~Script() { Script::singletonRef = NULL; }; 25 25 26 staticvoid loadFile(std::string filename, bool luaTags);27 staticvoid init(lua_State *state_);26 void loadFile(std::string filename, bool luaTags); 27 //void init(lua_State *state_); 28 28 //void xmlToLua(); 29 staticvoid run();29 void run(); 30 30 void luaPrint(std::string str); // tolua_export 31 31 32 inline static lua_State* getLuaState() { return luaState_; }; 33 inline static std::string* getFileString() { return &fileString_; }; 32 inline lua_State* getLuaState() { return luaState_; }; 33 inline std::string getLuaOutput() { return output_; }; 34 //inline std::string* getFileString() { return &fileString_; }; 34 35 35 staticunsigned int getNextQuote(const std::string& text, unsigned int start);36 st atic std::string replaceLuaTags(const std::string& text);36 unsigned int getNextQuote(const std::string& text, unsigned int start); 37 std::string replaceLuaTags(const std::string& text); 37 38 38 39 private: 40 Script(); 41 static Script* singletonRef; 39 42 40 //std::list<std::string>& getLevelFileLines(); 41 42 static std::string fileString_; 43 static lua_State* luaState_; 43 std::string luaSource_; 44 std::string output_; 45 lua_State* luaState_; 44 46 45 47 }; // tolua_export
Note: See TracChangeset
for help on using the changeset viewer.