hi all ?
I read the title “Integration photon project and C++ classes” below.
so I try doing this way. but have a few question for this way.
If static method cover functions is written, photon callback function must
create objects
to call static method cover function ,whenever phton callback function is
called.
I.E
photonCallback (Ptwidet_t *widget, ApInfo_t *apinfo, PtCallbackInfo *cbinfo)
{
// create object
Cmyclass myclass;
// call static method cover functions
myclass.fn_X_cover(&myclass);
}
class Cmyclass
{
public:
void fn_x(){
// cleate other objects
// or other functions
}
static void fn_X_cover(Cmyclass *mcPtr);
};
void fn_X_cover(Cmyclass *mcPtr)
{
mcPtr->fn_x();
}
- I wish to create myclass object outside callback funtion. before calling
photonCallback function. how to do ?
I can’t create myclass object in admain.cc becouse that admain.cc must
be generated by PhAB tool.
thank you
\