I’m beginner in QNX/Photon.
I’m used to work with IDE such as VisualC++/MFC.
I have seen in Photon that C++ is useable (#ifdef _cpluscplus is mentionned …) : is it possible to set Photon in order to work in C++ and to generate, for example, some methods on C++ objects, instead of C callback with widget as first parameter ?
If it’s not possible, i’m afraid about structure of the software i have to build on Photon, only based upon callback : is there any typical software architecture on Photon environment (such as, for example, document/view in MFC …) ? have you got any advice about this problem ?
It’s my understanding that that C++ is only available for graphical/Photon stuff with third-party stuff like Kirilla. I don’t think PhAb can be persuaded to substitute callbacks for C++ alternatives, but there are more knowledgeable people here who can confirm that.
I’ve never developed on Windows, so cannot compare it with QNX, but I suppose what kind of structure you se use will depend on what you’re writing, you could still go for an OO style using structures and stuff, not the same, but OK.
You can use PhAB and C++ just fine actually. The only issue is that you have to use static members for the callbacks. I normally shove the “this” pointer into Pt_ARG_USER_DATA pull it out in the callback and invoke the class instance method.