Re: Re: Registries [2]

Daniel Wallin <[email protected]>
Newsgroups gmane.comp.lib.boost.langbinding
Message-ID <[email protected]>
At 16:26 2003-07-28, David Abrahams wrote:
>Daniel Wallin <[email protected]> writes:
>
> > At 01:10 2003-07-28, David Abrahams wrote:
> >>Err, I think you mean "extensions not associated with a module which
> >>place their definitions into the global namespace", right?  What is a
> >>module, after all, if not a namespace?
> >
> > No actually I meant what I wrote. :) I was talking about the 'module'
> > type in luabind, which is only a top-level alias for namespace_.
> >
> >     module(L)
> >     [
> >        def("f", &f)
> >     ];
> >
> > This places "f" in the global namespace. So what I'm saying is that
> > we can't use the name passed to module() as an identifier.
>
>OK.  What's 'L'?

Heh, for some reason it's the standard name used for the lua_State pointer.

> >> > I think I would like to keep the extension identifier separate from
> >> > the identifiers the user may or may not use for their modules.
> >>
> >>Fine, we can do that in the core if you really perceive an advantage
> >>(though I question whether the flexibility is worth the complication).
> >>It would seem perverse for the Python layer to do anything other than
> >>lock the name of an extension to the name of its module.
> >
> > Ok. So in BPL the central registry could associate the extensions with
> > all the names of the modules it defines, right?
>
>No, just the one top-level module it defines.  Every extension has an
>entry point called extern "C" void init<module-name>() which is used
>to do initialization.  It's <module-name> that counts.

Ah ok.

I've started some work on the registry. Basically I have made templates
from the registry code and started on the central registry. I've organized 
it like
this:

   boost/langbinding/registry.hpp
   boost/langbinding/impl/registry.hpp

The implementation files are to be included in cpp files for luabind/bpl where
the templates they contain are explicitly instantiated.

Shall I check this in?

BTW. I noticed that my replies are out of thread on gmane, if anyone has any
idea on what I can do to fix this I'd be grateful.

---
Daniel Wallin



-------------------------------------------------------
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.