00001
00002
00003
00004
00005
00006
00007 #ifndef HIGHLIGHTRULEFACTORY_H_
00008 #define HIGHLIGHTRULEFACTORY_H_
00009
00010 #include <list>
00011 #include <string>
00012
00013 namespace srchilite {
00014
00015 typedef std::list<std::string> WordList;
00016 typedef std::list<std::string> ElemNameList;
00017
00018 class HighlightRule;
00019
00023 class HighlightRuleFactory {
00024 public:
00025 HighlightRuleFactory();
00026 virtual ~HighlightRuleFactory();
00027
00034 virtual HighlightRule *createSimpleRule(const std::string &name,
00035 const std::string &s) = 0;
00036
00047 virtual HighlightRule *createWordListRule(const std::string &name,
00048 const WordList &list, bool caseSensitve = true) = 0;
00049
00058 virtual HighlightRule *createListRule(const std::string &name,
00059 const WordList &list, bool caseSensitve = true) = 0;
00060
00070 virtual HighlightRule *createLineRule(const std::string &name,
00071 const std::string &start, const std::string &end,
00072 const std::string &escape, bool nested) = 0;
00073
00083 virtual HighlightRule *createMultiLineRule(const std::string &name,
00084 const std::string &start, const std::string &end,
00085 const std::string &escape, bool nested) = 0;
00086
00095 virtual HighlightRule *createCompoundRule(const ElemNameList &nameList,
00096 const std::string &rep) = 0;
00097
00098 };
00099
00100 }
00101
00102 #endif