Source-highlight Library
regexrulefactory.h
1 //
2 // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008
3 //
4 // Copyright: See COPYING file that comes with this distribution
5 //
6 
7 #ifndef REGEXRULEFACTORY_H_
8 #define REGEXRULEFACTORY_H_
9 
10 #include "highlightrulefactory.h"
11 
12 namespace srchilite {
13 
19 public:
21  virtual ~RegexRuleFactory();
22 
23  virtual HighlightRule *createSimpleRule(const std::string &name,
24  const std::string &s);
25 
26  virtual HighlightRule *createWordListRule(const std::string &name,
27  const WordList &list, bool caseSensitve = true);
28 
29  virtual HighlightRule *createListRule(const std::string &name,
30  const WordList &list, bool caseSensitve = true);
31 
32  virtual HighlightRule *createLineRule(const std::string &name,
33  const std::string &start, const std::string &end,
34  const std::string &escape = "", bool nested = false);
35 
36  virtual HighlightRule *createMultiLineRule(const std::string &name,
37  const std::string &start, const std::string &end,
38  const std::string &escape, bool nested);
39 
40  virtual HighlightRule *createCompoundRule(const ElemNameList &nameList,
41  const std::string &rep);
42 };
43 
44 }
45 
46 #endif /*REGEXRULEFACTORY_H_*/
virtual HighlightRule * createMultiLineRule(const std::string &name, const std::string &start, const std::string &end, const std::string &escape, bool nested)
Creates a rule for matching a delimited string (possibly spanning more than one line) ...
Definition: regexrulefactory.cpp:124
virtual HighlightRule * createWordListRule(const std::string &name, const WordList &list, bool caseSensitve=true)
Creates a rule for detecting a list of specific words, i.e., isolated from other parts by a space or ...
Definition: regexrulefactory.cpp:52
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
Abstract factory for highlighting rules.
Definition: highlightrulefactory.h:23
virtual HighlightRule * createCompoundRule(const ElemNameList &nameList, const std::string &rep)
Creates a rule for matching many element names, each represented by a subexpression (the number of su...
Definition: regexrulefactory.cpp:170
virtual HighlightRule * createListRule(const std::string &name, const WordList &list, bool caseSensitve=true)
Creates a rule for detecting a list of specific expressions.
Definition: regexrulefactory.cpp:71
virtual HighlightRule * createSimpleRule(const std::string &name, const std::string &s)
Creates a generic highlighting rule.
Definition: regexrulefactory.cpp:47
Implementation of the abstract factory, creating highlighting rules based on boost::regex regular exp...
Definition: regexrulefactory.h:18
Base class for highlight rules.
Definition: highlightrule.h:27
virtual HighlightRule * createLineRule(const std::string &name, const std::string &start, const std::string &end, const std::string &escape="", bool nested=false)
Creates a rule for matching a delimited string (spanning a single line)
Definition: regexrulefactory.cpp:81