Mercurial > hg > orthanc
comparison Plugins/Samples/Common/OrthancPluginCppWrapper.cpp @ 2266:a344e47e9c9a
OrthancConfiguration::LookupSetOfStrings
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 14 Feb 2017 16:03:18 +0100 |
parents | e46b0ee6c19d |
children | f915aff7a866 |
comparison
equal
deleted
inserted
replaced
2265:e46b0ee6c19d | 2266:a344e47e9c9a |
---|---|
657 } | 657 } |
658 | 658 |
659 ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat); | 659 ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat); |
660 } | 660 } |
661 | 661 |
662 | |
663 bool OrthancConfiguration::LookupSetOfStrings(std::set<std::string>& target, | |
664 const std::string& key, | |
665 bool allowSingleString) const | |
666 { | |
667 std::list<std::string> lst; | |
668 | |
669 if (LookupListOfStrings(lst, key, allowSingleString)) | |
670 { | |
671 target.clear(); | |
672 | |
673 for (std::list<std::string>::const_iterator | |
674 it = lst.begin(); it != lst.end(); ++it) | |
675 { | |
676 target.insert(*it); | |
677 } | |
678 | |
679 return true; | |
680 } | |
681 else | |
682 { | |
683 return false; | |
684 } | |
685 } | |
686 | |
662 | 687 |
663 std::string OrthancConfiguration::GetStringValue(const std::string& key, | 688 std::string OrthancConfiguration::GetStringValue(const std::string& key, |
664 const std::string& defaultValue) const | 689 const std::string& defaultValue) const |
665 { | 690 { |
666 std::string tmp; | 691 std::string tmp; |