[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: AW: tolua, c++, garbagecollection and memory management
- From: James Hearn <james.hearn@...>
- Date: Fri, 12 Jan 2001 07:41:22 -0600
Dirk Ringe wrote:
>
> QT signal/slot system does not only need a preprocessor, but also uses
> string message parsing, with causes a lot of overhead. Any decent template
> based C++ callback system should be able to outperform the signal/slot
> system and also provide more type safety (which is essentially for free on a
> template system).
>
> For infos about C++ callbacks look at the following site:
>
> http://sunsite.dk/lgdc/articles.php3?mode=body&articleid=5
>
> I did extend the system so that I am able to bind a Lua function to a
> callback, so that when the C++ object calls the callback it can jump
> seamless into Lua (without even knowing about Lua in the system). Very nice
> feature, when you don't know beforehand, what parts of your code will be
> written in Lua and what in C++ (sometimes we got to switch from Lua to C++
> for performance reasons, etc.)
>
> Dirk
May I ask how you were able to bind lua to these callbacks? The game
windowing system I am modifying is a mini-Qt-alike system for the
Allegro game library. (No language extensions or string parsing, but it
does require gui objects to inherit from a base gui object class in
order to gain access to the signal and slot controlling methods.) My
goal is to be able to dynamically create/modify/save guis from a lua
console within a program. A big part of this would be using lua
functions transparently as signals/slots.
Many thanks,
James Hearn