clang: clang::PrintingCallbacks Class Reference (original) (raw)

Callbacks to use to customize the behavior of the pretty-printer. More...

#include "[clang/AST/PrettyPrinter.h](PrettyPrinter%5F8h%5Fsource.html)"

Public Member Functions
virtual std::string remapPath (StringRef Path) const
Remap a path to a form suitable for printing.
virtual bool isScopeVisible (const DeclContext *DC) const
When printing type to be inserted into code in specific context, this callback can be used to avoid printing the redundant part of the qualifier.

Callbacks to use to customize the behavior of the pretty-printer.

Definition at line 32 of file PrettyPrinter.h.

clang::PrintingCallbacks::~PrintingCallbacks ( ) protecteddefault

isScopeVisible()

virtual bool clang::PrintingCallbacks::isScopeVisible ( const DeclContext * DC) const inlinevirtual

When printing type to be inserted into code in specific context, this callback can be used to avoid printing the redundant part of the qualifier.

For example, when inserting code inside namespace foo, we should print bar::SomeType instead of foo::bar::SomeType. To do this, shouldPrintScope should return true on "foo" NamespaceDecl. The printing stops at the first isScopeVisible() == true, so there will be no calls with outer scopes.

Definition at line 49 of file PrettyPrinter.h.

remapPath()

virtual std::string clang::PrintingCallbacks::remapPath ( StringRef Path) const inlinevirtual

Remap a path to a form suitable for printing.

Definition at line 38 of file PrettyPrinter.h.

References Path.


The documentation for this class was generated from the following file: