Add get_class() function to resolve base class types

This commit is contained in:
Jonathan Müller 2017-12-14 19:07:47 +01:00
commit 2c7b06dea9
2 changed files with 91 additions and 0 deletions

View file

@ -235,6 +235,16 @@ namespace cppast
cpp_class_kind kind_;
bool final_;
};
/// \returns The type the base class refers to.
/// It is either a class or some form of typedef.
type_safe::optional_ref<const cpp_entity> get_class_or_typedef(const cpp_entity_index& index,
const cpp_base_class& base);
/// \returns The type the base class refers to.
/// Typedefs are unwrapped.
type_safe::optional_ref<const cpp_class> get_class(const cpp_entity_index& index,
const cpp_base_class& base);
} // namespace cppast
#endif // CPPAST_CPP_CLASS_HPP_INCLUDED