clang  6.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
[legend]
Collaboration diagram for clang::format::BreakableStringLiteral:
Collaboration graph
[legend]

Public Member Functions

 BreakableStringLiteral (const FormatToken &Tok, unsigned StartColumn, StringRef Prefix, StringRef Postfix, 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 ReflowColumn, llvm::Regex &CommentPragmasRegex) const override
 
void insertBreak (unsigned LineIndex, unsigned TailOffset, Split Split, 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 233 of file BreakableToken.h.

Constructor & Destructor Documentation

◆ BreakableStringLiteral()

clang::format::BreakableStringLiteral::BreakableStringLiteral ( const FormatToken Tok,
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 215 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
inlineoverride

◆ getContentStartColumn()

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

Definition at line 210 of file BreakableToken.cpp.

References Prefix, and StartColumn.

◆ getLineCount()

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

Definition at line 192 of file BreakableToken.cpp.

◆ getRangeLength()

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

Definition at line 194 of file BreakableToken.cpp.

◆ getRemainingLength()

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

◆ getSplit()

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

◆ insertBreak()

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

Definition at line 234 of file BreakableToken.cpp.

Member Data Documentation

◆ Line

StringRef clang::format::BreakableStringLiteral::Line
protected

Definition at line 267 of file BreakableToken.h.

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

◆ Postfix

StringRef clang::format::BreakableStringLiteral::Postfix
protected

Definition at line 265 of file BreakableToken.h.

Referenced by getRemainingLength(), and getSplit().

◆ Prefix

StringRef clang::format::BreakableStringLiteral::Prefix
protected

Definition at line 263 of file BreakableToken.h.

Referenced by getContentStartColumn().

◆ StartColumn

unsigned clang::format::BreakableStringLiteral::StartColumn
protected

Definition at line 261 of file BreakableToken.h.

Referenced by getContentStartColumn(), and getRemainingLength().

◆ UnbreakableTailLength

unsigned clang::format::BreakableStringLiteral::UnbreakableTailLength
protected

Definition at line 270 of file BreakableToken.h.

Referenced by getRemainingLength().


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