clang  6.0.0svn
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
clang::format::BreakableComment Class Referenceabstract

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

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

Public Member Functions

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
 

Protected Member Functions

 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
 
virtual bool mayReflow (unsigned LineIndex, llvm::Regex &CommentPragmasRegex) const =0
 

Protected Attributes

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 273 of file BreakableToken.h.

Constructor & Destructor Documentation

◆ BreakableComment()

clang::format::BreakableComment::BreakableComment ( const FormatToken Token,
unsigned  StartColumn,
bool  InPPDirective,
encoding::Encoding  Encoding,
const FormatStyle Style 
)
protected

Creates a breakable token for a comment.

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

Definition at line 242 of file BreakableToken.cpp.

Member Function Documentation

◆ compressWhitespace()

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

Definition at line 263 of file BreakableToken.cpp.

◆ getLineCount()

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

Definition at line 249 of file BreakableToken.cpp.

References Lines.

◆ getSplit()

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

◆ mayReflow()

virtual bool clang::format::BreakableComment::mayReflow ( unsigned  LineIndex,
llvm::Regex &  CommentPragmasRegex 
) const
protectedpure virtual

◆ supportsReflow()

bool clang::format::BreakableComment::supportsReflow ( ) const
inlineoverride

◆ tokenAt()

const FormatToken & clang::format::BreakableComment::tokenAt ( unsigned  LineIndex) const
protected

Member Data Documentation

◆ Content

SmallVector<StringRef, 16> clang::format::BreakableComment::Content
protected

◆ ContentColumn

SmallVector<int, 16> clang::format::BreakableComment::ContentColumn
protected

◆ Lines

SmallVector<StringRef, 16> clang::format::BreakableComment::Lines
protected

◆ ReflowPrefix

StringRef clang::format::BreakableComment::ReflowPrefix = " "
protected

Definition at line 341 of file BreakableToken.h.

◆ StartColumn

unsigned clang::format::BreakableComment::StartColumn
protected

◆ Tokens

SmallVector<FormatToken *, 16> clang::format::BreakableComment::Tokens
protected

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