LLDB mainline
lldb_private::DefaultHighlighter Class Reference

A default highlighter that only highlights the user cursor, but doesn't do any other highlighting. More...

#include <DefaultHighlighter.h>

Inheritance diagram for lldb_private::DefaultHighlighter:
[legend]

Public Member Functions

llvm::StringRef GetName () const override
 Returns a human readable name for the selected highlighter.
void Highlight (const HighlightStyle &options, llvm::StringRef line, std::optional< size_t > cursor_pos, llvm::StringRef previous_lines, Stream &s) const override
 Highlights the given line.
llvm::StringRef GetPluginName () override
Public Member Functions inherited from lldb_private::Highlighter
 Highlighter ()=default
virtual ~Highlighter ()=default
 Highlighter (const Highlighter &)=delete
const Highlighteroperator= (const Highlighter &)=delete
std::string Highlight (const HighlightStyle &options, llvm::StringRef line, std::optional< size_t > cursor_pos, llvm::StringRef previous_lines="") const
 Utility method for calling Highlight without a stream.
Public Member Functions inherited from lldb_private::PluginInterface
 PluginInterface ()=default
virtual ~PluginInterface ()=default
 PluginInterface (const PluginInterface &)=delete
PluginInterfaceoperator= (const PluginInterface &)=delete

Static Public Member Functions

static HighlighterCreateInstance (lldb::LanguageType language)
static void Terminate ()
static void Initialize ()
static llvm::StringRef GetPluginNameStatic ()

Detailed Description

A default highlighter that only highlights the user cursor, but doesn't do any other highlighting.

Definition at line 18 of file DefaultHighlighter.h.

Member Function Documentation

◆ CreateInstance()

Highlighter * DefaultHighlighter::CreateInstance ( lldb::LanguageType language)
static

Definition at line 39 of file DefaultHighlighter.cpp.

References lldb_private::Highlighter::Highlighter().

Referenced by Initialize(), and Terminate().

◆ GetName()

llvm::StringRef lldb_private::DefaultHighlighter::GetName ( ) const
inlineoverridevirtual

Returns a human readable name for the selected highlighter.

Implements lldb_private::Highlighter.

Definition at line 20 of file DefaultHighlighter.h.

◆ GetPluginName()

llvm::StringRef lldb_private::DefaultHighlighter::GetPluginName ( )
inlineoverridevirtual

Implements lldb_private::PluginInterface.

Definition at line 32 of file DefaultHighlighter.h.

References GetPluginNameStatic().

◆ GetPluginNameStatic()

llvm::StringRef lldb_private::DefaultHighlighter::GetPluginNameStatic ( )
inlinestatic

Definition at line 31 of file DefaultHighlighter.h.

Referenced by GetPluginName(), and Initialize().

◆ Highlight()

void DefaultHighlighter::Highlight ( const HighlightStyle & options,
llvm::StringRef line,
std::optional< size_t > cursor_pos,
llvm::StringRef previous_lines,
Stream & s ) const
overridevirtual

Highlights the given line.

Parameters
optionsThe highlight options.
lineThe user supplied line that needs to be highlighted.
cursor_posThe cursor position of the user in this line, starting at 0 (which means the cursor is on the first character in 'line').
previous_linesAny previous lines the user has written which we should only use for getting the context of the Highlighting right.
sThe stream to which the highlighted version of the user string should be written.

Implements lldb_private::Highlighter.

Definition at line 15 of file DefaultHighlighter.cpp.

References Highlight().

Referenced by Highlight().

◆ Initialize()

void DefaultHighlighter::Initialize ( )
static

◆ Terminate()

void DefaultHighlighter::Terminate ( )
static

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