Global enum as function parameter

Secretive Loon <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
I have a function that takes an enum as its parameter:// C++
void MyClass::MyFunction( MyEnum e ) { ... }

where the enumerator has a global scope like:
enum MyEnum
{
MYENUM_ZEROTH,
MYENUM_FIRST,
MYENUM_SECOND,
etc.
}

I can't bind to enum with LuaBind because, as far as I know, LuaBind can
only bind with class enums and mine is a global. I've tried passing the
function an int but it won't allow that. I read a post about this (
http://osdir.com/ml/lang.lua.bind.user/2003-11/msg00002.html ) that was
written a while back, so I'm hoping maybe an alternative has been made since
then. I don't mind if the solution isn't clean. Is there a way to call
MyFunction from Lua? If not, is there a way around it?

Thanks.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user
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.