Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/script_engine/script_method.cc @ 10765

Last change on this file since 10765 was 9869, checked in by bensch, 18 years ago

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

File size: 1.1 KB
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: Benjamin Grauer
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*/
24ScriptMethod::ScriptMethod()
25{ }
26
27ScriptMethod* ScriptMethod::addMethod(const std::string& methodName, const Executor<lua_State*>& executor)
28{
29  this->methods.push_back(ScriptMethod::Method(methodName, executor));
30
31  return this;
32}
33
34ScriptMethod::Method::Method(const std::string& name, const Executor<lua_State*>& executor)
35{
36  this->name = name;
37  this->executor = executor.clone();
38}
39
40/**
41 * standard deconstructor
42*/
43ScriptMethod::~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.