Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

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 ()
virtual ~ASFormatter ()
virtual void init (ASSourceIterator *iter)
virtual bool hasMoreLines () const
virtual std::string nextLine ()
void setBracketFormatMode (BracketMode mode)
void setBreakClosingHeaderBracketsMode (bool state)
void setOperatorPaddingMode (bool mode)
void setParenthesisPaddingMode (bool mode)
void setBreakOneLineBlocksMode (bool state)
void setSingleStatementsMode (bool state)
void setTabSpaceConversionMode (bool state)
void setBreakBlocksMode (bool state)
void setBreakClosingHeaderBlocksMode (bool state)
void setBreakElseIfsMode (bool state)

Private Member Functions

void ASformatter (ASFormatter &copy)
void operator= (ASFormatter &)
void staticInit ()
bool isFormattingEnabled () const
void goForward (int i)
bool getNextChar ()
char peekNextChar () const
bool isBeforeComment () const
void trimNewLine ()
BracketType getBracketType () const
bool isPointerOrReference () const
bool isUrinaryMinus () const
bool isInExponent () const
bool isOneLineBlockReached () const
void appendChar (char ch, bool canBreakLine=true)
void appendCurrentChar (bool canBreakLine=true)
void appendSequence (const std::string &sequence, bool canBreakLine=true)
void appendSpacePad ()
void breakLine ()
bool isSequenceReached (const std::string &sequence) const
const std::string * findHeader (const std::vector< const std::string * > &headers, bool checkBoundry=true)

Private Attributes

ASSourceIteratorsourceIterator
std::vector< const std::string * > * preBracketHeaderStack
std::vector< BracketType > * bracketTypeStack
std::vector< int > * parenStack
std::string readyFormattedLine
std::string currentLine
std::string formattedLine
const std::string * currentHeader
const std::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

std::vector< const std::string * > headers
std::vector< const std::string * > nonParenHeaders
std::vector< const std::string * > preprocessorHeaders
std::vector< const std::string * > preDefinitionHeaders
std::vector< const std::string * > preCommandHeaders
std::vector< const std::string * > operators
std::vector< const std::string * > assignmentOperators
bool calledInitStatic

Constructor & Destructor Documentation

astyle::ASFormatter::ASFormatter  ) 
 

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


Member Function Documentation

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

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

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

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

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

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

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

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

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

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

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

Reimplemented from astyle::ASBeautifier.

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

Reimplemented from astyle::ASBeautifier.

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

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

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

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

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

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

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

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

Reimplemented from astyle::ASBeautifier.

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

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

void astyle::ASFormatter::setBracketFormatMode BracketMode  mode  ) 
 

void astyle::ASFormatter::setBreakBlocksMode bool  state  ) 
 

void astyle::ASFormatter::setBreakClosingHeaderBlocksMode bool  state  ) 
 

void astyle::ASFormatter::setBreakClosingHeaderBracketsMode bool  state  ) 
 

void astyle::ASFormatter::setBreakElseIfsMode bool  state  ) 
 

void astyle::ASFormatter::setBreakOneLineBlocksMode bool  state  ) 
 

void astyle::ASFormatter::setOperatorPaddingMode bool  mode  ) 
 

void astyle::ASFormatter::setParenthesisPaddingMode bool  mode  ) 
 

void astyle::ASFormatter::setSingleStatementsMode bool  state  ) 
 

void astyle::ASFormatter::setTabSpaceConversionMode bool  state  ) 
 

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

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


Member Data Documentation

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

Reimplemented from astyle::ASBeautifier.

BracketMode astyle::ASFormatter::bracketFormatMode [private]
 

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

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

Reimplemented from astyle::ASBeautifier.

int astyle::ASFormatter::charNum [private]
 

char astyle::ASFormatter::currentChar [private]
 

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

Reimplemented from astyle::ASBeautifier.

std::string astyle::ASFormatter::currentLine [private]
 

bool astyle::ASFormatter::doesLineStartComment [private]
 

bool astyle::ASFormatter::endOfCodeReached [private]
 

std::string astyle::ASFormatter::formattedLine [private]
 

bool astyle::ASFormatter::foundClosingHeader [private]
 

bool astyle::ASFormatter::foundPreCommandHeader [private]
 

bool astyle::ASFormatter::foundPreDefinitionHeader [private]
 

bool astyle::ASFormatter::foundQuestionMark [private]
 

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

Reimplemented from astyle::ASBeautifier.

bool astyle::ASFormatter::isAppendPostBlockEmptyLineRequested [private]
 

bool astyle::ASFormatter::isImmediatelyPostComment [private]
 

bool astyle::ASFormatter::isImmediatelyPostEmptyBlock [private]
 

bool astyle::ASFormatter::isImmediatelyPostHeader [private]
 

bool astyle::ASFormatter::isImmediatelyPostLineComment [private]
 

bool astyle::ASFormatter::isInClosingBracketLineBreak [private]
 

bool astyle::ASFormatter::isInComment [private]
 

Reimplemented from astyle::ASBeautifier.

bool astyle::ASFormatter::isInHeader [private]
 

Reimplemented from astyle::ASBeautifier.

bool astyle::ASFormatter::isInLineBreak [private]
 

bool astyle::ASFormatter::isInLineComment [private]
 

bool astyle::ASFormatter::isInPotentialCalculation [private]
 

bool astyle::ASFormatter::isInPreprocessor [private]
 

bool astyle::ASFormatter::isInQuote [private]
 

Reimplemented from astyle::ASBeautifier.

bool astyle::ASFormatter::isInTemplate [private]
 

Reimplemented from astyle::ASBeautifier.

bool astyle::ASFormatter::isLineReady [private]
 

bool astyle::ASFormatter::isNonParenHeader [private]
 

bool astyle::ASFormatter::isPrependPostBlockEmptyLineRequested [private]
 

bool astyle::ASFormatter::isPreviousBracketBlockRelated [private]
 

bool astyle::ASFormatter::isSpecialChar [private]
 

bool astyle::ASFormatter::isVirgin [private]
 

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

Reimplemented from astyle::ASBeautifier.

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

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

bool astyle::ASFormatter::passedColon [private]
 

bool astyle::ASFormatter::passedSemicolon [private]
 

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

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

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

bool astyle::ASFormatter::prependEmptyLine [private]
 

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

Reimplemented from astyle::ASBeautifier.

char astyle::ASFormatter::previousChar [private]
 

char astyle::ASFormatter::previousCommandChar [private]
 

char astyle::ASFormatter::previousNonWSChar [private]
 

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

int astyle::ASFormatter::previousReadyFormattedLineLength [private]
 

char astyle::ASFormatter::quoteChar [private]
 

Reimplemented from astyle::ASBeautifier.

std::string astyle::ASFormatter::readyFormattedLine [private]
 

bool astyle::ASFormatter::shouldBreakBlocks [private]
 

bool astyle::ASFormatter::shouldBreakClosingHeaderBlocks [private]
 

bool astyle::ASFormatter::shouldBreakClosingHeaderBrackets [private]
 

bool astyle::ASFormatter::shouldBreakElseIfs [private]
 

bool astyle::ASFormatter::shouldBreakLineAfterComments [private]
 

bool astyle::ASFormatter::shouldBreakOneLineBlocks [private]
 

bool astyle::ASFormatter::shouldBreakOneLineStatements [private]
 

bool astyle::ASFormatter::shouldConvertTabs [private]
 

bool astyle::ASFormatter::shouldPadOperators [private]
 

bool astyle::ASFormatter::shouldPadParenthesies [private]
 

bool astyle::ASFormatter::shouldReparseCurrentChar [private]
 

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

Reimplemented from astyle::ASBeautifier.


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:37:05 2009 for ACS C++ API by doxygen 1.3.8