13 #ifndef SOURCEFILEHIGHLIGHTER_H_
14 #define SOURCEFILEHIGHLIGHTER_H_
21 class SourceHighlighter;
24 class LineNumGenerator;
31 NO_DEBUG = 0, DEBUG, DEBUG_INTERACTIVE
89 void setContextFormatter(Formatter *cf) {
90 contextFormatter = cf;
93 void setLineNumGenerator(LineNumGenerator *lG) {
94 lineNumGenerator = lG;
97 void setLinePrefix(
const std::string &prefix) {
109 const LineRanges *getLineRanges()
const {
113 void setLineRanges(LineRanges *lr) {
117 void setRegexRanges(RegexRanges *rr) {
Stores possible separators implemented as regular expressions and provides functionalities to search ...
Definition: regexranges.h:22
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
Generates line numbers in the output.
Definition: linenumgenerator.h:19
RegexRanges * regexRanges
if not null, it detects whether a line is in the stored ranges
Definition: sourcefilehighlighter.h:60
void setRangeSeparator(const std::string &rangeSep)
The range separator will be automatically preformatted to deal with the specific output format...
Definition: sourcefilehighlighter.cpp:66
SourceFileHighlighter(const std::string &file, SourceHighlighter *sourceHighlighter, BufferedOutput *output)
Definition: sourcefilehighlighter.cpp:43
void highlight()
Performs the highlighting; Once the highlighting is finished, this object can be re-used.
Definition: sourcefilehighlighter.cpp:74
Highlights the contents of a file relying on a SourceHighlighter.
Definition: sourcefilehighlighter.h:37
const std::string fileName
the name of the file to highlight
Definition: sourcefilehighlighter.h:39
LineRanges * lineRanges
if not null, it detects whether a line is in the stored ranges
Definition: sourcefilehighlighter.h:57
The main class performing the highlighting of a single line.
Definition: sourcehighlighter.h:43
Functionalities for detecting whether a line is in one of the stored line ranges (or in the context o...
Definition: lineranges.h:38
LineNumGenerator * lineNumGenerator
for generation of line numbers (if not null)
Definition: sourcefilehighlighter.h:54
PreFormatter * preformatter
the preformatter for characters, e.g., for
Definition: sourcefilehighlighter.h:51
FileHighlighterDebug debugPolicy
debugging policy
Definition: sourcefilehighlighter.h:48
FileHighlighterDebug
debugging policy
Definition: sourcefilehighlighter.h:30
The main class for writing into the output.
Definition: bufferedoutput.h:28
std::string linePrefix
a prefix to be generated in front of each formatted code line
Definition: sourcefilehighlighter.h:66
std::string rangeSeparator
if specified, a string to be printed between two ranges
Definition: sourcefilehighlighter.h:69
Formatter * contextFormatter
the formatter for possible context lines
Definition: sourcefilehighlighter.h:63
SourceHighlighter * sourceHighlighter
the initial regexp state
Definition: sourcefilehighlighter.h:42
BufferedOutput * output
the output object
Definition: sourcefilehighlighter.h:45