clang  8.0.0svn
Public Member Functions | Protected Attributes | List of all members
clang::format::BreakableStringLiteral Class Reference

#include "/opt/doxygen-docs/src/llvm/tools/clang/lib/Format/BreakableToken.h"

Inheritance diagram for clang::format::BreakableStringLiteral:
Inheritance graph
Collaboration diagram for clang::format::BreakableStringLiteral:
Collaboration graph

Public Member Functions

 BreakableStringLiteral (const FormatToken &Tok, unsigned StartColumn, StringRef Prefix, StringRef Postfix, unsigned UnbreakableTailLength, bool InPPDirective, encoding::Encoding Encoding, const FormatStyle &Style)
 Creates a breakable token for a single line string literal. More...
Split getSplit (unsigned LineIndex, unsigned TailOffset, unsigned ColumnLimit, unsigned ContentStartColumn, llvm::Regex &CommentPragmasRegex) const override
void insertBreak (unsigned LineIndex, unsigned TailOffset, Split Split, unsigned ContentIndent, WhitespaceManager &Whitespaces) const override
void compressWhitespace (unsigned LineIndex, unsigned TailOffset, Split Split, WhitespaceManager &Whitespaces) const override
unsigned getLineCount () const override
unsigned getRangeLength (unsigned LineIndex, unsigned Offset, StringRef::size_type Length, unsigned StartColumn) const override
unsigned getRemainingLength (unsigned LineIndex, unsigned Offset, unsigned StartColumn) const override
unsigned getContentStartColumn (unsigned LineIndex, bool Break) const override

Protected Attributes

unsigned StartColumn
StringRef Prefix
StringRef Postfix
StringRef Line
unsigned UnbreakableTailLength

Detailed Description

Definition at line 250 of file BreakableToken.h.

Constructor & Destructor Documentation

◆ BreakableStringLiteral()

clang::format::BreakableStringLiteral::BreakableStringLiteral ( const FormatToken Tok,
unsigned  StartColumn,
StringRef  Prefix,
StringRef  Postfix,
unsigned  UnbreakableTailLength,
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 233 of file BreakableToken.cpp.

References Line, and clang::format::FormatToken::TokenText.

Member Function Documentation

◆ compressWhitespace()

void clang::format::BreakableStringLiteral::compressWhitespace ( unsigned  LineIndex,
unsigned  TailOffset,
Split  Split,
WhitespaceManager Whitespaces 
) const

◆ getContentStartColumn()

unsigned clang::format::BreakableStringLiteral::getContentStartColumn ( unsigned  LineIndex,
bool  Break 
) const

Definition at line 228 of file BreakableToken.cpp.

References Prefix, and StartColumn.

◆ getLineCount()

unsigned clang::format::BreakableStringLiteral::getLineCount ( ) const

Definition at line 210 of file BreakableToken.cpp.

◆ getRangeLength()

unsigned clang::format::BreakableStringLiteral::getRangeLength ( unsigned  LineIndex,
unsigned  Offset,
StringRef::size_type  Length,
unsigned  StartColumn 
) const

Definition at line 212 of file BreakableToken.cpp.

◆ getRemainingLength()

unsigned clang::format::BreakableStringLiteral::getRemainingLength ( unsigned  LineIndex,
unsigned  Offset,
unsigned  StartColumn 
) const

◆ getSplit()

BreakableToken::Split clang::format::BreakableStringLiteral::getSplit ( unsigned  LineIndex,
unsigned  TailOffset,
unsigned  ColumnLimit,
unsigned  ContentStartColumn,
llvm::Regex &  CommentPragmasRegex 
) const

◆ insertBreak()

void clang::format::BreakableStringLiteral::insertBreak ( unsigned  LineIndex,
unsigned  TailOffset,
Split  Split,
unsigned  ContentIndent,
WhitespaceManager Whitespaces 
) const

Definition at line 252 of file BreakableToken.cpp.

Member Data Documentation

◆ Line

StringRef clang::format::BreakableStringLiteral::Line

Definition at line 285 of file BreakableToken.h.

Referenced by BreakableStringLiteral(), getRemainingLength(), and getSplit().

◆ Postfix

StringRef clang::format::BreakableStringLiteral::Postfix

Definition at line 283 of file BreakableToken.h.

Referenced by getRemainingLength(), and getSplit().

◆ Prefix

StringRef clang::format::BreakableStringLiteral::Prefix

Definition at line 281 of file BreakableToken.h.

Referenced by getContentStartColumn().

◆ StartColumn

unsigned clang::format::BreakableStringLiteral::StartColumn

Definition at line 279 of file BreakableToken.h.

Referenced by getContentStartColumn(), and getRemainingLength().

◆ UnbreakableTailLength

unsigned clang::format::BreakableStringLiteral::UnbreakableTailLength

Definition at line 288 of file BreakableToken.h.

Referenced by getRemainingLength().

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