Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 CreateImplementation does no macro evaluation

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

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

Forum code is on.
Html is off.

Check to subscribe to this topic.

T O P I C    R E V I E W
Frunobulax Posted - Nov 13 2007 : 07:54:36 AM
1614/C++ in VS2005 SP1


if I declare
#define override OVERRIDE

class myClass : public myBaseClass {
virtual void doSomething(void) OVERRIDE;

and call CreateImplementation, then the implementation will look like

void myClass::doSomething(void) OVERRIDE

If I use override instead of OVERRIDE then everything is fine. (We often use OVERRIDE because there was some doxygen problem with override.)

Regards, Thomas

4   L A T E S T    R E P L I E S    (Newest First)
support Posted - Aug 09 2012 : 01:44:27 AM
case=49162 replaces case=1092 and is implemented in build 1912
feline Posted - Nov 17 2007 : 12:40:04 PM
We are considering allowing you to run Create Implementation on several functions at once:


It is a logical extension, and a popular idea

You can assign a keyboard shortcut to the command VAssistX.CreateImplementation via the IDE's keyboard options. Personally I trigger the refactoring via Alt-X, R and then use the letter for the command I want.

Or you could bind a keyboard shortcut to VAssistX.RefactorContextMenu

Getter / setter pair, just trigger the Encapsulate Field command:

Frunobulax Posted - Nov 17 2007 : 08:12:29 AM
I doubt that "#define OVERRIDE" override is a good idea, since there is at some point "#define override OVERRIDE" in the previous code :-)

But I see your point. It's no big issue anyway.

BTW, is there a way to create multiple implementations at once? I'm certainly not the only one wo creates a signature with a number functions and needs implementations for all of them. It would also be convenient if I had a shortcut for "create implemtation", grabbing the mouse takes time.

And while we're at it, it would be nice to create a setter/getter pair for a protected or private member variable (as Eclipse does) :-)

Regards, Thomas
feline Posted - Nov 13 2007 : 08:56:51 AM
The problem here is that VA, and Create Implementation in particular, does not know what to do with OVERRIDE. In this specific example it is clear, but consider the code:

#ifdef UNIX
#define OVERRIDE override
#elif WIN32
#define OVERRIDE
#define OVERRIDE // my custom clever macro code here

class myClass : public myBaseClass {
    virtual void doSomething(void) OVERRIDE;

you could try adding:

#define OVERRIDE override

at the bottom of VA's "StdAfx.h" file as explained in this FAQ entry:


This file is used to help VA's parser with difficult code, and can be used to work around odd effects. After modifying this file you need to rebuild the VA symbol database for the changes to take effect:

VA Options -> Performance -> General -> Rebuild symbol databases

Note I have not actually tried this here, so I am not sure if it will help or not in this situation.

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