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
 Renaming of complex methods
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

andre.horst
Tomato Guru

Germany
150 Posts

Posted - May 27 2008 :  08:06:47 AM  Show Profile  Reply with Quote
VAX isnt able to rename complex methods, especially template methods with function/method pointers as arguments, f.e.

template< class T_OBJ > void DoSomething( void ( *p_fp )( TAnyTemplClass< T_OBJ >& ) )

Renaming "DoSomething" to "DoSomethingElse" doesnt work properly. Not all references to this method could be found. I.g. VAX to seem have problems with such complex constructs or with template inheritence, where the base interface is given with the declaration of a variable.

By the way: The given example of the method is in such a template class, so the complete example should look like:

class CMyBase
{
} ;

template< class T > CMyClass
{
public:
template< class T_OBJ > void DoSomething( void ( *p_fp )( TAnyTemplClass< T_OBJ >& ) )
{
}
} ;

template< class T > CMySub : public T
{
void MyMethod( TAnyTemplClass< CAnyOtherClass >& p ){}

// somewhere...
DoSomething( &CMySub::MyMethod ) ;
}

I am using lates beta release (but i think its a general problem), WinXP SP3, MSVC6, any other addins disabled.


Good luck...

andre.horst
Tomato Guru

Germany
150 Posts

Posted - May 27 2008 :  08:34:10 AM  Show Profile  Reply with Quote
Hum...i am seeing actually, there are some things missing...sorry
template< class T > CMyClass --> template< class T > CMyClass : public T
template< class T > CMySub : public T --> template< class T > CMySub : public CMyClass< T >

But the missing inheritance should not be very relevant. And the call of DoSomething is in a method. Instantiation of CMySub is "CMySub< CMyBase >".
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - May 27 2008 :  11:11:39 AM  Show Profile  Reply with Quote
Its not just VA that is confused. I tried to put your two posts together, and the code I ended up with has some serious colouring problems, obviously VA does not understand it. So I deleted most of it, leaving me with just:

class CMyBase
{
};

template< class T > CMyClass : public T
{
public:
};

and this does not compile, I am getting a nice long list of errors.

zen is the art of being at one with the two'ness
Go to Top of Page

andre.horst
Tomato Guru

Germany
150 Posts

Posted - May 28 2008 :  03:27:18 AM  Show Profile  Reply with Quote
Ok. Your example is wrong. The "class" keyword is missing in the declaration, as i forgot in all declarations.

But vax is now able to find all the referencecs. Seems like vax needs just longer to resolve the symbols and references than usually. After 15 mins as i posted the new topic i restarted my computer and tested it again and it worked. Sorry for the circumstances...
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - May 28 2008 :  08:46:53 AM  Show Profile  Reply with Quote
*ah* I see the problem now, it is obvious when you point it out.

I am not sure why you had to wait for a while before VA worked out what was going on here, but some complex template code does take VA quite a while to properly evaluate. I am glad this is now working for you.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000