Re: /bzr/squid3/trunk/ r9573: SourceLayout: acl/, take 1

From: Robert Collins <robertc_at_squid-cache.org>
Date: Mon, 16 Mar 2009 16:13:24 +1100

On Sun, 2009-03-15 at 22:35 -0600, Alex Rousskov wrote:
> On 03/15/2009 08:31 PM, Robert Collins wrote:
> > I don't think that a pure virtual approach will work any
> > better because the same not-directly-listed result will occur.
> >
> The virtual method should be called directly or indirectly by some
> high-level user for the approach to work. Something like name() or
> description() may work well for this purpose because it can be called by
> the registry on behalf of the high-level user to "describe all
> registered things".
>
> Compared to self-registration code, the difference is that, in this
> case, the code in the object file is needed by the caller because it
> implements a virtual method. The method does not have to be declared
> pure, but it helps with forcing classes to define it and get linked.
> That is my understanding anyway. If there are no objections, I will
> implement and test it.
>
> $0.02,

Unless the registry has a concordance of subclasses, I would expect this
to fail too, because the static linker will not see any concrete types.
It may fail with 'cannot link', but it won't know *which* concrete type
to bring in [unless the registry has a static list - which is the whole
thing we're trying to avoid.]

--whole-archive makes sense to me (if the other scheme you try fails -
if it works, great).

I thought that name() and other methods on ACL already existed as pure
virtual though?

-Rob

Received on Mon Mar 16 2009 - 05:15:18 MDT

This archive was generated by hypermail 2.2.0 : Mon Mar 16 2009 - 12:00:03 MDT