From: Tom F. <ant...@gm...> - 2010-01-01 00:56:19
|
I've begun work on extending the C++ backend to support a 3rd party library and a bit of the stl (with more to come hopefully). I'm still wrapping my head around the xmlvm style of doing things and I've come to a bit of a roadblock. The library I'm porting uses pointers to classes extensively. Right now I'm unable to use, for example, a function that returns a pointer to a class: MyClass *mc = getMyClass(); Actually returning the class works fine but if I do it like this the generated code is an XMLVM::Object_Ptr<java::lang::Object> not a MyClass pointer. I've poked around the objc iPhone stuff to see if I could find out how to do this and I see things like this: _op1.o = [((org_xmlvm_iphone_UIScreen*) _stack[_sp].o) applicationFrame]; where _op1 is an XMLVMElem that's being treated as an id. It seems like I could do something similar with pointers in C++ but I'm not sure where to go to implement this. Hopefully I've made some sense - any push is the right direction is greatly appreciated. Thanks, Tom |