Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #10495

Re: Cannot access protected from base class?

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!weretis.net!feeder1.news.weretis.net!news1.tnib.de!feed.news.tnib.de!news.tnib.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Ian Collins <ian-news@hotmail.com>
Newsgroups comp.lang.c++
Subject Re: Cannot access protected from base class?
Date Mon, 26 Sep 2011 15:05:18 +1300
Lines 35
Message-ID <9ea4uuFd1oU1@mid.individual.net> (permalink)
References <316d56c3-c003-48c5-a75f-6f9128194d92@i4g2000vbc.googlegroups.com> <j5lrp1$f9n$1@dont-email.me> <6c3103ee-946b-4458-a1df-0c1054658650@m15g2000vbk.googlegroups.com> <j5m8ok$c8l$1@dont-email.me> <1a4dae1a-04b5-4fce-ac30-edb1694c3b94@hd1g2000vbb.googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net 24dbz+kr/P3ScQzo2DXgigKb8i5txgGIJHUWCu2KfZMmY2BgO9
Cancel-Lock sha1:uRCf6yyRAEzK0wzgycfbR/ZHMwI=
User-Agent Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.2.9) Gecko/20101021 Lightning/1.0b2 Thunderbird/3.1.4
In-Reply-To <1a4dae1a-04b5-4fce-ac30-edb1694c3b94@hd1g2000vbb.googlegroups.com>
Xref x330-a1.tempe.blueboxinc.net comp.lang.c++:10495

Show key headers only | View raw


On 09/26/11 12:18 PM, Nephi Immortal wrote:
> On Sep 24, 10:56 pm, Richard Damon<news.x.richardda...@xoxy.net>
> wrote:
>> On 9/24/11 8:24 PM, Nephi Immortal wrote:
>>
>>> I understand, but I wonder if large number of base classes violate
>>> rule and needs to make sure if more memory is sufficient.
>>
>> A large number of base classes do not violate an inherent rule in C++.
>> You will likely end up with a large object, as it needs to store all the
>> base class members within it. It is possible that this may cause you to
>> run out of memory, it somewhat depends on how many copies of this object
>> are created.
>>
>> I do think it is a sign of a problematical design.- Hide quoted text -
>>
>> - Show quoted text -
>
> 	I am aware of design flaw, but careful design is better.  Large
> number of base classes into one derived class is the option to replace
> virtual functions because of the performance issue and template is not
> the option unless you want pointer to member function array.

What sort of a performance issue have you measured?

What makes templates unsuitable?  I don't understand the context of 
"unless you want pointer to member function array".

> 	If you think that it is design flaw, please demonstrate another
> option.

Exactly what problem are you trying to solve?

-- 
Ian Collins

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Cannot access protected from base class? Nephi Immortal <immortalnephi@gmail.com> - 2011-09-24 14:03 -0700
  Re: Cannot access protected from base class? Richard Damon <news.x.richarddamon@xoxy.net> - 2011-09-24 20:14 -0400
    Re: Cannot access protected from base class? Nephi Immortal <immortalnephi@gmail.com> - 2011-09-24 17:24 -0700
      Re: Cannot access protected from base class? Richard Damon <news.x.richarddamon@xoxy.net> - 2011-09-24 23:56 -0400
        Re: Cannot access protected from base class? Nephi Immortal <immortalnephi@gmail.com> - 2011-09-25 16:18 -0700
          Re: Cannot access protected from base class? Ian Collins <ian-news@hotmail.com> - 2011-09-26 15:05 +1300
          Re: Cannot access protected from base class? Richard Damon <news.x.richarddamon@xoxy.net> - 2011-09-25 22:38 -0400
            Re: Cannot access protected from base class? Nephi Immortal <immortalnephi@gmail.com> - 2011-09-25 20:42 -0700
              Re: Cannot access protected from base class? Richard Damon <news.x.richarddamon@xoxy.net> - 2011-09-26 00:20 -0400

csiph-web