cppast icon indicating copy to clipboard operation
cppast copied to clipboard

Dependent types are always unexposed

Open foonathan opened this issue 8 years ago • 8 comments

  • cppast version: latest one
  • parser: libclang_parser
  • clang version: 3.9.1+

The type cpp_depedent_type will never be created, instead a cpp_unexposed_type.

foonathan avatar Apr 18 '17 13:04 foonathan

I'm using cppast to generate serialize code of cpp classes, Is there any way I can get the base classes of a class?

ongonginging avatar Sep 13 '17 08:09 ongonginging

What do you mean by anchors? If you want the base classes, they're available via the bases() member function of cpp_class.

foonathan avatar Sep 13 '17 08:09 foonathan

Yep, that's what I want, thank you.

ongonginging avatar Sep 13 '17 09:09 ongonginging

how to recognize abstract class?

ongonginging avatar Sep 28 '17 09:09 ongonginging

You have to detect it manually. Loop over members and check whether member functions, conversion operators and destructors are pure virtual by is_pure(func.virtual_info()).

foonathan avatar Sep 28 '17 09:09 foonathan

how to get namespace of a class?

ongonginging avatar Oct 16 '17 02:10 ongonginging

Loop over the parents and handle cpp_namespace.

foonathan avatar Oct 16 '17 05:10 foonathan

@foonathan thank you

ongonginging avatar Oct 16 '17 08:10 ongonginging