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
 Technical Support
 'struct' redefined
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Baga
Tomato Guru

122 Posts

Posted - Jan 20 2004 :  2:42:31 PM  Show Profile
In our code in order to decrease executable size we have following:

#define MyInterface struct __declspec ( novtable )

then you can declare your pure virtual class (interface) as:

MyInterface IDontKnow : public IUnknown
{
    virtual void ShutUp()=0;
};

Unfortunately, this causes VA (1106 and now 1213) not to recognize IDontKnow - it underlines it as typo and refuses to Alt+G

Is it hopeless? Maybe some workaround? Any way to teach parser that 'MyInterface' is equivalent of 'struct'?

support
Whole Tomato Software

5566 Posts

Posted - Jan 20 2004 :  3:08:39 PM  Show Profile
Add your #define to stdafx.h in the Misc subdirectory of the VA X installation directory. Place it in the section on macro overrides.

Press Rebuild on the Performance node of our options dialog and restart your IDE.

Whole Tomato Software, Inc.
Go to Top of Page

Baga
Tomato Guru

122 Posts

Posted - Jan 21 2004 :  01:29:33 AM  Show Profile
It worked! Thanks! This was one of major annoyances...

One thing - now when i press Alt+G on MyInterface, first file listed is the popup is "c:\\Program Files\\Visual Assist X\\Misc\\StdAfx.h". I thought this file should be excluded...

Edited by - Baga on Jan 21 2004 01:40:50 AM
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Jan 21 2004 :  2:10:42 PM  Show Profile
I think we'll call this a feature. VA X is telling you what it knows and from where it obtained the information.

Your #define was fairly innocuous. Another in our stdafx.h might not be so clean and the user ought to know what VA X knows.

Nonetheless, we will review our policy.

Whole Tomato Software, Inc.
Go to Top of Page

Baga
Tomato Guru

122 Posts

Posted - Jan 23 2004 :  03:02:31 AM  Show Profile
Well, i would vote for excluding this file. Reason is that i am actually interested in what is known to compiler, not VA. Putting my define in VA's stdafx.h is kind of hack... I mean, if i don't include my .H file where i actually do #define - it will not compile. Hitting Alt+G on MyInterface will direct me to VA's stdafx.h file, which is confusing. if i put that line into VA's stdafx.h myself, i know what's happening, but if i share modified file with colleagues they will have no clue. Weak-spirited may actually try to include that file...
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000