2001-04-10 19:05:14 +00:00
|
|
|
// This file may be redistributed and modified only under the terms of
|
|
|
|
|
// the GNU General Public License (See COPYING for details).
|
2001-04-16 16:26:44 +00:00
|
|
|
// Copyright (C) 2001 Alistair Riddoch
|
2001-04-10 19:05:14 +00:00
|
|
|
|
2001-08-02 14:27:06 +00:00
|
|
|
#ifndef RULESETS_PYTHON_SCRIPT_H
|
|
|
|
|
#define RULESETS_PYTHON_SCRIPT_H
|
2001-04-10 19:05:14 +00:00
|
|
|
|
|
|
|
|
#include "Script.h"
|
|
|
|
|
|
|
|
|
|
#include <Python.h>
|
|
|
|
|
|
|
|
|
|
class Entity;
|
|
|
|
|
|
|
|
|
|
class PythonScript : public Script {
|
|
|
|
|
protected:
|
2001-04-11 14:34:15 +00:00
|
|
|
PyObject * scriptObject;
|
2001-04-10 19:05:14 +00:00
|
|
|
Entity & entity;
|
|
|
|
|
public:
|
|
|
|
|
PythonScript(PyObject *, Entity &);
|
|
|
|
|
virtual ~PythonScript();
|
2001-08-02 14:27:06 +00:00
|
|
|
virtual bool Operation(const std::string&,
|
2002-03-08 14:58:40 +00:00
|
|
|
const Atlas::Objects::Operation::RootOperation&, OpVector&,
|
|
|
|
|
Atlas::Objects::Operation::RootOperation * sub_op=NULL) = 0;
|
2001-08-02 14:27:06 +00:00
|
|
|
virtual void hook(const std::string &, Entity *) = 0;
|
2001-04-10 19:05:14 +00:00
|
|
|
};
|
|
|
|
|
|
2001-08-02 14:27:06 +00:00
|
|
|
#endif // RULESETS_PYTHON_SCRIPT_H
|