Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Alt+G and virtual classes

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
dreijer Posted - Jan 03 2008 : 06:43:18 AM
Just a quick question regarding the (mostly) awesome Alt+G feature:
Say I have a C++ base class and a derived class that overrides one of the base class's methods. I then instantiate an object of the derived class and store it in a pointer to the base class, e.g.:

Bar someBar;
Foo* pFoo = &someBar; // Bar is derived from Foo

Now, say I call the overridden method. If I use the Alt+G feature of VAX on the method call it takes me straight to the base class. Most often, this is NOT what I want since base classes are either abstract or only contain little of the actual implementation. If I use the built-in VS2008 IntelliSense on the overridden method, I get a list of classes that override the method and I can therefore select which one I want. Why don't VAX?

Thanks for a great product. I'm addicted!
8   L A T E S T    R E P L I E S    (Newest First)
AstaDan Posted - Sep 10 2009 : 09:46:20 AM
I'll give that a try, thanks.
feline Posted - Sep 10 2009 : 09:44:31 AM
For now you might find the Hovering Class Browser, the bottom part of VA View helpful:

http://www.wholetomato.com/products/features/hcb.asp

since this will show you a class and its base classes, allowing you to look for and jump to the desired form of the virtual function.
AstaDan Posted - Sep 10 2009 : 09:33:29 AM
I too could really use this functionality. I keep having to resort to attempting to use Microsoft's intellisense to go to the definitions of virtual functions.
dreijer Posted - Jan 06 2008 : 1:09:31 PM
Yeah, that's exactly what I was looking for. Cheers!
feline Posted - Jan 04 2008 : 12:20:49 PM
We are considering something like this, perhaps done via a form of Find References. For a larger class hierarchy there may be several implementations of a given virtual function, in different derived classes:

case=6647
willdean Posted - Jan 04 2008 : 05:30:31 AM

Can I add a vote for something in this area, too, though I'm not exactly sure what. As the OP says, the base-class is rarely the place I want to go, and a list of derived-class candidates would be more useful.
dreijer Posted - Jan 03 2008 : 3:53:54 PM
quote:
Originally posted by feline

Are you calling the method on a variable of the base class type? Or are you calling it on a variable of the derived class type?

Yes, I am calling the method on a variable of the base class type. I am fully aware that you cannot deduce the actual type of the pointer at compile-time; what I was merely hinting was that instead of just assuming that I'm interested in the base class (which I rarely am), I should instead be presented with a list of possible classes that implement the base class's methods. I guess I could just use the built-in Go To Definition feature of Visual Studio for now, it's just that I've gotten so used to using Alt+G that I keep forgetting that VAX just blindly jumps to the base class.
feline Posted - Jan 03 2008 : 2:08:18 PM
Are you calling the method on a variable of the base class type? Or are you calling it on a variable of the derived class type?

In general, without actually compiling and running the program, there is no way to work out what type a pointer to the base class type is actually holding. To a fair degree this is actually the point of virtual methods

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000