]> git.tdb.fi Git - poefilter.git/commitdiff
Add statement to import filter definitions from another file
authorMikko Rasa <tdb@tdb.fi>
Wed, 15 Aug 2018 15:55:27 +0000 (18:55 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 15 Aug 2018 15:55:27 +0000 (18:55 +0300)
source/poefilter.cpp
source/poefilter.h

index 45995835f73ab888977f7f2e8f69a6d12efdd789..2bd9ea44dc3d3d67ed8d11232d28f3007dad3155 100644 (file)
@@ -52,6 +52,7 @@ PoeFilter::Loader::Loader(PoeFilter &f):
 {
        add("category", &Loader::category);
        add("filter", &Loader::filter);
+       add("import", &Loader::import);
        add("theme", &Loader::theme);
 }
 
@@ -69,6 +70,11 @@ void PoeFilter::Loader::filter(const string &name)
        obj.filters[name] = flt;
 }
 
+void PoeFilter::Loader::import(const string &fn)
+{
+       DataFile::load(obj, fn);
+}
+
 void PoeFilter::Loader::theme()
 {
        load_sub(obj.theme);
index dec5fd33f6ce2eb2c2db19774224813cca4ccd2e..302b153bc22d3ecb34d4cf3ca94dd46b87f714af 100644 (file)
@@ -21,6 +21,7 @@ public:
        private:
                void category(const std::string &);
                void filter(const std::string &);
+               void import(const std::string &);
                void theme();
        };