4 ms·
What leads you to believe that protocol class + concrete implementations + factory can replace pimpls? I'm going to make it simple for you: take a Qt widget. Y
by rewmie 3y ago
What leads you to believe that protocol class + concrete implementations + factory can replace pimpls?
I'm going to make it simple for you: take a Qt widget. You define its widget layout with Qt a designer, save a UI form file, and get Qt's UIC to generate a header file that implements that widget tree. You have three options to include the object in that header: either inherit from it, composition, and pimpl. So you swore off a pimpl. Pray tell, how do you use a Pure virtual interface in this case?
- wiseowise 3y ago> What leads you to believe that protocol class + concrete implementations + factory can replace pimpls? What leads you to believe they can’t? > I'm going to make it simple for you: take a Qt widget. You define its widget layout with Qt a designer, save a UI form file, and get Qt's UIC to generate a header file that implements that widget tree. You have three options to include the object in that header: either inherit from it, composition, and pimpl. So you swore off a pimpl. Pray tell, how do you use a Pure virtual interface in this case? Never worked with Qt. Can you give me FooBar example where pimpl is superior to pure abstract class, please?