lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


you are right.
If you have the need to use namespaces right now I can show you how to
do it in a quick and dirty way. For a long term solution you'll have
to wait. The current generator code has become quite large and I'd
rather restructure it now before it becomes too complex also for me.

2009/1/20 Anders Backman <andersb@cs.umu.se>:
> Well in most cases for us, namespaces are crucial.
> For example a class named Vec3 can be found in multiple places in our
> framework (once in the SceneGraph and once in the Physics), but its just one
> place where it can pop up.
> So some kind of support of Namespaces would be nice...ideas?
> /Anders
>
> On Mon, Jan 19, 2009 at 10:45 PM, Mauro Iazzi <mauro.iazzi@gmail.com> wrote:
>>
>> 2009/1/18 Anders Backman <andersb@cs.umu.se>:
>> > Ok, great, one step further, at least one left:
>> > Now I added -i  ${BINDING_HEADER}/${BINDING_HEADER}
>> > Which generates:
>> >
>> > #ifndef LQT_HEAD_agxStream_LQT_EndOfArchiveException
>> > #define LQT_HEAD_agxStream_LQT_EndOfArchiveException
>> > #include "lqt_common.hpp"
>> > #include "libname/libname" <<<<
>> > #include "lqt_qt.hpp"
>>
>> I assume this is the behaviour you wanted, correct?
>>
>> > // But then this libname depends on another namespace which is then
>> > tried to
>> > be included with:
>> > #include <otherlib>
>> > // which is not correct. Not quite sure where this comes from...
>> > // Either it should not be there at all, or it should be
>> > <otherlib/otherlib>
>> > class LQT_EXPORT lqt_shell_otherlib_LQT_EndOfArchiveException : public
>> > agxStream::EndOfArchiveException {
>> >
>> > /Anders
>>
>> I think this comes from a trick we added to speed up compilation of Qt
>> bindings. Instead of including the original header, the class includes
>> an header containing the name of the class. It works for Qt. I'll add
>> a switch to turn off this behaviour.
>>
>> Namespaces are not considered. I don't even know how lqt behaves with
>> namespaces. And I don't know how much time it would need to get them
>> working. I think some not-so-clean workaround could be found, if you
>> need it.
>
>
>
> --
> __________________________________________
> Anders Backman, CTO  Algoryx Simulation AB
> Uminova Science Park, Box 7973,  SE-907 19
> Umeå,  Sweden
> anders@algoryx.se http://www.algoryx.se
> Cell: +46-70-392 64 67
>