From 65676215ccd707c0e11554246454ce8d51e2797a Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Sun, 15 Jul 2018 10:24:57 -0500 Subject: [PATCH] added getBool() to Slic3r::Config interface. --- xs/src/libslic3r/Config.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xs/src/libslic3r/Config.hpp b/xs/src/libslic3r/Config.hpp index dafe75f93..8f741a1ab 100644 --- a/xs/src/libslic3r/Config.hpp +++ b/xs/src/libslic3r/Config.hpp @@ -68,6 +68,10 @@ public: if (print_config_def.options.count(opt_key) == 0) throw InvalidOptionType(opt_key + std::string(" is an invalid option.")); return (dynamic_cast(this->_config.optptr(opt_key, create)))->getInt(); } + bool getBool(const t_config_option_key& opt_key, bool create=true) { + if (print_config_def.options.count(opt_key) == 0) throw InvalidOptionType(opt_key + std::string(" is an invalid option.")); + return (dynamic_cast(this->_config.optptr(opt_key, create)))->getBool(); + } std::string getString(const t_config_option_key& opt_key, bool create=true) { if (print_config_def.options.count(opt_key) == 0) throw InvalidOptionType(opt_key + std::string(" is an invalid option.")); return (dynamic_cast(this->_config.optptr(opt_key, create)))->getString();