Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 "Move Implementation To Source File" suggestion
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Nobuseri
New Member

Canada
3 Posts

Posted - Dec 04 2006 :  4:47:14 PM  Show Profile  Reply with Quote
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.

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Dec 05 2006 :  07:07:15 AM  Show Profile  Reply with Quote
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

zen is the art of being at one with the two'ness
Go to Top of Page

Nobuseri
New Member

Canada
3 Posts

Posted - Dec 05 2006 :  08:37:02 AM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Dec 05 2006 :  09:25:43 AM  Show Profile  Reply with Quote
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

zen is the art of being at one with the two'ness
Go to Top of Page

Nobuseri
New Member

Canada
3 Posts

Posted - Dec 05 2006 :  09:36:04 AM  Show Profile  Reply with Quote
Yes I figured the comments would make things interesting.
Thanks for your quick and comprehensive responses
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000