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 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 string &sequence, bool canBreakLine=true)
void appendSpacePad ()
void breakLine ()
bool isSequenceReached (const string &sequence) const
const string * findHeader (const vector< const string * > &headers, bool checkBoundry=true)

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

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 string &  sequence,
bool  canBreakLine = true
[private]
 

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

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

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

const string* astyle::ASFormatter::findHeader const vector< const 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 string &  sequence  )  const [inline, private]
 

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

virtual 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

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

Reimplemented from astyle::ASBeautifier.

BracketMode astyle::ASFormatter::bracketFormatMode [private]
 

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 string* astyle::ASFormatter::currentHeader [private]
 

Reimplemented from astyle::ASBeautifier.

string astyle::ASFormatter::currentLine [private]
 

bool astyle::ASFormatter::doesLineStartComment [private]
 

bool astyle::ASFormatter::endOfCodeReached [private]
 

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]
 

vector<const 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]
 

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

Reimplemented from astyle::ASBeautifier.

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

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

bool astyle::ASFormatter::passedColon [private]
 

bool astyle::ASFormatter::passedSemicolon [private]
 

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

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

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

bool astyle::ASFormatter::prependEmptyLine [private]
 

vector<const 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 string* astyle::ASFormatter::previousOperator [private]
 

int astyle::ASFormatter::previousReadyFormattedLineLength [private]
 

char astyle::ASFormatter::quoteChar [private]
 

Reimplemented from astyle::ASBeautifier.

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 Sun Oct 29 02:31:37 2006 for ACS C++ API by doxygen 1.3.6