有什么办法让Eclipse自动实现纯虚函数吗?
我用纯虚方法声明一些类,并让一些类派生它。 Eclipse CDT中有没有办法像java开发一样定位父类的纯虚函数并自动完成子类的声明?不得不来回复制和粘贴这些功能变得很烦人
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Eclipse 要求提供此功能,但在任何即将推出的 CDT 中仍然没有实现。我认为你必须自己处理这个问题。
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.
根据您的积极性,可以为 Eclipse 创建您自己的向导
http:// www.vogella.com/tutorials/EclipseWizards/article.html
这是完成后安装向导的方法
http://wiki.eclipse.org/FAQ_How_do_I_add_my_wizard_to_the_New,_Import,_or_Export_menu_categories%3F
如果这是有点太雄心勃勃,另一种选择是拥有一个可以启动的外部工具(脚本/批处理文件),获取接口/纯虚拟方法/存储说明符的名称并为您生成代码。
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.