![]() |
Tedious headers
I haven't seen a way in Visual C++ 2005 to stub members defined in headers or synchronize changes between header and source (like changing return type or adding a parameter). Surely there is a way to automate this. Why should I have to waste time copying things between files? I must be missing something.
Perhaps Eclipse or some other sane IDE can do this? |
Anyone? This redundancy is killing me.
|
I didn't answer before because I wasn't sure what you're getting at. Are you asking for a feature of your development environment, so that when you change the declaration of a function in a header it magically updates the implementation of the function to match the declaration? And vice versa?
If so, I've yet to come across an IDE that does this for arbitrary code (as that would mean the editor would need to separately keep track of the relationship between a declaration in a header and the implementation in a source file). For some specialised IDEs (eg graphical "drag and drop" GUI designers) it happens with the code that the IDE automatically generates. That only works because the developer is prevented (or strongly discouraged) from hand-modifying the parts of the code that are automatically generated by the IDE. |
I just installed Refactor!
This is a free version of their full product, but it supports variable and member renames as well as many other nice refactoring features. I haven't used it much yet, but it looks like it works pretty well. I'm not sure it does adding a parameter or changing return type though. PS. I saw it on the Start Page of Visual Studio, so that damn thing is useful sometimes. |
I use a tool called StarUML to generate the member bodies for my classes. Has been pretty tidy for what I need. Also adds inclusion guards which Visual Studio doesn't seem to be able to do. Though Admittidly, I gave up trying to look through the waffle produced by a google search.
Another cool thing about this tool I found is that it can reverse engineer existing code bases. Oh and it can also do the same with C# and Java languages. I guess one draw back is that it will be annoying to have to include the files into your C++ IDE manually. That said however, you'd be implementing some good engineering practices using uml. linky: http://staruml.sourceforge.net/en/ |
| All times are GMT -5. The time now is 3:08 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC