![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Troll
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4
![]() |
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?
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270 |
|
|
|
|
|
#2 |
|
Troll
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4
![]() |
Anyone? This redundancy is killing me.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270 |
|
|
|
|
|
#3 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,209
Rep Power: 5
![]() |
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. |
|
|
|
|
|
#4 |
|
Expert Programmer
Join Date: Jun 2005
Posts: 825
Rep Power: 4
![]() |
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. |
|
|
|
|
|
#5 |
|
Hobbyist Programmer
Join Date: Jan 2006
Location: UK
Posts: 214
Rep Power: 3
![]() |
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/ |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Premature end of script headers | amon | C++ | 13 | May 14th, 2005 6:58 AM |