Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Implement Interface Refactor does not work on

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
andre.horst Posted - Apr 08 2011 : 04:22:08 AM
WinXP SP3, VC2008 SP1, Latest VAX.

The refactor "Implement Interface" does not work with template inheritance.

class CInterface
{
public:
	virtual InterfaceMethod() = 0 ;
} ;

template< class T_BASE > class CTemplate : public T_BASE
{
} ;

class CImplementation : public CTemplate< CInterface >
{
} ;

Place care on CTemplate or on CInterface in the inheritance declaration and try to choose "Implement Interface" from the refactor menu. No implementation suggestions for CTemplate and no menu entry for CInterface.
5   L A T E S T    R E P L I E S    (Newest First)
support Posted - Aug 09 2012 : 01:49:43 AM
case=52138 is implemented in build 1912
feline Posted - Apr 11 2011 : 11:04:27 AM
Currently Implement Virtual Methods only checks the immediate base class, it does not scan the base class of the base class. We are looking to add this feature:

case=52138

I think you are also seeing this limitation, based on this new sample code.
andre.horst Posted - Apr 11 2011 : 04:34:36 AM
Still have some problems to reproduce my real problem, but VAX does not offers virtual methods of CSuperInterface on CImplementation. Beside the different files I tried some macros, friend-decls and other stuff that could confused VAX, but it looks good. So maybe my real problem is the different files.

class CSuperInterface 
{
public:
	virtual void InterfaceMethod() const throw() = 0 ;
	virtual void SuperMethod() = 0 ; // Doe not show up in CImplementation
} ;

class CInterface : public CSuperInterface
{
public:
	CInterface():CSuperInterface(){}
	virtual void foo() = 0 ;
	virtual void bar() = 0 ;
} ;

template< class T_BASE > class CTemplate : public T_BASE
{
public:
	CTemplate():T_BASE(){}
	virtual void InterfaceMethod() const throw()
	{
	}
} ;

class CImplementation : public CTemplate< CInterface >
{
public:
	CImplementation():CTemplate(){}
	void test()
	{
	}
} ;
andre.horst Posted - Apr 11 2011 : 04:08:03 AM
Well, this is just a simplified example of ym "real" problem. If I placed caret on CImplementation in my "real" code I did not get any suggestions, not for CTemplate or CInterface. In my provided example i get the sugggestions.

The only difference I can see in short is that the classes and interfaces are in different files and some of them have additional virtual methods and/or "CTemplate" realizes some of "CInterface"s methods. So there seems to be an additional problem.
feline Posted - Apr 08 2011 : 2:51:24 PM
I am seeing the same effect here. Thank you for the clear description.

case=56625

In this case Implement Virtual Methods is working correctly for me when triggered on "CImplementation", which is something.

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