]> git.tdb.fi Git - poefilter.git/blob - source/poefilter.h
Initial version from when I last played
[poefilter.git] / source / poefilter.h
1 #ifndef POEFILTER_H_
2 #define POEFILTER_H_
3
4 #include <map>
5 #include <string>
6 #include <msp/core/application.h>
7 #include <msp/strings/regex.h>
8 #include "theme.h"
9
10 class Category;
11 class Filter;
12
13 class PoeFilter: public Msp::RegisteredApplication<PoeFilter>
14 {
15 public:
16         class Loader: public Msp::DataFile::ObjectLoader<PoeFilter>
17         {
18         public:
19                 Loader(PoeFilter &);
20
21         private:
22                 void category(const std::string &);
23                 void filter(const std::string &);
24                 void theme();
25         };
26
27 private:
28         std::string filename;
29         Theme theme;
30         std::map<std::string, Category> categories;
31         std::map<std::string, Filter> filters;
32
33 public:
34         PoeFilter(int, char **);
35
36         virtual int main();
37
38         const Category &get_category(const std::string &) const;
39         void find_categories(const Msp::Regex &, std::list<const Category *> &) const;
40         const Filter &get_filter(const std::string &) const;
41 };
42
43 #endif