I notice that in the generated SWIG wrappers for a given set of classes, SWIG keeps a list of C-string representations of all the parent classes from which that class inherits. (char ** base_names). I know there is a function
swig_type(some_variable)
that will return a string representation of a given variable’s data type. Is there also a function that will return a table of the parent classes as strings? If not, is there an easy way to write this function? I’m not at all familiar with the inner workings of SWIG.
Thanks!
Something like this should work (not tested, since I don’t use SWIG with Lua):