clang  6.0.0svn
Public Member Functions | List of all members
clang::format::BreakableBlockComment Class Reference

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

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

Public Member Functions

 BreakableBlockComment (const FormatToken &Token, unsigned StartColumn, unsigned OriginalStartColumn, bool FirstInLine, bool InPPDirective, encoding::Encoding Encoding, const FormatStyle &Style)
 
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
 
void insertBreak (unsigned LineIndex, unsigned TailOffset, Split Split, WhitespaceManager &Whitespaces) const override
 
Split getReflowSplit (unsigned LineIndex, llvm::Regex &CommentPragmasRegex) const override
 
void reflow (unsigned LineIndex, WhitespaceManager &Whitespaces) const override
 
bool introducesBreakBeforeToken () const override
 
void adaptStartOfLine (unsigned LineIndex, WhitespaceManager &Whitespaces) const override
 
Split getSplitAfterLastLine (unsigned TailOffset) const override
 
bool mayReflow (unsigned LineIndex, llvm::Regex &CommentPragmasRegex) const override
 
- Public Member Functions inherited from clang::format::BreakableComment
bool supportsReflow () const override
 
unsigned getLineCount () const override
 
Split getSplit (unsigned LineIndex, unsigned TailOffset, unsigned ColumnLimit, unsigned ReflowColumn, llvm::Regex &CommentPragmasRegex) const override
 
void compressWhitespace (unsigned LineIndex, unsigned TailOffset, Split Split, WhitespaceManager &Whitespaces) const override
 

Additional Inherited Members

- Protected Member Functions inherited from clang::format::BreakableComment
 BreakableComment (const FormatToken &Token, unsigned StartColumn, bool InPPDirective, encoding::Encoding Encoding, const FormatStyle &Style)
 Creates a breakable token for a comment. More...
 
const FormatTokentokenAt (unsigned LineIndex) const
 
- Protected Attributes inherited from clang::format::BreakableComment
SmallVector< StringRef, 16 > Lines
 
SmallVector< StringRef, 16 > Content
 
SmallVector< FormatToken *, 16 > Tokens
 
SmallVector< int, 16 > ContentColumn
 
unsigned StartColumn
 
StringRef ReflowPrefix = " "
 

Detailed Description

Definition at line 344 of file BreakableToken.h.

Constructor & Destructor Documentation

◆ BreakableBlockComment()

clang::format::BreakableBlockComment::BreakableBlockComment ( const FormatToken Token,
unsigned  StartColumn,
unsigned  OriginalStartColumn,
bool  FirstInLine,
bool  InPPDirective,
encoding::Encoding  Encoding,
const FormatStyle Style 
)

Member Function Documentation

◆ adaptStartOfLine()

void clang::format::BreakableBlockComment::adaptStartOfLine ( unsigned  LineIndex,
WhitespaceManager Whitespaces 
) const
override

Definition at line 577 of file BreakableToken.cpp.

◆ getContentStartColumn()

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

Definition at line 505 of file BreakableToken.cpp.

References clang::format::BreakableComment::ContentColumn, and max().

◆ getRangeLength()

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

Definition at line 476 of file BreakableToken.cpp.

Referenced by getRemainingLength().

◆ getReflowSplit()

BreakableToken::Split clang::format::BreakableBlockComment::getReflowSplit ( unsigned  LineIndex,
llvm::Regex &  CommentPragmasRegex 
) const
override

Definition at line 541 of file BreakableToken.cpp.

References clang::format::BreakableComment::Content, and mayReflow().

◆ getRemainingLength()

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

Definition at line 498 of file BreakableToken.cpp.

References getRangeLength().

◆ getSplitAfterLastLine()

BreakableToken::Split clang::format::BreakableBlockComment::getSplitAfterLastLine ( unsigned  TailOffset) const
override

Definition at line 624 of file BreakableToken.cpp.

References clang::format::BreakableComment::Content, and Line.

◆ insertBreak()

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

Definition at line 512 of file BreakableToken.cpp.

◆ introducesBreakBeforeToken()

bool clang::format::BreakableBlockComment::introducesBreakBeforeToken ( ) const
override

Definition at line 550 of file BreakableToken.cpp.

References clang::format::BreakableComment::Lines.

◆ mayReflow()

bool clang::format::BreakableBlockComment::mayReflow ( unsigned  LineIndex,
llvm::Regex &  CommentPragmasRegex 
) const
overridevirtual

◆ reflow()

void clang::format::BreakableBlockComment::reflow ( unsigned  LineIndex,
WhitespaceManager Whitespaces 
) const
override

Definition at line 556 of file BreakableToken.cpp.


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