I can't find a way to get a "fully qualified name" for a template type without it's arguments, just plain name.
I.e. for a type which spells NS::NS::TemplatedType<int, char>
just NS::NS::TemplatedType
.
I know it's possible to do for a cursor in a field declaration; I just use:
plain_type_name = "::".join([c.spelling for c in cursor.get_children()])
Unfortunately in my case I don't have a cursor, because I've obtained type from a TYPEDEF_DECL
cursor via typedef_cursor.underlying_typedef_type
. So I guess I can just work with a type.
I am trying to process a typedef declaration like typedef NS::NS::TemplatedType<int, char> TTic;
and I want to drop template arguments from the source type.
My target is python code but if I get a c++ solution I can work my way and translate it. Obviously I'd like to avoid regexping the spelling.