KDevelop API Documentation

astyle::ASFormatter Class Reference

#include <astyle.h>

Inheritance diagram for astyle::ASFormatter:

Inheritance graph
[legend]
Collaboration diagram for astyle::ASFormatter:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ASFormatter ()
 Constructor of ASFormatter.
virtual ~ASFormatter ()
 Destructor of ASFormatter.
virtual void init (ASSourceIterator *iter)
 initialize the ASFormatter.
virtual bool hasMoreLines () const
 check if there are any indented lines ready to be read by nextLine()
virtual string nextLine ()
 get the next formatted line.
void setBracketFormatMode (BracketMode mode)
 set the bracket formatting mode.
void setBreakClosingHeaderBracketsMode (bool state)
 set closing header bracket breaking mode options: true brackets just before closing headers (e.g.
void setOperatorPaddingMode (bool mode)
 set operator padding mode.
void setParenthesisPaddingMode (bool mode)
 set parentheies padding mode.
void setBreakOneLineBlocksMode (bool state)
 set option to break/not break one-line blocks
void setSingleStatementsMode (bool state)
 set option to break/not break lines consisting of multiple statements.
void setTabSpaceConversionMode (bool state)
 set option to convert tabs to spaces.
void setBreakBlocksMode (bool state)
 set option to break unrelated blocks of code with empty lines.
void setBreakClosingHeaderBlocksMode (bool state)
 set option to break closing header blocks of code (such as 'else', 'catch', ...) with empty lines.
void setBreakElseIfsMode (bool state)
 set 'else if()' breaking mode options: true 'else' headers will be broken from their succeeding 'if' headers.

Private Member Functions

void ASformatter (ASFormatter &copy)
void operator= (ASFormatter &)
void staticInit ()
 initialization of static data of ASFormatter.
bool isFormattingEnabled () const
 check if formatting options are enabled, in addition to indentation.
void goForward (int i)
 jump over several characters.
bool getNextChar ()
 get the next character, increasing the current placement in the process.
char peekNextChar () const
 peek at the next unread character.
bool isBeforeComment () const
 check if current placement is before a comment or line-comment
void trimNewLine ()
 jump over the leading white space in the current line, IF the line does not begin a comment or is in a preprocessor definition.
BracketType getBracketType () const
 check if the currently reached open-bracket (i.e.
bool isPointerOrReference () const
 check if the currently reached '*' or '&' character is a pointer-or-reference symbol, or another operator.
bool isUnaryMinus () const
 check if the currently reached '-' character is a unary minus this method takes for granted that the current character is a '-'.
bool isInExponent () const
 check if the currently reached '-' or '+' character is part of an exponent, i.e.
bool isOneLineBlockReached () const
 check if a one-line bracket has been reached, i.e.
void appendChar (char ch, bool canBreakLine=true)
 append a character to the current formatted line.
void appendCurrentChar (bool canBreakLine=true)
 append the CURRENT character (curentChar)to the current formatted line.
void appendSequence (const string &sequence, bool canBreakLine=true)
 append a string sequence to the current formatted line.
void appendSpacePad ()
 append a space to the current formattedline, UNLESS the last character is already a white-space character.
void breakLine ()
 register a line break for the formatted line.
bool isSequenceReached (const string &sequence) const
 check if a specific sequence exists in the current placement of the current line
const string * findHeader (const vector< const string * > &headers, bool checkBoundry=true)
 check if one of a set of headers has been reached in the current position of the current line.

Private Attributes

ASSourceIteratorsourceIterator
vector< const string * > * preBracketHeaderStack
vector< BracketType > * bracketTypeStack
vector< int > * parenStack
string readyFormattedLine
string currentLine
string formattedLine
const string * currentHeader
const string * previousOperator
char currentChar
char previousChar
char previousNonWSChar
char previousCommandChar
char quoteChar
int charNum
BracketMode bracketFormatMode
bool isVirgin
bool shouldPadOperators
bool shouldPadParenthesies
bool shouldConvertTabs
bool isInLineComment
bool isInComment
bool isInPreprocessor
bool isInTemplate
bool doesLineStartComment
bool isInQuote
bool isSpecialChar
bool isNonParenHeader
bool foundQuestionMark
bool foundPreDefinitionHeader
bool foundPreCommandHeader
bool isInLineBreak
bool isInClosingBracketLineBreak
bool endOfCodeReached
bool isLineReady
bool isPreviousBracketBlockRelated
bool isInPotentialCalculation
bool shouldBreakOneLineBlocks
bool shouldReparseCurrentChar
bool shouldBreakOneLineStatements
bool shouldBreakLineAfterComments
bool shouldBreakClosingHeaderBrackets
bool shouldBreakElseIfs
bool passedSemicolon
bool passedColon
bool isImmediatelyPostComment
bool isImmediatelyPostLineComment
bool isImmediatelyPostEmptyBlock
bool shouldBreakBlocks
bool shouldBreakClosingHeaderBlocks
bool isPrependPostBlockEmptyLineRequested
bool isAppendPostBlockEmptyLineRequested
bool prependEmptyLine
bool foundClosingHeader
int previousReadyFormattedLineLength
bool isInHeader
bool isImmediatelyPostHeader

Static Private Attributes

vector< const string * > headers
vector< const string * > nonParenHeaders
vector< const string * > preprocessorHeaders
vector< const string * > preDefinitionHeaders
vector< const string * > preCommandHeaders
vector< const string * > operators
vector< const string * > assignmentOperators
bool calledInitStatic = false

Constructor & Destructor Documentation

astyle::ASFormatter::ASFormatter  ) 
 

Constructor of ASFormatter.

Definition at line 61 of file ASFormatter.cpp.

References bracketFormatMode, bracketTypeStack, parenStack, preBracketHeaderStack, shouldBreakBlocks, shouldBreakClosingHeaderBlocks, shouldBreakClosingHeaderBrackets, shouldBreakElseIfs, shouldBreakOneLineBlocks, shouldBreakOneLineStatements, shouldConvertTabs, shouldPadOperators, shouldPadParenthesies, sourceIterator, and staticInit().

astyle::ASFormatter::~ASFormatter  )  [virtual]
 

Destructor of ASFormatter.

Definition at line 84 of file ASFormatter.cpp.

References DELETE_CONTAINER, and preBracketHeaderStack.


Member Function Documentation

void astyle::ASFormatter::appendChar char  ch,
bool  canBreakLine = true
[private]
 

append a character to the current formatted line.

Unless disabled (via canBreakLine == false), first check if a line-break has been registered, and if so break the formatted line, and only then append the character into the next formatted line.

Parameters:
ch the character to append.
canBreakLine if true, a registered line-break

Definition at line 1202 of file ASFormatter.cpp.

References breakLine(), and formattedLine.

Referenced by appendCurrentChar().

void astyle::ASFormatter::appendCurrentChar bool  canBreakLine = true  )  [private]
 

append the CURRENT character (curentChar)to the current formatted line.

Unless disabled (via canBreakLine == false), first check if a line-break has been registered, and if so break the formatted line, and only then append the character into the next formatted line.

Parameters:
canBreakLine if true, a registered line-break

Definition at line 1217 of file ASFormatter.cpp.

References appendChar(), and currentChar.

Referenced by nextLine().

void astyle::ASFormatter::appendSequence const string &  sequence,
bool  canBreakLine = true
[private]
 

append a string sequence to the current formatted line.

Unless disabled (via canBreakLine == false), first check if a line-break has been registered, and if so break the formatted line, and only then append the sequence into the next formatted line.

Parameters:
sequence the sequence to append.
canBreakLine if true, a registered line-break

Definition at line 1231 of file ASFormatter.cpp.

References breakLine(), and formattedLine.

Referenced by nextLine().

void astyle::ASFormatter::appendSpacePad  )  [private]
 

append a space to the current formattedline, UNLESS the last character is already a white-space character.

Definition at line 1241 of file ASFormatter.cpp.

References formattedLine, astyle::ASBeautifier::isWhiteSpace(), and len.

Referenced by nextLine().

void astyle::ASFormatter::ASformatter ASFormatter copy  )  [private]
 

void astyle::ASFormatter::breakLine  )  [private]
 

register a line break for the formatted line.

Definition at line 1250 of file ASFormatter.cpp.

References formattedLine, isAppendPostBlockEmptyLineRequested, isInLineBreak, isLineReady, isPrependPostBlockEmptyLineRequested, prependEmptyLine, and readyFormattedLine.

Referenced by appendChar(), appendSequence(), and nextLine().

const string * astyle::ASFormatter::findHeader const vector< const string * > &  headers,
bool  checkBoundry = true
[private]
 

check if one of a set of headers has been reached in the current position of the current line.

Returns:
a pointer to the found header. Or a NULL if no header has been reached.
Parameters:
headers a vector of headers
checkBoundry 

Definition at line 1443 of file ASFormatter.cpp.

References charNum, and currentLine.

Referenced by nextLine().

BracketType astyle::ASFormatter::getBracketType  )  const [private]
 

check if the currently reached open-bracket (i.e.

'{') opens a:

  • a definition type block (such as a class or namespace),
  • a command block (such as a method block)
  • a static array this method takes for granted that the current character is an opening bracket.

Returns:
the type of the opened block.

Definition at line 1279 of file ASFormatter.cpp.

References BracketType, COMMAND_TYPE, currentHeader, foundPreCommandHeader, isOneLineBlockReached(), and previousCommandChar.

Referenced by nextLine().

bool astyle::ASFormatter::getNextChar  )  [private]
 

get the next character, increasing the current placement in the process.

the new character is inserted into the variable currentChar.

Returns:
whether succeded to recieve the new character.

Definition at line 1101 of file ASFormatter.cpp.

References charNum, currentChar, currentLine, doesLineStartComment, endOfCodeReached, formattedLine, astyle::ASSourceIterator::hasMoreLines(), isBeforeComment(), isImmediatelyPostLineComment, isInComment, isInLineBreak, isInLineComment, isInPreprocessor, isInQuote, isSequenceReached(), isVirgin, astyle::ASBeautifier::isWhiteSpace(), len, astyle::ASSourceIterator::nextLine(), peekNextChar(), previousChar, previousCommandChar, previousNonWSChar, shouldConvertTabs, shouldPadOperators, sourceIterator, and trimNewLine().

Referenced by goForward(), and nextLine().

void astyle::ASFormatter::goForward int  i  )  [private]
 

jump over several characters.

Parameters:
i the number of characters to jump over.

Definition at line 1045 of file ASFormatter.cpp.

References getNextChar().

Referenced by nextLine().

bool astyle::ASFormatter::hasMoreLines  )  const [virtual]
 

check if there are any indented lines ready to be read by nextLine()

Returns:
are there any indented lines ready?

Reimplemented from astyle::ASBeautifier.

Definition at line 903 of file ASFormatter.cpp.

References isFormattingEnabled().

Referenced by AStylePart::beautifySource(), and AStylePart::formatSource().

void astyle::ASFormatter::init ASSourceIterator si  )  [virtual]
 

initialize the ASFormatter.

init() should be called every time a ASFormatter object is to start formatting a NEW source file. init() recieves a pointer to a DYNAMICALLY CREATED ASSourceIterator object that will be used to iterate through the source code. This object will be deleted during the ASFormatter's destruction, and thus should not be deleted elsewhere.

Parameters:
si a pointer to the DYNAMICALLY CREATED ASSourceIterator object.

Reimplemented from astyle::ASBeautifier.

Definition at line 221 of file ASFormatter.cpp.

References bracketTypeStack, charNum, currentChar, currentHeader, currentLine, DEFINITION_TYPE, doesLineStartComment, endOfCodeReached, formattedLine, foundClosingHeader, foundPreCommandHeader, foundPreDefinitionHeader, foundQuestionMark, INIT_CONTAINER, isAppendPostBlockEmptyLineRequested, isImmediatelyPostComment, isImmediatelyPostEmptyBlock, isImmediatelyPostHeader, isImmediatelyPostLineComment, isInComment, isInHeader, isInLineBreak, isInLineComment, isInPotentialCalculation, isInPreprocessor, isInQuote, isInTemplate, isLineReady, isNonParenHeader, isPrependPostBlockEmptyLineRequested, isPreviousBracketBlockRelated, isSpecialChar, isVirgin, parenStack, passedColon, passedSemicolon, preBracketHeaderStack, prependEmptyLine, previousCommandChar, previousNonWSChar, previousOperator, previousReadyFormattedLineLength, quoteChar, shouldBreakLineAfterComments, shouldReparseCurrentChar, and sourceIterator.

Referenced by AStylePart::beautifySource(), and AStylePart::formatSource().

bool astyle::ASFormatter::isBeforeComment  )  const [private]
 

check if current placement is before a comment or line-comment

Returns:
is before a comment or line-comment.

Definition at line 1077 of file ASFormatter.cpp.

References charNum, currentLine, astyle::ASBeautifier::isWhiteSpace(), and len.

Referenced by getNextChar().

bool astyle::ASFormatter::isFormattingEnabled  )  const [private]
 

check if formatting options are enabled, in addition to indentation.

Returns:
are formatting options enabled?

Definition at line 915 of file ASFormatter.cpp.

References bracketFormatMode, NONE_MODE, and shouldPadOperators.

Referenced by hasMoreLines(), and nextLine().

bool astyle::ASFormatter::isInExponent  )  const [private]
 

check if the currently reached '-' or '+' character is part of an exponent, i.e.

0.2E-5. this method takes for granted that the current character is a '-' or '+'.

Returns:
whether the current '-' is in an exponent.

Definition at line 1357 of file ASFormatter.cpp.

References formattedLine.

Referenced by nextLine().

bool astyle::ASFormatter::isOneLineBlockReached  )  const [private]
 

check if a one-line bracket has been reached, i.e.

if the currently reached '{' character is closed with a complimentry '}' elsewhere on the current line.

Returns:
has a one-line bracket been reached?

Definition at line 1376 of file ASFormatter.cpp.

References charNum, currentLine, isInComment, isInQuote, and quoteChar.

Referenced by getBracketType().

bool astyle::ASFormatter::isPointerOrReference  )  const [private]
 

check if the currently reached '*' or '&' character is a pointer-or-reference symbol, or another operator.

this method takes for granted that the current character is either a '*' or '&'.

Returns:
whether current character is a reference-or-pointer

Definition at line 1311 of file ASFormatter.cpp.

References bracketTypeStack, IS_A, isInPotentialCalculation, astyle::ASBeautifier::isLegalNameChar(), astyle::ASBeautifier::isWhiteSpace(), peekNextChar(), and previousNonWSChar.

Referenced by nextLine().

bool astyle::ASFormatter::isSequenceReached const string &  sequence  )  const [inline, private]
 

check if a specific sequence exists in the current placement of the current line

Returns:
whether sequence has been reached.
Parameters:
sequence the sequence to be checked

Definition at line 1035 of file ASFormatter.cpp.

References charNum, and currentLine.

Referenced by getNextChar(), nextLine(), and trimNewLine().

bool astyle::ASFormatter::isUnaryMinus  )  const [private]
 

check if the currently reached '-' character is a unary minus this method takes for granted that the current character is a '-'.

Returns:
whether the current '-' is a unary minus.

Definition at line 1341 of file ASFormatter.cpp.

References previousCommandChar, and previousOperator.

Referenced by nextLine().

string astyle::ASFormatter::nextLine  )  [virtual]
 

get the next formatted line.

Returns:
formatted line.

Reimplemented from astyle::ASBeautifier.

Definition at line 284 of file ASFormatter.cpp.

References appendCurrentChar(), appendSequence(), appendSpacePad(), ARRAY_TYPE, assignmentOperators, ATTACH_MODE, BDAC_MODE, astyle::ASBeautifier::beautify(), bracketFormatMode, BracketType, bracketTypeStack, BREAK_MODE, breakLine(), charNum, currentChar, currentHeader, currentLine, findHeader(), foundClosingHeader, foundPreCommandHeader, foundPreDefinitionHeader, foundQuestionMark, getBracketType(), getNextChar(), goForward(), headers, IS_A, isAppendPostBlockEmptyLineRequested, isFormattingEnabled(), isImmediatelyPostComment, isImmediatelyPostEmptyBlock, isImmediatelyPostHeader, isImmediatelyPostLineComment, isInComment, isInExponent(), isInHeader, isInLineBreak, isInLineComment, isInPotentialCalculation, isInPreprocessor, isInQuote, isInTemplate, astyle::ASBeautifier::isLegalNameChar(), isLineReady, isNonParenHeader, isPointerOrReference(), isPrependPostBlockEmptyLineRequested, isPreviousBracketBlockRelated, isSequenceReached(), isSpecialChar, isUnaryMinus(), astyle::ASBeautifier::isWhiteSpace(), nonParenHeaders, operators, parenStack, passedColon, passedSemicolon, peekNextChar(), preBracketHeaderStack, preCommandHeaders, preDefinitionHeaders, prependEmptyLine, previousChar, previousCommandChar, previousNonWSChar, previousOperator, previousReadyFormattedLineLength, quoteChar, readyFormattedLine, shouldBreakBlocks, shouldBreakClosingHeaderBlocks, shouldBreakClosingHeaderBrackets, shouldBreakLineAfterComments, shouldBreakOneLineBlocks, shouldBreakOneLineStatements, shouldPadOperators, shouldReparseCurrentChar, SINGLE_LINE_TYPE, and astyle::ASBeautifier::trim().

Referenced by AStylePart::beautifySource(), and AStylePart::formatSource().

void astyle::ASFormatter::operator= ASFormatter  )  [private]
 

char astyle::ASFormatter::peekNextChar  )  const [private]
 

peek at the next unread character.

Returns:
the next unread character.

Definition at line 1055 of file ASFormatter.cpp.

References charNum, currentLine, astyle::ASBeautifier::isWhiteSpace(), len, and shouldConvertTabs.

Referenced by getNextChar(), isPointerOrReference(), and nextLine().

void astyle::ASFormatter::setBracketFormatMode BracketMode  mode  ) 
 

set the bracket formatting mode.

options: astyle::NONE_MODE no formatting of brackets. astyle::ATTACH_MODE Java, K&R style bracket placement. astyle::BREAK_MODE ANSI C/C++ style bracket placement.

Parameters:
mode the bracket formatting mode.

Definition at line 930 of file ASFormatter.cpp.

References bracketFormatMode.

Referenced by KDevFormatter::KDevFormatter().

void astyle::ASFormatter::setBreakBlocksMode bool  state  ) 
 

set option to break unrelated blocks of code with empty lines.

Parameters:
state true = convert, false = don't convert.

Definition at line 1016 of file ASFormatter.cpp.

References shouldBreakBlocks.

void astyle::ASFormatter::setBreakClosingHeaderBlocksMode bool  state  ) 
 

set option to break closing header blocks of code (such as 'else', 'catch', ...) with empty lines.

Parameters:
state true = convert, false = don't convert.

Definition at line 1025 of file ASFormatter.cpp.

References shouldBreakClosingHeaderBlocks.

void astyle::ASFormatter::setBreakClosingHeaderBracketsMode bool  state  ) 
 

set closing header bracket breaking mode options: true brackets just before closing headers (e.g.

'else', 'catch') will be broken, even if standard brackets are attached. false closing header brackets will be treated as standard brackets.

Parameters:
state the closing header bracket breaking mode.

Definition at line 943 of file ASFormatter.cpp.

References shouldBreakClosingHeaderBrackets.

void astyle::ASFormatter::setBreakElseIfsMode bool  state  ) 
 

set 'else if()' breaking mode options: true 'else' headers will be broken from their succeeding 'if' headers.

false 'else' headers will be attached to their succeeding 'if' headers.

Parameters:
state the 'else if()' breaking mode.

Definition at line 955 of file ASFormatter.cpp.

References shouldBreakElseIfs.

void astyle::ASFormatter::setBreakOneLineBlocksMode bool  state  ) 
 

set option to break/not break one-line blocks

Parameters:
state true = break, false = don't break.

Definition at line 988 of file ASFormatter.cpp.

References shouldBreakOneLineBlocks.

Referenced by KDevFormatter::KDevFormatter().

void astyle::ASFormatter::setOperatorPaddingMode bool  state  ) 
 

set operator padding mode.

options: true statement operators will be padded with spaces around them. false statement operators will not be padded.

Parameters:
state the padding mode.

Definition at line 967 of file ASFormatter.cpp.

References shouldPadOperators.

Referenced by KDevFormatter::KDevFormatter().

void astyle::ASFormatter::setParenthesisPaddingMode bool  state  ) 
 

set parentheies padding mode.

options: true statement parenthesies will be padded with spaces around them. false statement parenthesies will not be padded.

Parameters:
state the padding mode.

Definition at line 979 of file ASFormatter.cpp.

References shouldPadParenthesies.

Referenced by KDevFormatter::KDevFormatter().

void astyle::ASFormatter::setSingleStatementsMode bool  state  ) 
 

set option to break/not break lines consisting of multiple statements.

Parameters:
state true = break, false = don't break.

Definition at line 997 of file ASFormatter.cpp.

References shouldBreakOneLineStatements.

Referenced by KDevFormatter::KDevFormatter().

void astyle::ASFormatter::setTabSpaceConversionMode bool  state  ) 
 

set option to convert tabs to spaces.

Parameters:
state true = convert, false = don't convert.

Definition at line 1006 of file ASFormatter.cpp.

References shouldConvertTabs.

void astyle::ASFormatter::staticInit  )  [private]
 

initialization of static data of ASFormatter.

Definition at line 91 of file ASFormatter.cpp.

References assignmentOperators, calledInitStatic, headers, nonParenHeaders, preCommandHeaders, preDefinitionHeaders, and preprocessorHeaders.

Referenced by ASFormatter().

void astyle::ASFormatter::trimNewLine  )  [private]
 

jump over the leading white space in the current line, IF the line does not begin a comment or is in a preprocessor definition.

Definition at line 1175 of file ASFormatter.cpp.

References charNum, currentLine, doesLineStartComment, isInComment, isSequenceReached(), astyle::ASBeautifier::isWhiteSpace(), and len.

Referenced by getNextChar().


Member Data Documentation

vector< const string * > astyle::ASFormatter::assignmentOperators [static, private]
 

Reimplemented from astyle::ASBeautifier.

Definition at line 56 of file ASFormatter.cpp.

Referenced by nextLine(), and staticInit().

BracketMode astyle::ASFormatter::bracketFormatMode [private]
 

Definition at line 277 of file astyle.h.

Referenced by ASFormatter(), isFormattingEnabled(), nextLine(), and setBracketFormatMode().

vector<BracketType>* astyle::ASFormatter::bracketTypeStack [private]
 

Definition at line 264 of file astyle.h.

Referenced by ASFormatter(), init(), isPointerOrReference(), and nextLine().

bool astyle::ASFormatter::calledInitStatic = false [static, private]
 

Reimplemented from astyle::ASBeautifier.

Definition at line 49 of file ASFormatter.cpp.

Referenced by staticInit().

int astyle::ASFormatter::charNum [private]
 

Definition at line 276 of file astyle.h.

Referenced by findHeader(), getNextChar(), init(), isBeforeComment(), isOneLineBlockReached(), isSequenceReached(), nextLine(), peekNextChar(), and trimNewLine().

char astyle::ASFormatter::currentChar [private]
 

Definition at line 271 of file astyle.h.

Referenced by appendCurrentChar(), getNextChar(), init(), and nextLine().

const string* astyle::ASFormatter::currentHeader [private]
 

Reimplemented from astyle::ASBeautifier.

Definition at line 269 of file astyle.h.

Referenced by getBracketType(), init(), and nextLine().

string astyle::ASFormatter::currentLine [private]
 

Definition at line 267 of file astyle.h.

Referenced by findHeader(), getNextChar(), init(), isBeforeComment(), isOneLineBlockReached(), isSequenceReached(), nextLine(), peekNextChar(), and trimNewLine().

bool astyle::ASFormatter::doesLineStartComment [private]
 

Definition at line 286 of file astyle.h.

Referenced by getNextChar(), init(), and trimNewLine().

bool astyle::ASFormatter::endOfCodeReached [private]
 

Definition at line 295 of file astyle.h.

Referenced by getNextChar(), and init().

string astyle::ASFormatter::formattedLine [private]
 

Definition at line 268 of file astyle.h.

Referenced by appendChar(), appendSequence(), appendSpacePad(), breakLine(), getNextChar(), init(), and isInExponent().

bool astyle::ASFormatter::foundClosingHeader [private]
 

Definition at line 318 of file astyle.h.

Referenced by init(), and nextLine().

bool astyle::ASFormatter::foundPreCommandHeader [private]
 

Definition at line 292 of file astyle.h.

Referenced by getBracketType(), init(), and nextLine().

bool astyle::ASFormatter::foundPreDefinitionHeader [private]
 

Definition at line 291 of file astyle.h.

Referenced by init(), and nextLine().

bool astyle::ASFormatter::foundQuestionMark [private]
 

Definition at line 290 of file astyle.h.

Referenced by init(), and nextLine().

vector< const string * > astyle::ASFormatter::headers [static, private]
 

Reimplemented from astyle::ASBeautifier.

Definition at line 50 of file ASFormatter.cpp.

Referenced by nextLine(), and staticInit().

bool astyle::ASFormatter::isAppendPostBlockEmptyLineRequested [private]
 

Definition at line 315 of file astyle.h.

Referenced by breakLine(), init(), and nextLine().

bool astyle::ASFormatter::isImmediatelyPostComment [private]
 

Definition at line 308 of file astyle.h.

Referenced by init(), and nextLine().

bool astyle::ASFormatter::isImmediatelyPostEmptyBlock [private]
 

Definition at line 310 of file astyle.h.

Referenced by init(), and nextLine().

bool astyle::ASFormatter::isImmediatelyPostHeader [private]
 

Definition at line 322 of file astyle.h.

Referenced by init(), and nextLine().

bool astyle::ASFormatter::isImmediatelyPostLineComment [private]
 

Definition at line 309 of file astyle.h.

Referenced by getNextChar(), init(), and nextLine().

bool astyle::ASFormatter::isInClosingBracketLineBreak [private]
 

Definition at line 294 of file astyle.h.

bool astyle::ASFormatter::isInComment [private]
 

Reimplemented from astyle::ASBeautifier.

Definition at line 283 of file astyle.h.

Referenced by getNextChar(), init(), isOneLineBlockReached(), nextLine(), and trimNewLine().

bool astyle::ASFormatter::isInHeader [private]
 

Reimplemented from astyle::ASBeautifier.

Definition at line 321 of file astyle.h.

Referenced by init(), and nextLine().

bool astyle::ASFormatter::isInLineBreak [private]
 

Definition at line 293 of file astyle.h.

Referenced by breakLine(), getNextChar(), init(), and nextLine().

bool astyle::ASFormatter::isInLineComment [private]
 

Definition at line 282 of file astyle.h.

Referenced by getNextChar(), init(), and nextLine().

bool astyle::ASFormatter::isInPotentialCalculation [private]
 

Definition at line 298 of file astyle.h.

Referenced by init(), isPointerOrReference(), and nextLine().

bool astyle::ASFormatter::isInPreprocessor [private]
 

Definition at line 284 of file astyle.h.

Referenced by getNextChar(), init(), and nextLine().

bool astyle::ASFormatter::isInQuote [private]
 

Reimplemented from astyle::ASBeautifier.

Definition at line 287 of file astyle.h.

Referenced by getNextChar(), init(), isOneLineBlockReached(), and nextLine().

bool astyle::ASFormatter::isInTemplate [private]
 

Reimplemented from astyle::ASBeautifier.

Definition at line 285 of file astyle.h.

Referenced by init(), and nextLine().

bool astyle::ASFormatter::isLineReady [private]
 

Definition at line 296 of file astyle.h.

Referenced by breakLine(), init(), and nextLine().

bool astyle::ASFormatter::isNonParenHeader [private]
 

Definition at line 289 of file astyle.h.

Referenced by init(), and nextLine().

bool astyle::ASFormatter::isPrependPostBlockEmptyLineRequested [private]
 

Definition at line 314 of file astyle.h.

Referenced by breakLine(), init(), and nextLine().

bool astyle::ASFormatter::isPreviousBracketBlockRelated [private]
 

Definition at line 297 of file astyle.h.

Referenced by init(), and nextLine().

bool astyle::ASFormatter::isSpecialChar [private]
 

Definition at line 288 of file astyle.h.

Referenced by init(), and nextLine().

bool astyle::ASFormatter::isVirgin [private]
 

Definition at line 278 of file astyle.h.

Referenced by getNextChar(), and init().

vector< const string * > astyle::ASFormatter::nonParenHeaders [static, private]
 

Reimplemented from astyle::ASBeautifier.

Definition at line 51 of file ASFormatter.cpp.

Referenced by nextLine(), and staticInit().

vector< const string * > astyle::ASFormatter::operators [static, private]
 

Definition at line 55 of file ASFormatter.cpp.

Referenced by nextLine().

vector<int>* astyle::ASFormatter::parenStack [private]
 

Definition at line 265 of file astyle.h.

Referenced by ASFormatter(), init(), and nextLine().

bool astyle::ASFormatter::passedColon [private]
 

Definition at line 307 of file astyle.h.

Referenced by init(), and nextLine().

bool astyle::ASFormatter::passedSemicolon [private]
 

Definition at line 306 of file astyle.h.

Referenced by init(), and nextLine().

vector<const string*>* astyle::ASFormatter::preBracketHeaderStack [private]
 

Definition at line 263 of file astyle.h.

Referenced by ASFormatter(), init(), nextLine(), and ~ASFormatter().

vector< const string * > astyle::ASFormatter::preCommandHeaders [static, private]
 

Definition at line 54 of file ASFormatter.cpp.

Referenced by nextLine(), and staticInit().

vector< const string * > astyle::ASFormatter::preDefinitionHeaders [static, private]
 

Definition at line 53 of file ASFormatter.cpp.

Referenced by nextLine(), and staticInit().

bool astyle::ASFormatter::prependEmptyLine [private]
 

Definition at line 317 of file astyle.h.

Referenced by breakLine(), init(), and nextLine().

vector< const string * > astyle::ASFormatter::preprocessorHeaders [static, private]
 

Reimplemented from astyle::ASBeautifier.

Definition at line 52 of file ASFormatter.cpp.

Referenced by staticInit().

char astyle::ASFormatter::previousChar [private]
 

Definition at line 272 of file astyle.h.

Referenced by getNextChar(), and nextLine().

char astyle::ASFormatter::previousCommandChar [private]
 

Definition at line 274 of file astyle.h.

Referenced by getBracketType(), getNextChar(), init(), isUnaryMinus(), and nextLine().

char astyle::ASFormatter::previousNonWSChar [private]
 

Definition at line 273 of file astyle.h.

Referenced by getNextChar(), init(), isPointerOrReference(), and nextLine().

const string* astyle::ASFormatter::previousOperator [private]
 

Definition at line 270 of file astyle.h.

Referenced by init(), isUnaryMinus(), and nextLine().

int astyle::ASFormatter::previousReadyFormattedLineLength [private]
 

Definition at line 319 of file astyle.h.

Referenced by init(), and nextLine().

char astyle::ASFormatter::quoteChar [private]
 

Reimplemented from astyle::ASBeautifier.

Definition at line 275 of file astyle.h.

Referenced by init(), isOneLineBlockReached(), and nextLine().

string astyle::ASFormatter::readyFormattedLine [private]
 

Definition at line 266 of file astyle.h.

Referenced by breakLine(), and nextLine().

bool astyle::ASFormatter::shouldBreakBlocks [private]
 

Definition at line 312 of file astyle.h.

Referenced by ASFormatter(), nextLine(), and setBreakBlocksMode().

bool astyle::ASFormatter::shouldBreakClosingHeaderBlocks [private]
 

Definition at line 313 of file astyle.h.

Referenced by ASFormatter(), nextLine(), and setBreakClosingHeaderBlocksMode().

bool astyle::ASFormatter::shouldBreakClosingHeaderBrackets [private]
 

Definition at line 304 of file astyle.h.

Referenced by ASFormatter(), nextLine(), and setBreakClosingHeaderBracketsMode().

bool astyle::ASFormatter::shouldBreakElseIfs [private]
 

Definition at line 305 of file astyle.h.

Referenced by ASFormatter(), and setBreakElseIfsMode().

bool astyle::ASFormatter::shouldBreakLineAfterComments [private]
 

Definition at line 303 of file astyle.h.

Referenced by init(), and nextLine().

bool astyle::ASFormatter::shouldBreakOneLineBlocks [private]
 

Definition at line 300 of file astyle.h.

Referenced by ASFormatter(), nextLine(), and setBreakOneLineBlocksMode().

bool astyle::ASFormatter::shouldBreakOneLineStatements [private]
 

Definition at line 302 of file astyle.h.

Referenced by ASFormatter(), nextLine(), and setSingleStatementsMode().

bool astyle::ASFormatter::shouldConvertTabs [private]
 

Definition at line 281 of file astyle.h.

Referenced by ASFormatter(), getNextChar(), peekNextChar(), and setTabSpaceConversionMode().

bool astyle::ASFormatter::shouldPadOperators [private]
 

Definition at line 279 of file astyle.h.

Referenced by ASFormatter(), getNextChar(), isFormattingEnabled(), nextLine(), and setOperatorPaddingMode().

bool astyle::ASFormatter::shouldPadParenthesies [private]
 

Definition at line 280 of file astyle.h.

Referenced by ASFormatter(), and setParenthesisPaddingMode().

bool astyle::ASFormatter::shouldReparseCurrentChar [private]
 

Definition at line 301 of file astyle.h.

Referenced by init(), and nextLine().

ASSourceIterator* astyle::ASFormatter::sourceIterator [private]
 

Reimplemented from astyle::ASBeautifier.

Definition at line 262 of file astyle.h.

Referenced by ASFormatter(), getNextChar(), and init().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:31:59 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003