| Line |   | 
|---|
| 1 | /*! | 
|---|
| 2 |  * @file script_method.h | 
|---|
| 3 |  * @brief Definition of ... | 
|---|
| 4 | */ | 
|---|
| 5 |  | 
|---|
| 6 | #ifndef _SCRIPT_METHOD_H | 
|---|
| 7 | #define _SCRIPT_METHOD_H | 
|---|
| 8 |  | 
|---|
| 9 | #include <vector> | 
|---|
| 10 |  | 
|---|
| 11 | #include "executor_lua_state.h" | 
|---|
| 12 | #include "executor/executor_member.h" | 
|---|
| 13 |  | 
|---|
| 14 | class ScriptMethod | 
|---|
| 15 | { | 
|---|
| 16 | public: | 
|---|
| 17 |   ScriptMethod(); | 
|---|
| 18 |   ~ScriptMethod(); | 
|---|
| 19 |  | 
|---|
| 20 |   ScriptMethod* addMethod(const std::string& methodName, const Executor<lua_State*>& executor); | 
|---|
| 21 |  | 
|---|
| 22 |   unsigned int size() const { return methods.size(); }; | 
|---|
| 23 |  | 
|---|
| 24 |   const std::string& name(unsigned int methodNumber) const { return methods[methodNumber].name; }; | 
|---|
| 25 |   const Executor<lua_State*>* executor(unsigned int methodNumber) const { return methods[methodNumber].executor; }; | 
|---|
| 26 |  | 
|---|
| 27 |  | 
|---|
| 28 | private: | 
|---|
| 29 |   struct Method | 
|---|
| 30 |   { | 
|---|
| 31 |     Method(const std::string& name, const Executor<lua_State*>& executor); | 
|---|
| 32 |     std::string             name; | 
|---|
| 33 |     Executor<lua_State*>*   executor; | 
|---|
| 34 |   }; | 
|---|
| 35 |  | 
|---|
| 36 |   std::vector<Method> methods; | 
|---|
| 37 | }; | 
|---|
| 38 |  | 
|---|
| 39 | #endif /* _SCRIPT_METHOD_H */ | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.