summaryrefslogtreecommitdiff
path: root/swig/PoolItem.i
blob: 34a2eeb75bad7748f55b5c155748f4d6c6d5d432 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
%include <zypp/PoolItem.h>

#ifdef SWIGPERL5
#else
%template(PoolItemSet) std::set<zypp::PoolItem>;
#endif

%extend zypp::PoolItem
{
#ifdef SWIGPYTHON
%rename ("__str__") string();
#endif
#ifdef SWIGRUBY
%rename ("to_s") string();
#endif

  std::string string() const
  {
    std::ostringstream str;
    str << *self;
    return str.str();
  }
}