Re: Registries [2]

David Abrahams <[email protected]>
Newsgroups gmane.comp.lib.boost.langbinding
Message-ID <[email protected]>
Daniel Wallin <[email protected]> writes:

> At 15:12 2003-07-31, David Abrahams wrote:
>>Daniel Wallin <[email protected]> writes:
>>
>> > At 03:08 2003-07-31, David Abrahams wrote:
>> >>Daniel Wallin <[email protected]> writes:
>> >>
>> >> > At 00:25 2003-07-31, David Abrahams wrote:
>> >> >
>> >> >>This seems to me to be the killer argument against having any implicit
>> >> >>imports of from-xxx converters.  No?
>> >> >
>> >> > Well, yeah.. Unfortunately the same argument applies to the
>> >> > cast-graph too.
>> >>
>> >>:(
>> >
>> > But we can still share the code though, right?
>>
>>Sure.
>>
>> > I already made the local registry into a singleton, so we'd just do
>> > the same for the inheritance-code and link registry<T>::instance()
>> > and inheritance_graph::instance() statically.
>>
>>And how would two extensions share a cast-graph?
>
> They wouldn't. 

That would be bad.  You need to be able to write derived classes in
different extensions from the base.

> Perhaps it would be possible to share subgraph's without duplicating
> the data, but I don't know.
>
> Or did you mean how it would be related to importing? In that case I
> guess we'd just import all reachable vertices from the vertex
> associated with the imported type..

Hmm, you're suggesting importing cast graph components?  I don't know;
it seems like a waste for several extensions which are known to
collaborate to have to each maintain a separate copy of the cast
graph.  I think we can do better.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.