python: Improve support for python calling back to C++ member functions.
Add support for declaring SimObjects to swig so their members can be wrapped. Make sim_object.i only contain declarations for SimObject. Create system.i to contain declarations for System. Update python code to properly call the C++ given the new changes. --HG-- extra : convert_revision : 82076ee69e8122d56e91b92d6767e356baae420a
This commit is contained in:
@@ -47,26 +47,6 @@ void loadIniFile(PyObject *_resolveFunc);
|
||||
int connectPorts(SimObject *o1, const std::string &name1, int i1,
|
||||
SimObject *o2, const std::string &name2, int i2);
|
||||
|
||||
inline BaseCPU *
|
||||
convertToBaseCPUPtr(SimObject *obj)
|
||||
{
|
||||
BaseCPU *ptr = dynamic_cast<BaseCPU *>(obj);
|
||||
|
||||
if (ptr == NULL)
|
||||
warn("Casting to BaseCPU pointer failed");
|
||||
return ptr;
|
||||
}
|
||||
|
||||
inline System *
|
||||
convertToSystemPtr(SimObject *obj)
|
||||
{
|
||||
System *ptr = dynamic_cast<System *>(obj);
|
||||
|
||||
if (ptr == NULL)
|
||||
warn("Casting to System pointer failed");
|
||||
return ptr;
|
||||
}
|
||||
|
||||
inline void
|
||||
initAll()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user