T O P I C R E V I E W |
Nobuseri |
Posted - Dec 04 2006 : 4:47:14 PM If this hasn't already been suggested, or implemented: It would be nice if the "Move Implementation To Soure File" feature would place the newly created function definition in the same order in the .cpp file as it is in the .h file, instead of at the end.
In the following example, running this feature on b() will cause the function definition order in the .cpp to be a, c, b, instead of a, b, c as in the header file. Therefore, the programmer has to do an extra step of moving it to the correct place.
example.h: ---------- class example { void a(); void b() {} // "Move Implementation To Source File" on this function void c(); };
example.cpp ------------ void example::a(){} void example::c(){} void example::b(){} // function inserted here
Also, it could be nice for this feature to be available for non-member functions. |
4 L A T E S T R E P L I E S (Newest First) |
Nobuseri |
Posted - Dec 05 2006 : 09:36:04 AM Yes I figured the comments would make things interesting. Thanks for your quick and comprehensive responses |
feline |
Posted - Dec 05 2006 : 09:25:43 AM It is unlikely we will try and offer reordering of the cpp file. One simple reason is "define a function". Sounds easy until people start putting comment blocks above, below, inside, etc a function. The comment blocks have meaning and need to be kept with the function, but they are not clearly defined.
We are thinking about some form of "where shall I put it" dialog to implement case=2161, which will cover your second point |
Nobuseri |
Posted - Dec 05 2006 : 08:37:02 AM ah, well then my next suggestions that were probably already made ;) are: - option to arrange all functions in the cpp to the same order as they are in the header (oh, thats probably riddled with complications) - give user choice as to where to insert it: - after the previous function in header, before the next, etc. |
feline |
Posted - Dec 05 2006 : 07:07:15 AM This is a fairly common request. It is complicated by the fact that the header and cpp file may not be in the same order currently, plus VA does not currently handle overloaded functions properly. Still, we have a couple of ideas
case=2161 |
|
|