34a2eeb75bad7748f55b5c155748f4d6c6d5d432
[platform/upstream/libzypp-bindings.git] / swig / PoolItem.i
1 %include <zypp/PoolItem.h>
2
3 #ifdef SWIGPERL5
4 #else
5 %template(PoolItemSet) std::set<zypp::PoolItem>;
6 #endif
7
8 %extend zypp::PoolItem
9 {
10 #ifdef SWIGPYTHON
11 %rename ("__str__") string();
12 #endif
13 #ifdef SWIGRUBY
14 %rename ("to_s") string();
15 #endif
16
17   std::string string() const
18   {
19     std::ostringstream str;
20     str << *self;
21     return str.str();
22   }
23 }