Highlights the contents of a file relying on a SourceHighlighter.
More...
#include <sourcefilehighlighter.h>
Collaboration diagram for srchilite::SourceFileHighlighter:
Public Member Functions
void setLinePrefix (const std::string &prefix)
The range separator will be automatically preformatted to deal with the specific output format.
More...
Performs the highlighting; Once the highlighting is finished, this object can be re-used.
Performs the highlighting of the contents of the given input stream; Once the highlighting is finished, this object can be re-used.
More...
Performs the highlighting of the contents of the given string; Once the highlighting is finished, this object can be re-used.
More...
Private Attributes
the name of the file to highlight
the initial regexp state
the output object
debugging policy
the preformatter for characters, e.g., for
for generation of line numbers (if not null)
if not null, it detects whether a line is in the stored ranges
if not null, it detects whether a line is in the stored ranges
the formatter for possible context lines
a prefix to be generated in front of each formatted code line
if specified, a string to be printed between two ranges
Detailed Description
Constructor & Destructor Documentation
srchilite::SourceFileHighlighter::SourceFileHighlighter
(
const std::string &
file,
)
- Parameters
-
file the name of the file to highlight; if the filename is empty then we will process the standard input
sourceHighlighter the highlighter to highlight paragraphs
output the output object used to write
Member Function Documentation
void srchilite::SourceFileHighlighter::highlight
(
std::istream &
is )
Performs the highlighting of the contents of the given input stream; Once the highlighting is finished, this object can be re-used.
- Parameters
-
is
void srchilite::SourceFileHighlighter::highlight
(
const std::string &
is )
Performs the highlighting of the contents of the given string; Once the highlighting is finished, this object can be re-used.
- Parameters
-
is
void srchilite::SourceFileHighlighter::setRangeSeparator
(
const std::string &
rangeSep )
The range separator will be automatically preformatted to deal with the specific output format.
- Parameters
-
rangeSep
The documentation for this class was generated from the following files:
- /home/bettini/work/source-highlight/src-highlite/lib/srchilite/sourcefilehighlighter.h
- /home/bettini/work/source-highlight/src-highlite/lib/srchilite/sourcefilehighlighter.cpp