~ubuntu-branches/ubuntu/natty/newsbeuter/natty

« back to all changes in this revision

Viewing changes to include/regexmanager.h

  • Committer: Bazaar Package Importer
  • Author(s): Nico Golde
  • Date: 2010-03-23 19:09:18 UTC
  • mfrom: (4.1.10 sid)
  • Revision ID: james.westby@ubuntu.com-20100323190918-o3mwdwl3v4li449s
Tags: 2.2-2
Do not cleanup deleted items uppon quitting so they will be
reloaded and marked as new next time (Closes: #574665).

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
#include <vector>
6
6
#include <sys/types.h>
7
7
#include <regex.h>
 
8
#include <matcher.h>
8
9
#include <utility>
 
10
#include <tr1/memory>
9
11
 
10
12
namespace newsbeuter {
11
13
 
17
19
                virtual void dump_config(std::vector<std::string>& config_output);
18
20
                void quote_and_highlight(std::string& str, const std::string& location);
19
21
                void remove_last_regex(const std::string& location);
 
22
                int article_matches(matchable * item);
20
23
        private:
21
24
                typedef std::pair<std::vector<regex_t *>, std::vector<std::string> > rc_pair;
22
25
                std::map<std::string, rc_pair> locations;
23
26
                std::vector<std::string> cheat_store_for_dump_config;
 
27
                std::vector<std::pair<std::tr1::shared_ptr<matcher>, int> > matchers;
 
28
                std::string extract_initial_marker(const std::string& str);
24
29
        public:
25
30
                inline std::vector<std::string>& get_attrs(const std::string& loc) { return locations[loc].second; }
26
31
                inline std::vector<regex_t *>& get_regexes(const std::string& loc) { return locations[loc].first; }