From 2cfafa2ad7ec8069247138b81982a10dea4b812a Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 15 Aug 2018 18:55:27 +0300 Subject: [PATCH] Add statement to import filter definitions from another file --- source/poefilter.cpp | 6 ++++++ source/poefilter.h | 1 + 2 files changed, 7 insertions(+) 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(); }; -- 2.45.2