]> git.tdb.fi Git - poefilter.git/blob - source/poefilter.h
Correctly merge icon and light beam appearances
[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 import(const std::string &);
25                 void theme();
26         };
27
28 private:
29         std::string filename;
30         Theme theme;
31         std::map<std::string, Category> categories;
32         std::map<std::string, Filter> filters;
33
34 public:
35         PoeFilter(int, char **);
36
37         virtual int main();
38
39         const Theme &get_theme() const { return theme; }
40         const Category &get_category(const std::string &) const;
41         void find_categories(const Msp::Regex &, std::vector<const Category *> &) const;
42         const Filter &get_filter(const std::string &) const;
43 };
44
45 #endif