Any cross platform way to build cpp skeleton from a header? [duplicate]
I'm tired of copy pasting the header into my cpp file then hacking at it until its in the correct form. Has anyone made a program to read a he开发者_开发百科ader file and make a corresponding cpp skeleton? I need something that is cross platform or bare minimum works on Linux. A vim plugin would also be acceptable.
Example
class A
{
public:
int DoSomething( int number );
}
Would produce the following file
int A::DoSomething( int number )
{
;
}
http://www.vim.org/scripts/script.php?script_id=2624
You can try to play around with LazyCplusplus. Or you can try out Visual Assist X for Visual Studio.
Instead of strinking C++ from the records, I'd rather wait for C++ promised modules. :)
Edit : actually this seems a duplicate of your question : Seeking code stub generator (from header files)
Almost every IDE has built-in features or plugins that do that for you - e.g. for Visual Studio Visual Assist X provides many convenience features.
There are also many code generation utilities, you could also create one use yourself using e.g. gcc-xml and the scripting language of your choice.
精彩评论