Luabind: getting the super class of a class

Abhijit Nandy <[email protected]> Fri, 11 Dec 2015 23:09:05 +0530
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <CAJGw_m2v_1L=s4EjMsnq6of5SYvSb27Hhb=0k67Yf_dYkmxLZw@mail.gmail.com>
--===============7204915817345628959==
Content-Type: multipart/alternative; boundary=047d7b10c823c8ae580526a2ccae

--047d7b10c823c8ae580526a2ccae
Content-Type: text/plain; charset=UTF-8

Hi,

I am currently using the original luabind from Rasterbar at
https://github.com/luabind/luabind

Its been upgraded for Lua 5.3. I use the object oriented system in Lua that
Luabind exposes(the 'class' keyword)

Its working properly except that I can't get the super class of a class
defined in Lua.

Has anyone tried this? Currently I solve this by having all class creation
& derivation go through my own function so I can track types.

But I am wondering if this information is already there.

e.g.

class 'A'
function A:__init()
end

class 'B'(A)
function B:__init()
end

How to get the super class for B, i.e. A?

Thanks
Abhijit

--047d7b10c823c8ae580526a2ccae
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi,</div><div><br></div><div>I am currently using the=
 original luabind from Rasterbar at <a href=3D"https://github.com/luabind/l=
uabind">https://github.com/luabind/luabind</a></div><div><br></div><div>Its=
 been upgraded for Lua 5.3. I use the object oriented system in Lua that Lu=
abind exposes(the &#39;class&#39; keyword)</div><div><br></div><div>Its wor=
king properly except that I can&#39;t get the super class of a class define=
d in Lua.</div><div><br></div><div>Has anyone tried this? Currently I solve=
 this by having all class creation &amp; derivation go through my own funct=
ion so I can track types.</div><div><br></div><div>But I am wondering if th=
is information is already there.</div><div><br></div><div>e.g.</div><div><b=
r></div><div>class &#39;A&#39;</div><div>function A:__init()</div><div>end<=
/div><div><br></div><div>class &#39;B&#39;(A)</div><div>function B:__init()=
</div><div>end</div><div><br></div><div>How to get the super class for B, i=
.e. A?</div><div><br></div><div>Thanks</div><div>Abhijit</div></div>

--047d7b10c823c8ae580526a2ccae--


--===============7204915817345628959==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------

--===============7204915817345628959==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user

--===============7204915817345628959==--