[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Question about function call interception.
- From: "Joshua Jensen" <jjensen@...>
- Date: Tue, 9 Dec 2003 10:04:50 -0700
> 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 ) {
>
> }
Yes. See the LuaInterface for .NET code
(http://www.inf.puc-rio.br/~mascarenhas/luainterface/) as an example of how.
Also, the Lua COM code does a similar type of thing.
Josh