2001-01-26 16:38:23 +00:00
|
|
|
// This file may be redistributed and modified only under the terms of
|
2001-03-16 11:38:14 +00:00
|
|
|
// the GNU General Public License (See COPYING for details).
|
2001-04-16 16:26:44 +00:00
|
|
|
// Copyright (C) 2000,2001 Alistair Riddoch
|
2001-01-26 16:38:23 +00:00
|
|
|
|
2000-11-14 15:52:10 +00:00
|
|
|
#ifndef PYTHON_API_H
|
|
|
|
|
#define PYTHON_API_H
|
|
|
|
|
|
2001-04-10 19:05:14 +00:00
|
|
|
class Entity;
|
2000-11-16 16:35:03 +00:00
|
|
|
class Thing;
|
2001-04-10 19:05:14 +00:00
|
|
|
class BaseMind;
|
2000-11-19 00:02:29 +00:00
|
|
|
class MemMap;
|
2000-11-20 20:28:08 +00:00
|
|
|
class Location;
|
2000-11-29 15:19:36 +00:00
|
|
|
class WorldTime;
|
2000-12-03 16:56:10 +00:00
|
|
|
class WorldRouter;
|
2000-11-20 20:28:08 +00:00
|
|
|
|
2001-04-16 16:26:44 +00:00
|
|
|
#include <common/types.h>
|
|
|
|
|
#include <common/operations.h>
|
2000-11-23 14:32:00 +00:00
|
|
|
|
2000-11-20 20:28:08 +00:00
|
|
|
#include <physics/Vector3D.h>
|
2000-11-16 16:35:03 +00:00
|
|
|
|
2001-04-10 19:05:14 +00:00
|
|
|
#include <Python.h>
|
|
|
|
|
|
2001-04-16 16:26:44 +00:00
|
|
|
using Atlas::Message::Object;
|
|
|
|
|
|
2000-11-14 15:52:10 +00:00
|
|
|
typedef struct {
|
|
|
|
|
PyObject_HEAD
|
2001-04-16 16:26:44 +00:00
|
|
|
PyObject * Object_attr; // Attributes dictionary
|
2000-11-14 15:52:10 +00:00
|
|
|
Object * m_obj;
|
|
|
|
|
} AtlasObject;
|
|
|
|
|
|
2000-11-16 16:35:03 +00:00
|
|
|
typedef struct {
|
|
|
|
|
PyObject_HEAD
|
2001-04-16 16:26:44 +00:00
|
|
|
PyObject * Thing_attr; // Attributes dictionary
|
2001-04-10 19:05:14 +00:00
|
|
|
Entity * m_thing;
|
2000-11-16 16:35:03 +00:00
|
|
|
} ThingObject;
|
|
|
|
|
|
2000-11-19 00:02:29 +00:00
|
|
|
typedef struct {
|
|
|
|
|
PyObject_HEAD
|
|
|
|
|
MemMap * m_map;
|
|
|
|
|
} MapObject;
|
|
|
|
|
|
2000-11-20 20:28:08 +00:00
|
|
|
typedef struct {
|
|
|
|
|
PyObject_HEAD
|
|
|
|
|
Location * location;
|
2000-12-08 11:40:32 +00:00
|
|
|
int own;
|
2000-11-20 20:28:08 +00:00
|
|
|
} LocationObject;
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
PyObject_HEAD
|
|
|
|
|
Vector3D coords;
|
|
|
|
|
} Vector3DObject;
|
|
|
|
|
|
2000-11-29 15:19:36 +00:00
|
|
|
typedef struct {
|
|
|
|
|
PyObject_HEAD
|
|
|
|
|
WorldTime * time;
|
|
|
|
|
} WorldTimeObject;
|
|
|
|
|
|
2000-12-03 16:56:10 +00:00
|
|
|
typedef struct {
|
|
|
|
|
PyObject_HEAD
|
|
|
|
|
WorldRouter * world;
|
|
|
|
|
} WorldObject;
|
|
|
|
|
|
2001-04-16 16:26:44 +00:00
|
|
|
typedef struct {
|
|
|
|
|
PyObject_HEAD
|
|
|
|
|
PyObject * Operation_attr;
|
|
|
|
|
RootOperation * operation;
|
|
|
|
|
int own;
|
|
|
|
|
Entity * from;
|
|
|
|
|
Entity * to;
|
|
|
|
|
} RootOperationObject;
|
2000-11-14 15:52:10 +00:00
|
|
|
|
2000-11-23 14:32:00 +00:00
|
|
|
typedef struct {
|
|
|
|
|
PyObject_HEAD
|
|
|
|
|
oplist * ops;
|
|
|
|
|
} OplistObject;
|
|
|
|
|
|
2000-11-29 18:02:01 +00:00
|
|
|
typedef struct {
|
|
|
|
|
PyObject_HEAD
|
|
|
|
|
} FunctionObject;
|
|
|
|
|
|
2000-11-27 18:28:20 +00:00
|
|
|
typedef struct {
|
|
|
|
|
PyObject_HEAD
|
|
|
|
|
RootOperation * operation;
|
|
|
|
|
} OptimeObject;
|
|
|
|
|
|
2000-11-17 00:18:32 +00:00
|
|
|
#include "Py_Object.h"
|
|
|
|
|
#include "Py_Thing.h"
|
2000-11-19 00:02:29 +00:00
|
|
|
#include "Py_Map.h"
|
2000-11-20 20:28:08 +00:00
|
|
|
#include "Py_Location.h"
|
|
|
|
|
#include "Py_Vector3D.h"
|
2000-11-29 15:19:36 +00:00
|
|
|
#include "Py_WorldTime.h"
|
2000-12-03 16:56:10 +00:00
|
|
|
#include "Py_World.h"
|
2000-11-17 00:18:32 +00:00
|
|
|
#include "Py_Operation.h"
|
2000-11-23 14:32:00 +00:00
|
|
|
#include "Py_Oplist.h"
|
2000-11-27 18:28:20 +00:00
|
|
|
#include "Py_Optime.h"
|
2000-11-14 15:52:10 +00:00
|
|
|
|
2001-04-10 19:05:14 +00:00
|
|
|
void Create_PyThing(Thing * thing, const string& package, const string& type);
|
|
|
|
|
void Create_PyMind(BaseMind * mind, const string& package, const string& type);
|
2000-11-19 00:02:29 +00:00
|
|
|
|
2001-04-16 16:26:44 +00:00
|
|
|
#endif // PYTHON_API_H
|