%mixin cls "Enumerable"; \
%extend cls { \
void each() { \
- cls::iterator i = self->begin(); \
+ cls::const_iterator i = self->begin(); \
while ( i != self->end() ) { \
const storetype tmp = &**i; \
rb_yield( SWIG_NewPointerObj( (void*) tmp, $descriptor(storetype), 0)); \
%mixin cls "Enumerable"; \
%extend cls { \
void each() { \
- cls::iterator i = self->begin(); \
+ cls::const_iterator i = self->begin(); \
while ( i != self->end() ) { \
const storetype tmp = &*i; \
rb_yield( SWIG_NewPointerObj( (void*) tmp, $descriptor(storetype), 0)); \
}
}
-%extend ResPool {
- void each()
- {
- ResPool::const_iterator i = self->begin();
- while ( i != self->end() ) {
- rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_PoolItem_Ref, 0));
- ++i;
- }
- }
-}
+// %extend ResPool {
+// void each()
+// {
+// ResPool::const_iterator i = self->begin();
+// while ( i != self->end() ) {
+// rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_PoolItem_Ref, 0));
+// ++i;
+// }
+// }
+// }
%extend ResPool {
void each_by_kind( const ResObject::Kind & kind_r )
/* define iterators using swig macros */
iter2( ResStore, ResObject* )
iter3( CapSet, Capability* )
+iter3(ResPool, PoolItem_Ref*)
auto_iterator( std::list<RepoInfo>, RepoInfo )
#endif