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