/[ascend]/trunk/pygtk/registry.h
ViewVC logotype

Contents of /trunk/pygtk/registry.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 900 - (show annotations) (download) (as text)
Wed Oct 25 06:03:04 2006 UTC (13 years, 3 months ago) by johnpye
File MIME type: text/x-chdr
File size: 822 byte(s)
The 'sim' object is correctly accessible from script methods now, even if run during on_load.
Added 'getSimulation' to registry.cpp, added 'runDefaultMethod' to Simulation, added 'getMethod' to Type.
Running of 'on_load' is instigated at the Python level now, so that relevent python variables are set at simulations are built, etc. This appears to have cause some changes to the way the solver behaves, possibly.
Added SearchProcList to exports in libascend.

1 /**
2 @file
3 This head files provides SWIGed access to the importhandler 'shared pointer'
4 mechanism used to pass data from 'extpy' to 'ascpy' in particular (and
5 hopefully between other scripting languages/GUI combinations in future)
6 */
7
8 #ifndef ASCXX_REGISTRY_H
9 #define ASCXX_REGISTRY_H
10
11 #include "config.h"
12
13 #ifdef ASCXX_USE_PYTHON
14 # include <Python.h>
15 #endif
16
17 /*
18 extern "C"{
19 #ifdef ASCXX_USE_PYTHON
20 ASC_IMPORT(void *) importhandler_getsharedpointer(const char *);
21 #endif
22 }
23 */
24
25 #include "instance.h"
26
27 class Registry{
28 public:
29 void setInteger(const char *key, int value);
30 void setPointer(const char *key, void *value);
31 Instanc *getInstance(const char *key);
32 Simulation &getSimulation(const char *key);
33 #ifdef ASCXX_USE_PYTHON
34 void setPyObject(const char *key, PyObject *obj);
35 #endif
36 };
37
38 #endif /* ASCXX_REGISTRY_H */

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22