Answer the question
In order to leave comments, you need to log in
C++ (Qt) plugins. Pimpl. How to leave a public .h file to hide the class implementation from plugins?
Greetings.
The program uses a plug-in system with interaction through a signal/slot, i.e. I can pass QObject * if necessary.
Now we need a subject.
Those. plugins can include the .h class file, I would like the class implementation (.cpp) to remain unknown for them, since it may change in the future.
Those. simply passing a reference to a class is naturally not suitable.
I am familiar with pimpl, but I can’t adapt it for plugins, and I don’t think it’s quite suitable.
Or will it fit? Is there a code example somewhere?
Or can someone tell me at least in what direction to move?
Or "Son, this is fantastic"?
Answer the question
In order to leave comments, you need to log in
Made.
In a class, function calls go through a wrapper that calls a function pointer.
header:
DB& Exec() { return (this->*exec)(); }
DB& (DB::*exec)()= &DB::_Exec;
DB& _Exec();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question