1 // missing resfilter:: to call these
2 %ignore zypp::ResPool::byKindBegin;
3 %ignore zypp::ResPool::byKindEnd;
4 %ignore zypp::ResPool::byNameBegin;
5 %ignore zypp::ResPool::byNameEnd;
6 %apply unsigned { zypp::ResPool::size_type };
7 %include <zypp/ResPool.h>
9 %ignore zypp::pool::operator<<;
10 %include <zypp/pool/GetResolvablesToInsDel.h>
13 typedef ::std::list<zyppPoolItem> PoolItemList;
14 %template(PoolItemList) ::std::list<PoolItem>;
22 iter2(ResPool, PoolItem);
28 iter3(ResPool, PoolItem*);
33 // ResPool::const_iterator i = self->begin();
34 // while ( i != self->end() ) {
35 // rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_PoolItem, 0));
42 void each_by_kind( const ResObject::Kind & kind_r )
44 ResPool::byKind_iterator i = self->byKindBegin( kind_r );
45 while ( i != self->byKindEnd( kind_r ) ) {
46 rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_PoolItem, 0));
53 void each_by_name( const std::string &name )
55 ResPool::byName_iterator i = self->byNameBegin( name );
56 while ( i != self->byNameEnd( name ) ) {
57 rb_yield( SWIG_NewPointerObj( (void *) &*i, $descriptor(PoolItem), 0));
66 %newobject ResPool::const_iterator(PyObject **PYTHON_SELF);
68 swig::SwigPyIterator* iterator(PyObject **PYTHON_SELF)
70 return swig::make_output_iterator(self->begin(), self->begin(),
71 self->end(), *PYTHON_SELF);
73 swig::SwigPyIterator* kinditerator(PyObject **PYTHON_SELF, const ResObject::Kind & kind_r)
75 return swig::make_output_iterator(self->byKindBegin( kind_r ), self->byKindBegin( kind_r ),
76 self->byKindEnd( kind_r ), *PYTHON_SELF);
78 swig::SwigPyIterator* nameiterator(PyObject **PYTHON_SELF, const std::string &name)
80 return swig::make_output_iterator(self->byNameBegin( name ), self->byNameBegin( name ),
81 self->byNameEnd( name ), *PYTHON_SELF);
84 def __iter__(self): return self.iterator()
85 def byKindIterator(self, kind): return self.kinditerator(kind)
86 def byNameIterator(self, name): return self.nameiterator(name)