Changeset 7653 in orxonox.OLD for branches/script_engine/src/lib/script_engine/scriptable.h
- Timestamp:
- May 17, 2006, 7:55:59 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/script_engine/src/lib/script_engine/scriptable.h
r7645 r7653 9 9 #include "luaincl.h" 10 10 11 class LuaScript; 11 namespace OrxScript 12 { 13 class LuaScript; 12 14 13 //internal representation of a LuaScript14 struct Script15 //internal representation of a LuaScript 16 struct Script 15 17 { 16 18 int lastMethodIndex; … … 22 24 }; 23 25 24 class Scriptable25 {26 class Scriptable 27 { 26 28 public: 27 29 Scriptable (void); 28 30 virtual ~Scriptable (void); 29 31 30 // Method indexing check31 int methods (LuaVirtualMachine& virtualMachine);32 // Method indexing check 33 int methods (LuaVirtualMachine& virtualMachine); 32 34 //int methods(){;return 1;} //BAD BAD HACK HACK HACK !!!!!!!!!!!!!! 33 35 34 36 char whatIsThis(); 35 37 36 // When the script calls a class method, this is called38 // When the script calls a class method, this is called 37 39 virtual int scriptCalling (LuaVirtualMachine& vm, std::string functionName) = 0; 38 40 39 // When the script function has returns41 // When the script function has returns 40 42 virtual void handleReturns (LuaVirtualMachine& vm, const std::string& strFunc) = 0; 41 43 … … 45 47 void registerFunction(std::string functionName);//Adds a function to the internal function list 46 48 private: 47 bool scriptableAdded(LuaScript* script, int scriptRef, int reference);48 //void scriptableFunctionAdded(LuaScript* script, int reference);49 bool scriptableAdded(LuaScript* script, int scriptRef, int reference); 50 //void scriptableFunctionAdded(LuaScript* script, int reference); 49 51 50 52 51 Script* getScriptByPointer(LuaScript* script);52 Script* getScriptByVirtualMachine(LuaVirtualMachine& virtualMachine);53 std::map<int, std::string>* getFunctionMapByPointer(LuaScript* scriptPointer);54 int getLastMethodIndexByPointer(LuaScript* script);53 Script* getScriptByPointer(LuaScript* script); 54 Script* getScriptByVirtualMachine(LuaVirtualMachine& virtualMachine); 55 std::map<int, std::string>* getFunctionMapByPointer(LuaScript* scriptPointer); 56 int getLastMethodIndexByPointer(LuaScript* script); 55 57 56 58 57 bool scriptIsInScriptList(LuaScript* script);59 bool scriptIsInScriptList(LuaScript* script); 58 60 59 void scriptDeleted(LuaScript* deleted);61 void scriptDeleted(LuaScript* deleted); 60 62 61 63 62 friend class LuaScript;64 friend class LuaScript; 63 65 64 66 std::list<std::string> functionList; 65 67 std::list<Script> scriptList; 66 };68 }; 67 69 70 } 68 71 69 72 #endif // __SCRIPTABLE_H__
Note: See TracChangeset
for help on using the changeset viewer.