Source-highlight Library
Public Member Functions | Private Attributes | List of all members
srchilite::LineNumGenerator Class Reference

Generates line numbers in the output. More...

#include <linenumgenerator.h>

Collaboration diagram for srchilite::LineNumGenerator:
Collaboration graph
[legend]

Public Member Functions

  LineNumGenerator (const TextStyle &lineStyle, unsigned int digitNum, char padding= '0')
 
void  setAnchorStyle (const TextStyle &_anchorStyle)
 
void  setAnchorPrefix (const std::string &_anchorLinePrefix)
 
void  setDigitNum (unsigned int _digitNum)
 
const std::string  generateLine (unsigned int line)
  Generates a string representing the formatting of the passed line number. More...
 

Private Attributes

unsigned int  digitNum
  number of digits to represent line number
 
char  padding
  character to use for padding the line number
 
  for actually formatting the line number
 
  for possible line anchor generation (can be null)
 
std::string  anchorLinePrefix
  when generating an anchor for a line, use this prefix for the anchor name
 

Detailed Description

Generates line numbers in the output.

Member Function Documentation

const std::string srchilite::LineNumGenerator::generateLine ( unsigned int  line )

Generates a string representing the formatting of the passed line number.

Parameters
line
Returns
the formatted line

The documentation for this class was generated from the following files:
  • /home/bettini/work/source-highlight/src-highlite/lib/srchilite/linenumgenerator.h
  • /home/bettini/work/source-highlight/src-highlite/lib/srchilite/linenumgenerator.cpp

AltStyle によって変換されたページ (->オリジナル) /