cyphesis/rulesets/PythonScript.h
Al Riddoch 563b6c4714 2005-12-05 Al Riddoch <alriddoch@zepler.org>
* server/TaskFactory.cpp, server/TaskFactory.h: Re-write the
	  script task to handle creating the script directly, rather than
	  use ScriptFactory which is not suitable.

	* rulesets/PythonMindScript.cpp, rulesets/PythonScript.cpp,
	  rulesets/PythonScript.h, PythonThingScript.cpp,
	  rulesets/PythonThingScript.h, rulesets/Python_API.cpp,
	  server/ScriptFactory.cpp: Remove obsolete pointer to entity
	  from script class, removing its link to Entity, making it more
	  generally useful.
2005-12-05 23:47:17 +00:00

28 lines
839 B
C++

// This file may be redistributed and modified only under the terms of
// the GNU General Public License (See COPYING for details).
// Copyright (C) 2001 Alistair Riddoch
#ifndef RULESETS_PYTHON_SCRIPT_H
#define RULESETS_PYTHON_SCRIPT_H
#include <Python.h>
#include "Script.h"
class Entity;
/// \brief Base Script class for Python scripts
class PythonScript : public Script {
protected:
PyObject * scriptObject;
public:
PythonScript(PyObject *);
virtual ~PythonScript();
virtual bool operation(const std::string &,
const Atlas::Objects::Operation::RootOperation &,
OpVector &,
const Atlas::Objects::Operation::RootOperation * = 0) = 0;
virtual void hook(const std::string &, Entity *) = 0;
};
#endif // RULESETS_PYTHON_SCRIPT_H