[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Question about function call interception.
- From: Bernhard Glück <bernhard@...>
- Date: Tue, 09 Dec 2003 13:21:13 +0100
Hi!
I have a pretty strange question about Lua.
We use tables to emulate classes in the Lua 5.0 language.
Now is there a way to "intercept" method calls this way... so that
whenever i invoke
a method on a table a C Function is called ( similar like this )
LUA:
myObject:doSomething()
C++
void OnMethodCall( const char * methodname,lua_State * s )
{
}
This would allow us to automate our export of C++ classes to lua , since
we have a very sophistcated
C++ reflection system in place, which allows us to determine a C++ classes
methods at runtime.
This way we would never have to write wrappers again etc..
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/