I declare some class with pure virtual methods and make some classes derive it. Is there any way in Eclipse CDT to locate the pure virtual functions of the parent class and auto complete the declaration of the children class, just like in the java development? Having to go back and forth copying and pasting those functions is getting tiresome
Any way to make Eclipse auto implement pure virtual functions?
Asked Answered
This feature is asked for Eclipse but still there is no Implementation in any upcoming CDTs. I think you will have to deal with that yourself.
Depending on how motivated you are, it is possible to create your own wizard for eclipse
http://www.vogella.com/tutorials/EclipseWizards/article.html
Here is a way to install your wizard when you're done http://wiki.eclipse.org/FAQ_How_do_I_add_my_wizard_to_the_New,_Import,_or_Export_menu_categories%3F
If this is a bit too ambitious, another option would be to have an external tool (a script/batch file) that can launch, get the name of the interface/pure virtual methods/storage specifier and generate code for you.
© 2022 - 2024 — McMap. All rights reserved.