Parent Directory
|
Revision Log
Can now access the ASCEND model from an external python script method. The API is not at all nice, but it's basically working now.
| 1 | /** |
| 2 | Provide methods to registry GUI objects with libascend |
| 3 | so that they can be accessed from script methods there. |
| 4 | */ |
| 5 | |
| 6 | #ifndef ASCXX_REGISTRY_H |
| 7 | #define ASCXX_REGISTRY_H |
| 8 | |
| 9 | #include "config.h" |
| 10 | |
| 11 | #ifdef ASCXX_USE_PYTHON |
| 12 | # include <Python.h> |
| 13 | #endif |
| 14 | |
| 15 | #include "instance.h" |
| 16 | |
| 17 | class Registry{ |
| 18 | public: |
| 19 | void setInteger(const char *key, int value); |
| 20 | void setPointer(const char *key, void *value); |
| 21 | Instanc *getInstance(const char *key); |
| 22 | #ifdef ASCXX_USE_PYTHON |
| 23 | void setPyObject(const char *key, PyObject *obj); |
| 24 | #endif |
| 25 | }; |
| 26 | |
| 27 | #endif /* ASCXX_REGISTRY_H */ |
| john.pye@anu.edu.au | ViewVC Help |
| Powered by ViewVC 1.1.22 |