Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1532: Change Signiture on Overloaded Functions

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
BrianCBecker Posted - Aug 19 2006 : 5:02:50 PM
Hi,

I noticed that VA doesn't seem to support changing the signitures of overloaded functions. I did a quick search on the forums and didn't see anything about it, so here goes:

Let's say you have this class:

class Test123
{
void calculate(double a1);
int calculate(double a1, int b0);
};

I want to change the signiture of the second calculate to this:

class Test123
{
void calculate(double a1);
int calculate(double a1, int b0 = 0);
};


If I click "Change signiture" on the second calculate function, I get this window:



Which contains the signiture of the first calculate function. If I try to put in the signiture I want:

int calculate(double a1, int b0 = 0);

I get:

class Test123
{
int calculate(double a1, int b0 = 0);
int Test123::calculate(double a1, int b0 /*= 0*/)
};

Definitely not what I want.

Info is as follows:

VA_X.dll file version 10.3.1532.0 built 2006.08.10
VAOpsWin.dll version 1.3.3.6
VATE.dll version 1.0.5.8
DevEnv.exe version 8.0.50727.42
msenv.dll version 8.0.50727.42
Font: Courier New 12(Pixels)
Comctl32.dll version 6.0.2900.2180
Windows XP 5.1 Build 2600 Service Pack 2
Single processor

Platform: Win32
Stable Includes:
C:\\Program Files\\Microsoft DirectX SDK (April 2006)\\Include;
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\include;
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\include;
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\PlatformSDK\\include;
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\PlatformSDK\\common\\include;
C:\\Program Files\\Microsoft Visual Studio 8\\SDK\\v2.0\\include;
C:\\Program Files\\wxWidgets-2.6.3\\include;
C:\\MATLAB6p5\\extern\\include;
C:\\Program Files\\wxWidgets-2.6.3\\include\\msvc;
C:\\Program Files\\Microsoft Platform SDK\\Include;
C:\\Program Files\\Microsoft Platform SDK\\Samples\\Multimedia\\DirectShow\\Common;
C:\\Program Files\\Microsoft Platform SDK\\Samples\\Multimedia\\DirectShow\\BaseClasses;
C:\\Program Files\\wxWidgets-2.6.3\\contrib\\include;
C:\\Program Files\\WMSDK\\WMFSDK95\\include;
C:\\Downloads\\jit\\froofyjit-0.20.tar\\froofyjit;
C:\\Downloads\\jit\\lightning-1.2.tar\\lightning-1.2;

Library Includes:
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\mfc;
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\atl;
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\crt\\src;

Other Includes:



Thanks!

Sincerely,
Brian C. Becker @ www.BrianCBecker.com
3   L A T E S T    R E P L I E S    (Newest First)
jpizzi Posted - Aug 21 2006 : 10:56:20 PM
Just as a side note, I don't believe your code will work. You have created two functions that are overloaded only on return type, since the second parameter is optional.
feline Posted - Aug 20 2006 : 4:41:50 PM
currently this is a known limitation. VA does not currently "know" which overload you are talking about, and cannot reliably find both its definition and implementation. you will get the same problem with alt-g, where VA asks you which item you want.

we are hoping to handle this eventually, but i am not sure when this will happen.

i have added a case for this, to make it a bit easier to track this.

case=2164
BrianCBecker Posted - Aug 19 2006 : 5:25:54 PM
Hi,

Correction to previous post: Because I forgot a semi-colon at the end of the second calculate function, the change signiture results are different, but still wrong:

class Test123
{
int calculate(double a1, int b0 = 0);
int calculate(double a1, int b0);
};

Notice that the first calculate function has been changed, not the first.

Sincerely,
Brian C. Becker @ www.BrianCBecker.com

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