clang  9.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
Collaboration diagram for clang::format::BreakableComment:
Collaboration graph

Public Member Functions

bool supportsReflow () const override
unsigned getLineCount () const override
Split getSplit (unsigned LineIndex, unsigned TailOffset, unsigned ColumnLimit, unsigned ContentStartColumn, 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 286 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 

Creates a breakable token for a comment.

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

Definition at line 262 of file BreakableToken.cpp.

Member Function Documentation

◆ compressWhitespace()

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

Definition at line 283 of file BreakableToken.cpp.

◆ getLineCount()

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

Definition at line 269 of file BreakableToken.cpp.

References Lines.

◆ getSplit()

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

◆ mayReflow()

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

◆ supportsReflow()

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

◆ tokenAt()

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

Member Data Documentation

◆ Content

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

◆ ContentColumn

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

◆ Lines

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

◆ ReflowPrefix

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

Definition at line 354 of file BreakableToken.h.

◆ StartColumn

unsigned clang::format::BreakableComment::StartColumn

◆ Tokens

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

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