Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Renaming of complex methods

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 - May 27 2008 : 08:06:47 AM
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...
4   L A T E S T    R E P L I E S    (Newest First)
feline Posted - May 28 2008 : 08:46:53 AM
*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.
andre.horst Posted - May 28 2008 : 03:27:18 AM
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...
feline Posted - May 27 2008 : 11:11:39 AM
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.
andre.horst Posted - May 27 2008 : 08:34:10 AM
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 >".

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