Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Arguments with class qualifier shown in Outline

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
lac Posted - Apr 02 2013 : 07:17:32 AM
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 {};
4   L A T E S T    R E P L I E S    (Newest First)
sean Posted - Sep 24 2018 : 2:14:55 PM
case=66673 is fixed in build 2291
feline Posted - Apr 03 2013 : 1:45:03 PM
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.
lac Posted - Apr 03 2013 : 02:16:06 AM
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.
feline Posted - Apr 02 2013 : 8:44:46 PM
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.

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