vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PyAbility.h
Go to the documentation of this file.
1 /*************************************************/
2 /* PyAbility.h - embed Python in C++ */
3 /* Jan Sonnekt - Feb 06 */
4 /*************************************************/
5 #ifndef VreckoPyAbility_H
6 #define VreckoPyAbility_H
7 
8 /* <Python must be included before stdlib.h >*/
9 #ifdef WIN32
10 #include <Python.h>
11 #else
12 #include <python/Python.h>
13 #endif
14 #include <vrecko/Ability.h>
15 
16 /* includes form vrecko::Ability */
17 
18 namespace vrecko {
19 
30  class PyAbility : public vrecko::Ability {
31  public:
32  PyAbility();
33  ~PyAbility();
34  void update(void);
35  void processEvent (const std::string&, void *) {}
36  void preInitialize(void) {}
37  void postInitialize(void);
38  void setCallBacks(PyObject* update, PyObject* processEvent, PyObject *post);
39 
40  protected:
41  static PyObject *mUpdate;
42  static PyObject *mProcessEvent;
43  static PyObject *mPost;
44 
45  std::string id_string;
46  static unsigned long int counter;
47  };
48 
49 }
50 #endif