| Line |   | 
|---|
| 1 | /* | 
|---|
| 2 |    orxonox - the future of 3D-vertical-scrollers | 
|---|
| 3 |  | 
|---|
| 4 |    Copyright (C) 2004 orx | 
|---|
| 5 |  | 
|---|
| 6 |    This program is free software; you can redistribute it and/or modify | 
|---|
| 7 |    it under the terms of the GNU General Public License as published by | 
|---|
| 8 |    the Free Software Foundation; either version 2, or (at your option) | 
|---|
| 9 |    any later version. | 
|---|
| 10 |  | 
|---|
| 11 |    ### File Specific: | 
|---|
| 12 |    main-programmer: ... | 
|---|
| 13 |    co-programmer: ... | 
|---|
| 14 | */ | 
|---|
| 15 |  | 
|---|
| 16 | //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ | 
|---|
| 17 |  | 
|---|
| 18 | #include "script_method.h" | 
|---|
| 19 |  | 
|---|
| 20 | /** | 
|---|
| 21 |  * @param standard constructor | 
|---|
| 22 |  * @todo this constructor is not jet implemented - do it | 
|---|
| 23 | */ | 
|---|
| 24 | ScriptMethod::ScriptMethod() | 
|---|
| 25 | { } | 
|---|
| 26 |  | 
|---|
| 27 | ScriptMethod* ScriptMethod::addMethod(const std::string& methodName, const Executor& executor) | 
|---|
| 28 | { | 
|---|
| 29 |   this->methods.push_back(ScriptMethod::Method(methodName, executor)); | 
|---|
| 30 |  | 
|---|
| 31 |   return this; | 
|---|
| 32 | } | 
|---|
| 33 |  | 
|---|
| 34 | ScriptMethod::Method::Method(const std::string& name, const Executor& executor) | 
|---|
| 35 | { | 
|---|
| 36 |   this->name = name; | 
|---|
| 37 |   this->executor = executor.clone(); | 
|---|
| 38 | } | 
|---|
| 39 |  | 
|---|
| 40 | /** | 
|---|
| 41 |  * standard deconstructor | 
|---|
| 42 | */ | 
|---|
| 43 | ScriptMethod::~ScriptMethod() | 
|---|
| 44 | { | 
|---|
| 45 |   for (unsigned int i = 0; i < methods.size(); i ++) | 
|---|
| 46 |   { | 
|---|
| 47 |     delete methods[i].executor; | 
|---|
| 48 |   }; | 
|---|
| 49 | } | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.