有什么办法让Eclipse自动实现纯虚函数吗?

发布于 2024-12-29 16:34:32 字数 94 浏览 4 评论 0原文

我用纯虚方法声明一些类,并让一些类派生它。 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

吃兔兔 2025-01-05 16:34:32

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.

幽蝶幻影 2025-01-05 16:34:32

根据您的积极性,可以为 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文