diff --git a/libwccl/values/strset.h b/libwccl/values/strset.h index 278a41c30459db8edb14e6aa4117042869dd7118..0d1082acaea6acbedbb9175e9139b71d00da33e6 100644 --- a/libwccl/values/strset.h +++ b/libwccl/values/strset.h @@ -70,6 +70,13 @@ public: return set_; } + /** + * Wrapper for boost::unordered set + */ + std::set<UnicodeString> to_std_set() const { + return std::set<UnicodeString>(this->set_.begin(), this->set_.end()); + } + void swap(StrSet& ss) { ss.set_.swap(set_); } diff --git a/swig/strset.i b/swig/strset.i index 4591c0e7a91e13684297acf823241c95176f268a..b97243db7ca166d4bd7b69e96e7acc00305115cb 100644 --- a/swig/strset.i +++ b/swig/strset.i @@ -11,9 +11,12 @@ %include "value.i" %include "std_string.i" +%include "std_set.i" %feature("notabstract") Wccl::StrSet; +%template(UnicodeStringMap) std::set<UnicodeString>; + namespace Wccl { class StrSet : public Value { public: @@ -47,6 +50,9 @@ namespace Wccl { // UnicodeString to_raw_string_u() const; + + // + std::set<UnicodeString> to_std_set() const; }; }