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
 Suggestions list and members access
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kolobog007
Junior Member

Russia
12 Posts

Posted - Oct 02 2009 :  6:27:54 PM  Show Profile  Reply with Quote
Now after "." or "->" i see suggestions, sorted by alphabet without checking visibility. And i must click "Public Methods" to hide all unusable variants, when class dont have access to private or protected members another class. Can you add check, have this class access to private members another class, and if not - automatically use option "Public methods"?

Edited by - kolobog007 on Oct 02 2009 6:49:02 PM

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Oct 03 2009 :  12:28:01 PM  Show Profile  Reply with Quote
We are considering doing this, but there are some edge cases that make it tricky:

case=24551

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

znakeeye
Tomato Guru

379 Posts

Posted - Oct 12 2009 :  03:46:59 AM  Show Profile  Reply with Quote
And please don't forget special cases where this rule does not apply:

Foo::Foo(const Foo &rhs)
{
   m_protectedVar = rhs.m_protectedVar;
}

class Foo
{
   friend class Bar;
};

Bar::Test(const Foo &foo)
{
   cout << rhs.m_protectedVar;
}
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Oct 12 2009 :  3:28:12 PM  Show Profile  Reply with Quote
There are going to be quite a lot of edge cases where this might run into problems. Friend functions / classes are one of the main reasons I was reluctant about this feature request.

I am just waiting for someone to post saying they use macro's to introduce the friend keyword

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

znakeeye
Tomato Guru

379 Posts

Posted - Oct 13 2009 :  03:09:05 AM  Show Profile  Reply with Quote
Actually, a macro for friend+inheritance+template makes it possible to create singleton-classes quite elegantly.

I know I've seen several proposals on this. Beware! :P
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Oct 13 2009 :  1:11:57 PM  Show Profile  Reply with Quote
Basically it is always going to be possible to design code that compiles but that confuses our parser, since VA is not a compiler *sigh*

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