Abstract factory for highlighting rules.
More...
#include <highlightrulefactory.h>
Inheritance diagram for srchilite::HighlightRuleFactory:
Public Member Functions
Creates a generic highlighting rule.
More...
Creates a rule for detecting a list of specific words, i.e., isolated from other parts by a space or a delimiter (e.g., if "class" is considered as a word, then it will not match the substring "class" in "myclass")
More...
Creates a rule for detecting a list of specific expressions.
More...
virtual
HighlightRule *
createLineRule (const std::string &name, const std::string &start, const std::string &end, const std::string &escape, bool nested)=0
Creates a rule for matching a delimited string (spanning a single line)
More...
virtual
HighlightRule *
createMultiLineRule (const std::string &name, const std::string &start, const std::string &end, const std::string &escape, bool nested)=0
Creates a rule for matching a delimited string (possibly spanning more than one line)
More...
Creates a rule for matching many element names, each represented by a subexpression (the number of subexpression must be equal to the size of the nameList)
More...
Detailed Description
Abstract factory for highlighting rules.
Member Function Documentation
virtual
HighlightRule* srchilite::HighlightRuleFactory::createCompoundRule
(
const ElemNameList &
nameList,
const std::string &
rep
)
pure virtual
Creates a rule for matching many element names, each represented by a subexpression (the number of subexpression must be equal to the size of the nameList)
- Parameters
-
nameList the list of element names represented by the rule
rep the string representation of the rule
- Returns
- the generated rule
Implemented in srchilite::RegexRuleFactory.
virtual
HighlightRule* srchilite::HighlightRuleFactory::createLineRule
(
const std::string &
name,
const std::string &
start,
const std::string &
end,
const std::string &
escape,
bool
nested
)
pure virtual
Creates a rule for matching a delimited string (spanning a single line)
- Parameters
-
name the element name represented by the rule
start the string determining the start of the sequence
end the string determining the end of the sequence
escape the string the escape sequence (typically a char, e.g., )
nested whether the delimiters can be nested
- Returns
- the generated rule
Implemented in srchilite::RegexRuleFactory.
virtual
HighlightRule* srchilite::HighlightRuleFactory::createListRule
(
const std::string &
name,
const WordList &
list,
bool
caseSensitve = true
)
pure virtual
Creates a rule for detecting a list of specific expressions.
- Parameters
-
name the element name represented by the rule
list the list of words to detect
caseSensitive if the characters in the expression must be interpreted case sensitive
- Returns
- the generated rule
Implemented in srchilite::RegexRuleFactory.
virtual
HighlightRule* srchilite::HighlightRuleFactory::createMultiLineRule
(
const std::string &
name,
const std::string &
start,
const std::string &
end,
const std::string &
escape,
bool
nested
)
pure virtual
Creates a rule for matching a delimited string (possibly spanning more than one line)
- Parameters
-
name the element name represented by the rule
start the string determining the start of the sequence
end the string determining the end of the sequence
escape the string the escape sequence (typically a char, e.g., )
nested whether the delimiters can be nested
- Returns
- the generated rule
Implemented in srchilite::RegexRuleFactory.
virtual
HighlightRule* srchilite::HighlightRuleFactory::createSimpleRule
(
const std::string &
name,
const std::string &
s
)
pure virtual
Creates a generic highlighting rule.
- Parameters
-
name the element name represented by the rule
the string representation
- Returns
- the generated rule
Implemented in srchilite::RegexRuleFactory.
virtual
HighlightRule* srchilite::HighlightRuleFactory::createWordListRule
(
const std::string &
name,
const WordList &
list,
bool
caseSensitve = true
)
pure virtual
Creates a rule for detecting a list of specific words, i.e., isolated from other parts by a space or a delimiter (e.g., if "class" is considered as a word, then it will not match the substring "class" in "myclass")
- Parameters
-
name the element name represented by the rule
list the list of words to detect
caseSensitive if the characters in the expression must be interpreted case sensitive
- Returns
- the generated rule
Implemented in srchilite::RegexRuleFactory.
The documentation for this class was generated from the following files:
- /home/bettini/work/source-highlight/src-highlite/lib/srchilite/highlightrulefactory.h
- /home/bettini/work/source-highlight/src-highlite/lib/srchilite/highlightrulefactory.cpp