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
 How about a bulk encapsulate
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mcaron
New Member

4 Posts

Posted - Sep 17 2009 :  08:41:57 AM  Show Profile  Reply with Quote
It would be nice to be able to select a bunch of member variables at once and have the encapsulation done on each of them. Just me being greedy but it would be handy to have the Get* functions and the Set* functions all grouped together too. Select the lines you want to encapsulate int bar1 through float bar3 in the example below:

class foo
{
int bar1;
char bar2;
float bar3;
}

the select encapsultate to get this:

class foo
{
inline int GetBar1() const { return bar1; }
inline char GetBar2() const { return bar2; }
inline float GetBar3() const { return bar3; }

inline void SetBar1(const int val) { bar1 = val; }
inline void SetBar2(const char val) { bar2 = val; }
inline void SetBar3(const float val) { bar3 = val; }

int bar1;
char bar2;
float bar3;
}

It would be nice for "fixing" code written without encapsulation.

-Mike

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Sep 17 2009 :  12:26:37 PM  Show Profile  Reply with Quote
We are considering allowing you to select several items in VA Outline and trigger a VA refactoring commands on all of them in one go, which would allow you to use Encapsulate Field on several members at once.

case=7787

The grouping of the Get and Set methods, this is going to be something some people like and others dislike. Personally I tend to keep the pairs together, so I can see what is being done to the variable in one place.

VA Outline makes it easy to reorder the class via drag and drop.

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

mcaron
New Member

4 Posts

Posted - Sep 17 2009 :  12:34:37 PM  Show Profile  Reply with Quote
I used to use VA a long time ago and stopped using it because it had gotten so slow on my development system. After having been away from it for a few years and coming back I'm pleased to see that all the old functionality is still there and there are tons of new things. The VA Outline feature is a good example. I'll have to look into using that to group my accessors and mutators.

Thanks for the tip,
Mike
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Sep 17 2009 :  1:51:00 PM  Show Profile  Reply with Quote
I hope you are not suffering any performance problems now with VA. We work hard to try and make sure it runs quickly, so does not slow your machine down to much.

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

mcaron
New Member

4 Posts

Posted - Sep 17 2009 :  2:03:57 PM  Show Profile  Reply with Quote
No I'm actually quite happy with how it is all running. I've got to wrap my head around some of the new functionality, but I've already used to to refactor code and simplify things all over the place. Renaming and the ability to turn a block into a function have been HUGE hits with me and the guys I work with.

-Mike
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