clang API Documentation

Public Member Functions
clang::format::BreakableStringLiteral Class Reference

#include <BreakableToken.h>

Inheritance diagram for clang::format::BreakableStringLiteral:
Inheritance graph
[legend]
Collaboration diagram for clang::format::BreakableStringLiteral:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BreakableStringLiteral (const FormatToken &Tok, unsigned IndentLevel, unsigned StartColumn, StringRef Prefix, StringRef Postfix, bool InPPDirective, encoding::Encoding Encoding, const FormatStyle &Style)
 Creates a breakable token for a single line string literal.
Split getSplit (unsigned LineIndex, unsigned TailOffset, unsigned ColumnLimit) const override
 Returns a range (offset, length) at which to break the line at LineIndex, if previously broken at TailOffset. If possible, do not violate ColumnLimit.
void insertBreak (unsigned LineIndex, unsigned TailOffset, Split Split, WhitespaceManager &Whitespaces) override
 Emits the previously retrieved Split via Whitespaces.
void replaceWhitespace (unsigned LineIndex, unsigned TailOffset, Split Split, WhitespaceManager &Whitespaces) override
 Replaces the whitespace range described by Split with a single space.

Detailed Description

Definition at line 114 of file BreakableToken.h.


Constructor & Destructor Documentation

clang::format::BreakableStringLiteral::BreakableStringLiteral ( const FormatToken Tok,
unsigned  IndentLevel,
unsigned  StartColumn,
StringRef  Prefix,
StringRef  Postfix,
bool  InPPDirective,
encoding::Encoding  Encoding,
const FormatStyle Style 
)

Creates a breakable token for a single line string literal.

StartColumn specifies the column in which the token will start after formatting.

Definition at line 155 of file BreakableToken.cpp.


Member Function Documentation

BreakableToken::Split clang::format::BreakableStringLiteral::getSplit ( unsigned  LineIndex,
unsigned  TailOffset,
unsigned  ColumnLimit 
) const [override, virtual]
void clang::format::BreakableStringLiteral::insertBreak ( unsigned  LineIndex,
unsigned  TailOffset,
Split  Split,
WhitespaceManager Whitespaces 
) [override, virtual]
void clang::format::BreakableStringLiteral::replaceWhitespace ( unsigned  LineIndex,
unsigned  TailOffset,
Split  Split,
WhitespaceManager Whitespaces 
) [inline, override, virtual]

Replaces the whitespace range described by Split with a single space.

Implements clang::format::BreakableToken.

Definition at line 129 of file BreakableToken.h.


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