From: Mikko Rasa Date: Wed, 15 Aug 2018 15:55:27 +0000 (+0300) Subject: Add statement to import filter definitions from another file X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=2cfafa2ad7ec8069247138b81982a10dea4b812a;p=poefilter.git Add statement to import filter definitions from another file --- diff --git a/source/poefilter.cpp b/source/poefilter.cpp index 4599583..2bd9ea4 100644 --- a/source/poefilter.cpp +++ b/source/poefilter.cpp @@ -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); diff --git a/source/poefilter.h b/source/poefilter.h index dec5fd3..302b153 100644 --- a/source/poefilter.h +++ b/source/poefilter.h @@ -21,6 +21,7 @@ public: private: void category(const std::string &); void filter(const std::string &); + void import(const std::string &); void theme(); };