diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-12-24 23:05:35 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-01-10 13:35:28 +0300 |
commit | 5cee038743e1e149226d5b0b1a68a782182a4e33 (patch) | |
tree | d9d4d96074c67184c6cbf1bfbb398af88067b2c9 /mod/build-config-module.cxx | |
parent | 080c6778e89029560a6daf00605ec212ef9f39ee (diff) |
Add filter to Build Configurations page
Diffstat (limited to 'mod/build-config-module.cxx')
-rw-r--r-- | mod/build-config-module.cxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mod/build-config-module.cxx b/mod/build-config-module.cxx index 57c035f..b6b5072 100644 --- a/mod/build-config-module.cxx +++ b/mod/build-config-module.cxx @@ -335,6 +335,32 @@ namespace brep return false; } + bool build_config_module:: + belongs (const bbot::build_config& cfg, const char* cls) const + { + const map<string, string>& im (build_conf_->class_inheritance_map); + + for (const string& c: cfg.classes) + { + if (c == cls) + return true; + + // Go through base classes. + // + for (auto i (im.find (c)); i != im.end (); ) + { + const string& base (i->second); + + if (base == cls) + return true; + + i = im.find (base); + } + } + + return false; + } + path build_config_module:: dash_components_to_path (const string& s) { |