Visual studio宏 - 入门|将定义从.cpp复制到.h [英] Visual studio macro - getting started | copy a definition from .cpp to .h

查看:206
本文介绍了Visual studio宏 - 入门|将定义从.cpp复制到.h的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有可能做一个宏,将一个函数的定义复制到一个声明(也可能相反)?例如

Is it possible to do a macro that copies a definition of a function to a declaration(, and maybe also the opposite)? For instance

Foo::Foo(int aParameter, int bParameter){
    //
}

int Foo::someMethod(char aCharacter) const {
    return 0;  
}

.cpp文件将是:

class Foo {
    Foo(int aParameter, int bParameter);

    int someMethod(char aCharacter) const;
};

在.cpp文件中。

另外:

如果有人知道有良好的教程或文档的目标是Visual Studio .Net(也可能覆盖上述问题),我可能会接受,一个答案以及

If there are anyone with knowledge of good tutorials or documentation that aims at Visual Studio .Net (and maybe also covers the above problem) I would probably accept that as an answer as well

推荐答案

所以,我发现 Visual Studio的自动化和可扩展性,其中涵盖了我想做的东西,从对象浏览器和记录宏功能的一点帮助。

So, I found the Automation and Extensibility for Visual Studio, which covers the stuff I am trying to do, with a little help from the object browser and record macro function.

我想我应该可以从这里解决。

I guess I should be able to solve it from here.

这篇关于Visual studio宏 - 入门|将定义从.cpp复制到.h的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆