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 #if (BOOST_VERSION >= 106501)
7 %ignore zypp::ResPool::byStatus;
8 %ignore zypp::ResPool::byStatusBegin;
9 %ignore zypp::ResPool::byStatusEnd;
11 %apply unsigned { zypp::ResPool::size_type };
12 %include <zypp/ResPool.h>
14 %ignore zypp::pool::operator<<;
15 %include "legacy/GetResolvablesToInsDel.h"
18 typedef ::std::list<zyppPoolItem> PoolItemList;
19 %template(PoolItemList) ::std::list<PoolItem>;
27 iter2(ResPool, PoolItem);
33 iter3(ResPool, zypp::PoolItem*);
38 // ResPool::const_iterator i = self->begin();
39 // while ( i != self->end() ) {
40 // rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_zypp__PoolItem, 0));
47 void each_by_kind( const ResKind & kind_r )
49 ResPool::byKind_iterator i = self->byKindBegin( kind_r );
50 while ( i != self->byKindEnd( kind_r ) ) {
51 rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_zypp__PoolItem, 0));
58 void each_by_name( const std::string &name )
60 ResPool::byName_iterator i = self->byNameBegin( name );
61 while ( i != self->byNameEnd( name ) ) {
62 rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_zypp__PoolItem, 0));
71 %newobject ResPool::const_iterator(PyObject **PYTHON_SELF);
73 #if SWIG_VERSION > 0x010336
74 swig::SwigPyIterator* iterator(PyObject **PYTHON_SELF)
76 swig::PySwigIterator* iterator(PyObject **PYTHON_SELF)
79 return swig::make_output_iterator(self->begin(), self->begin(),
80 self->end(), *PYTHON_SELF);
82 #if SWIG_VERSION > 0x010336
83 swig::SwigPyIterator* kinditerator(PyObject **PYTHON_SELF, const ResObject::Kind & kind_r)
85 swig::PySwigIterator* kinditerator(PyObject **PYTHON_SELF, const ResObject::Kind & kind_r)
88 return swig::make_output_iterator(self->byKindBegin( kind_r ), self->byKindBegin( kind_r ),
89 self->byKindEnd( kind_r ), *PYTHON_SELF);
91 #if SWIG_VERSION > 0x010336
92 swig::SwigPyIterator* nameiterator(PyObject **PYTHON_SELF, const std::string &name)
94 swig::PySwigIterator* nameiterator(PyObject **PYTHON_SELF, const std::string &name)
97 return swig::make_output_iterator(self->byNameBegin( name ), self->byNameBegin( name ),
98 self->byNameEnd( name ), *PYTHON_SELF);
101 def __iter__(self): return self.iterator()
102 def byKindIterator(self, kind): return self.kinditerator(kind)
103 def byNameIterator(self, name): return self.nameiterator(name)