From: Darwin S. <dar...@ho...> - 2006-06-12 19:47:15
|
Yeah that works fine now. Thanks again, Darwin Slattery From: "John Labenski" <jla...@gm...> To: djs...@us..., wxl...@li... Subject: Re: [Wxlua-users] multi-level C++ namespaces Date: Sun, 11 Jun 2006 23:52:08 -0400 On 6/9/06, Darwin Slattery <dar...@ho...> wrote: >Thanks that works great. The naming convention for the namespaces is >perfect. Good. >I have noticed something regarding enumerations declared inside a class in >a >namespace that I just wanted to check with you. > >I have the following declaration: >namespace nsa >{ >class MyClass >{ >public: > enum MyEnum > { > ENUMVAL1 = 10 > }; >}; >} > >The corresponding entry for the enumeration in the .i file is: >%enum nsa::MyClass::MyEnum > %rename nsa_MyClass_ENUMVAL1 MyClass::ENUMVAL1 >%endenum > >I could not put the 'nsa::' before 'MyClass::ENUMVAL1' because it results >in >a compile error saying that nsa::nsa isn't declared. I fixed some things related to this, get a new copy and try this. ie. Don't prepend the namespace on the enum name. %enum nsa::MyClass::MyEnum %rename nsa_MyClass_ENUMVAL1 ENUMVAL1 %rename ENUMVAL2 ENUMVAL2 ENUMVAL3 %endenum results should be (using the wx lua "global" namespace) wx.nsa_MyClass_ENUMVAL1 wx.ENUMVAL2 wx.nsa_MyClass_ENUMVAL3 Regards, John Labenski |