1 /*
2 * regexranges.h
3 *
4 * Created on: Apr 11, 2009
5 * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2008
6 * Copyright: See COPYING file that comes with this distribution
7 */
8
9 #ifndef REGEXRANGES_H_
10 #define REGEXRANGES_H_
11
12 #include <string>
13 #include <list>
14 #include <boost/regex.hpp>
15
17
23 public:
26
27 typedef std::list<boost::regex> RegexRangesType;
28
37
43 }
44
51 const boost::regex *
matches(
const std::string &line);
52
58
66 }
67
68 private:
71
80 };
81
82 }
83
84 #endif /* REGEXRANGES_H_ */
bool isInRange(const std::string &line)
Definition: regexranges.cpp:47
Stores possible separators implemented as regular expressions and provides functionalities to search ...
Definition: regexranges.h:22
bool addRegexRange(const std::string &s)
Adds a regular expression range, specified by the passed string.
Definition: regexranges.cpp:26
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
RegexRangesType ranges
the actual collection of regular expressions for ranges
Definition: regexranges.h:70
void clear()
Removes all the added expressions.
Definition: regexranges.h:41
void reset()
The next isInRange search will start from the first element of the list.
Definition: regexranges.h:64
const boost::regex * currentRegex
if set, it represents the matched regular expression up to now.
Definition: regexranges.h:79
const boost::regex * matches(const std::string &line)
Checks whether one of the stored regular expression can be found in the passed string line...
Definition: regexranges.cpp:36