clang API Documentation
Public Member Functions | |
InheritanceHierarchyWriter (ASTContext &Context, raw_ostream &Out) | |
void | WriteGraph (QualType Type) |
Protected Member Functions | |
void | WriteNode (QualType Type, bool FromVirtual) |
raw_ostream & | WriteNodeReference (QualType Type, bool FromVirtual) |
InheritanceHierarchyWriter - Helper class that writes out a GraphViz file that diagrams the inheritance hierarchy starting at a given C++ class type. Note that we do not use LLVM's GraphWriter, because the interface does not permit us to properly differentiate between uses of types as virtual bases vs. non-virtual bases.
Definition at line 36 of file InheritViz.cpp.
clang::InheritanceHierarchyWriter::InheritanceHierarchyWriter | ( | ASTContext & | Context, |
raw_ostream & | Out | ||
) | [inline] |
Definition at line 43 of file InheritViz.cpp.
void clang::InheritanceHierarchyWriter::WriteGraph | ( | QualType | Type | ) | [inline] |
Definition at line 46 of file InheritViz.cpp.
References clang::QualType::getAsString().
Referenced by clang::CXXRecordDecl::viewInheritance().
void clang::InheritanceHierarchyWriter::WriteNode | ( | QualType | Type, |
bool | FromVirtual | ||
) | [protected] |
WriteNode - Write out the description of node in the inheritance diagram, which may be a base class or it may be the root node.
Definition at line 63 of file InheritViz.cpp.
References clang::CXXRecordDecl::bases(), Context, clang::Type::getAs(), and clang::QualType::getAsString().
raw_ostream & clang::InheritanceHierarchyWriter::WriteNodeReference | ( | QualType | Type, |
bool | FromVirtual | ||
) | [protected] |
WriteNodeReference - Write out a reference to the given node, using a unique identifier for each direct base and for the (only) virtual base.
Definition at line 125 of file InheritViz.cpp.
References Context, and clang::QualType::getAsOpaquePtr().