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
 Feature Requests
 Renaming Class - Copy Constructor
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

inline
New Member

2 Posts

Posted - Jul 09 2007 :  06:31:05 AM  Show Profile  Reply with Quote
Hi there,

I am using VS2005 and VAX Build 1557.

If I am renaming a class I get this little bug:


class MyClass
{
public:
	MyClass();
	~MyClass();
	
private:
   MyClass& operator=(const MyClass&);
};


I am renaming "MyClass" in "YourClass" and get the following:


class YourClass
{
public:
	YourClass();
	~YourClass();
	
private:
   YourClass& operator=(const MyClass&);
};


Everything is renamed correctly but the parameter of my copy constructor.


Keep up the good work.

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Jul 09 2007 :  08:56:52 AM  Show Profile  Reply with Quote
This happens because there is no parameter name. Change the copy constructor to be:

   YourClass& operator=(const MyClass& rhs);


and VA will correctly find and rename all instances of the class name.

case=3027

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

inline
New Member

2 Posts

Posted - Jul 12 2007 :  04:06:17 AM  Show Profile  Reply with Quote
Ah yes, you are right. It works if I have a parameter name.

But because I want to declare the copy constructor as private to prevent copies it would not need a name :)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Jul 12 2007 :  06:58:01 AM  Show Profile  Reply with Quote
That's fair This is a known bug, and is on our list of bugs to fix. case=3027 is the number of this particular bug, something that I don't always explain since most of the forum regulars are familiar with this, and used to it.

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

sl@sh
Tomato Guru

Switzerland
204 Posts

Posted - Jul 13 2007 :  03:08:01 AM  Show Profile  Reply with Quote
*sigh* I'd wish my UML tool already took the possibility of 'copy protection constructors' into consideration. As it is, it inserts a dummy parameter name even if I don't supply one in the UML model

But then again, this leads to VAX handling those constructors correctly
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