highlight::PreFormatter Class Reference

Class which provides intelligent line wrapping. More...

List of all members.

Public Member Functions

void setWrap (bool wrap)
void setReplaceTabs (bool replTabs)
bool hasMoreLines ()
void setLine (const std::string &newline)
std::string getNextLine ()
bool indentCode ()
void setWrapLineLength (unsigned int maxlength)
void setWrapIndentBraces (bool indentAfterOpenBraces=true)
void setNumberSpaces (unsigned int num)
bool isEnabled ()
void reset ()
bool isWrappedLine (int lineNumber)


Detailed Description

Class which provides intelligent line wrapping.

Author:
Andre Simon

Member Function Documentation

std::string highlight::PreFormatter::getNextLine (  ) 

The method will indent function calls and statements

Returns:
Next line

bool highlight::PreFormatter::hasMoreLines (  ) 

Returns:
True if current line can be wrapped again

bool highlight::PreFormatter::indentCode (  ) 

Returns:
True if lines following open braces should be indented

bool highlight::PreFormatter::isEnabled (  )  [inline]

Returns:
true if preformatting is enabled

bool highlight::PreFormatter::isWrappedLine ( int  lineNumber  )  [inline]

Parameters:
lineNumber line number
Returns:
true if input line linenumber was wrapped

void highlight::PreFormatter::reset (  )  [inline]

reset preformatting state to use the object with new input data

void highlight::PreFormatter::setLine ( const std::string &  newline  ) 

Sets new line to be wrapped

Parameters:
newline New line

void highlight::PreFormatter::setNumberSpaces ( unsigned int  num  ) 

Number of spaces

Parameters:
num number of spaces which replace a tab

Referenced by highlight::CodeGenerator::setPreformatting().

void highlight::PreFormatter::setReplaceTabs ( bool  replTabs  )  [inline]

Replace tabs by spaces

Parameters:
replTabs set to true if tabs should be replaced by spaces

Referenced by highlight::CodeGenerator::setPreformatting().

void highlight::PreFormatter::setWrap ( bool  wrap  )  [inline]

Set wrapping mode

Parameters:
wrap set to true if long lines should be wrapped

Referenced by highlight::CodeGenerator::setPreformatting().

void highlight::PreFormatter::setWrapIndentBraces ( bool  indentAfterOpenBraces = true  ) 

Indentation mode

Parameters:
indentAfterOpenBraces set true if lines should be indented after braces

Referenced by highlight::CodeGenerator::setPreformatting().

void highlight::PreFormatter::setWrapLineLength ( unsigned int  maxlength  ) 

Maximum line length

Parameters:
maxlength max. length of output lines

Referenced by highlight::CodeGenerator::setPreformatting().


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

Generated on Wed Jun 9 21:34:17 2010 for Highlight Code Converter by  doxygen 1.5.7.1