Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 17, 2006, 7:55:59 PM (18 years ago)
Author:
bensch
Message:

orxonox/script_engine: namespace OrxScript introduced

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/script_engine/src/lib/script_engine/scriptable.h

    r7645 r7653  
    99#include "luaincl.h"
    1010
    11 class LuaScript;
     11namespace OrxScript
     12{
     13  class LuaScript;
    1214
    13 //internal representation of a LuaScript
    14 struct Script
     15  //internal representation of a LuaScript
     16  struct Script
    1517  {
    1618    int lastMethodIndex;
     
    2224  };
    2325
    24 class Scriptable
    25 {
     26  class Scriptable
     27  {
    2628  public:
    2729    Scriptable (void);
    2830    virtual ~Scriptable (void);
    2931
    30    // Method indexing check
    31    int methods (LuaVirtualMachine& virtualMachine);
     32    // Method indexing check
     33    int methods (LuaVirtualMachine& virtualMachine);
    3234    //int methods(){;return 1;} //BAD BAD HACK HACK HACK !!!!!!!!!!!!!!
    3335
    3436    char whatIsThis();
    3537
    36    // When the script calls a class method, this is called
     38    // When the script calls a class method, this is called
    3739    virtual int scriptCalling (LuaVirtualMachine& vm, std::string functionName) = 0;
    3840
    39    // When the script function has returns
     41    // When the script function has returns
    4042    virtual void handleReturns (LuaVirtualMachine& vm, const std::string& strFunc) = 0;
    4143
     
    4547    void registerFunction(std::string functionName);//Adds a function to the internal function list
    4648  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);
    4951
    5052
    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);
    5557
    5658
    57    bool scriptIsInScriptList(LuaScript* script);
     59    bool scriptIsInScriptList(LuaScript* script);
    5860
    59    void scriptDeleted(LuaScript* deleted);
     61    void scriptDeleted(LuaScript* deleted);
    6062
    6163
    62   friend class LuaScript;
     64    friend class LuaScript;
    6365
    6466    std::list<std::string> functionList;
    6567    std::list<Script> scriptList;
    66 };
     68  };
    6769
     70}
    6871
    6972#endif // __SCRIPTABLE_H__
Note: See TracChangeset for help on using the changeset viewer.