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
 Arguments with class qualifier shown in Outline
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

lac
Senior Member

30 Posts

Posted - Apr 02 2013 :  07:17:32 AM  Show Profile  Reply with Quote
When method parameters have class qualifier, they are shown as class declarations in the VA Outline. For example:

void A::f(class C& c){}
void B::g(class D& d){}


This is shown like this in the VA outline:

[method] f(class C& c)
 [class] d
[method] g(class D& d)


Happens in both source files (method definitions) and header files (class declarations).

They are technically forward declarations, but the do mess up the the VA Outline, IMHO. Also; the class name shown is not correct, and doesn't show up, fx. if a class declaration follows:

void A::f(class C& c){}
class Q {};

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Apr 02 2013 :  8:44:46 PM  Show Profile  Reply with Quote
I am seeing the first problem, thank you for the clear example:

case=66673

Do you have a lot of code that does this? I don't think I have ever seen this done before.

The second problem, so far I am not able to reproduce it. I am using the following class in a C++ header file:

class simpleGeneralTestClass
{
	void forwardDeclareTypeOne(class ForwardOne ¶m);
	void forwardDeclareTypeTwo(class ForwardTwo ¶m);
};


and the following code in the matching .cpp file:

void simpleGeneralTestClass::forwardDeclareTypeOne( class ForwardOne ¶m ) { }

class testExtraClassBetweenMethods
{
	testExtraClassBetweenMethods();
	~testExtraClassBetweenMethods();
};

and VA outline is showing the cpp code correctly for me.

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

lac
Senior Member

30 Posts

Posted - Apr 03 2013 :  02:16:06 AM  Show Profile  Reply with Quote
Sorry I wasn't clear. The last was just an example that it doesn't happen in all cases. It appears that it depends on what follows the method declaration with the class-qualified argument. If another method definition/declaration follows, it shows it as a class declaration. If an actual class declaration follows, it is not shown.

It's probably not that common of a style in C++ code in general, but it's actually quite common in our code base, due to many interfaces like this:

class MessageHandler
{
public:
   void HandleMessage(Message&);
private;
   void HandleSpecificMessage1(class SpecificMessage1&);
   void HandleSpecificMessage2(class SpecificMessage2&);
   // ... 
   // 20+ handler methods like this
};


Putting the class-qualifier on the argument rather than list (and maintain) 20+ forward declarations has become de-facto style for us.

Edited by - lac on Apr 03 2013 02:16:24 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Apr 03 2013 :  1:45:03 PM  Show Profile  Reply with Quote
Ah, this makes sense now, thank you for the explanation. Also seeing this code sample explains why you are doing this, a sensible solution to this situation.

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

sean
Whole Tomato Software

USA
2817 Posts

Posted - Sep 24 2018 :  2:14:55 PM  Show Profile  Reply with Quote
case=66673 is fixed in build 2291
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