7 #ifndef HIGHLIGHTTOKEN_H_
8 #define HIGHLIGHTTOKEN_H_
23 typedef std::list<std::pair<std::string, std::string> >
MatchedElements;
59 HighlightToken(
const std::string &elem,
const std::string &matched,
86 void addMatched(
const std::string &elem,
const std::string &s);
std::vector< std::string > MatchedSubExps
The matched subexpressions (if the original rule had subexpressions)
Definition: highlighttoken.h:28
bool prefixOnlySpaces
true if the prefix is empty or contains only spaces
Definition: highlighttoken.h:38
MatchedElements matched
the matched elements information
Definition: highlighttoken.h:44
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
const HighlightRule * rule
the matching rule
Definition: highlighttoken.h:56
std::string prefix
the possible prefix (part before the matched string)
Definition: highlighttoken.h:35
unsigned int matchedSize
the size of the whole matched sequence (this is computed automatically when matched elements are set ...
Definition: highlighttoken.h:48
void addMatched(const std::string &elem, const std::string &s)
Adds information about a matched element.
Definition: highlighttoken.cpp:32
Base class for highlight rules.
Definition: highlightrule.h:27
void clearMatched()
Resets the matched related fields (i.e., matched, matchedSize)
Definition: highlighttoken.cpp:37
Token containing information for performing the highlight.
Definition: highlighttoken.h:33
MatchedSubExps matchedSubExps
The matched subexpressions (in case the rule had subexpressions)
Definition: highlighttoken.h:53
std::string suffix
the possible suffix (part after the matched string)
Definition: highlighttoken.h:41
std::list< std::pair< std::string, std::string > > MatchedElements
The matched element information by a rule.
Definition: highlighttoken.h:17
void copyFrom(const HighlightToken &token)
Copy from the passed toke.
Definition: highlighttoken.h:67