//
/** WhatProvides implementation date.
* Stores the offset into a O terminated Id array. Per default
- * the satsolvers whatprovidesdata, otherwise private data.
+ * libsolvs whatprovidesdata, otherwise private data.
*
- * As the satsolvers whatprovidesdata might be realocated
+ * As libsolvs whatprovidesdata might be realocated
* while iterating a result, the iterator takes an
* <tt>const IdType *const*</tt>. Thats why we explicitly
* provide _private and pass its adress to the iterator,
bool WhatProvides::empty() const
{
- return _pimpl; // Ctor asserts no Impl for empty result.
+ return !_pimpl; // Ctor asserts no Impl for empty result.
}
WhatProvides::size_type WhatProvides::size() const
if ( _pimpl->_private )
return const_iterator( _pimpl->_private );
- // for satsolvers index use one more indirection, as it might get relocated.
+ // for libsolvs index use one more indirection, as it might get relocated.
return const_iterator( &myPool().getPool()->whatprovidesdata, _pimpl->_offset );
}
return dumpRange( str << "(" << obj.size() << ")", obj.begin(), obj.end() );
}
+ ///////////////////////////////////////////////////////////////////
+ namespace detail
+ { /////////////////////////////////////////////////////////////////
+
+ std::ostream & operator<<( std::ostream & str, const WhatProvidesIterator & obj )
+ {
+ str << str::form( "[%5u]", obj._offset );
+ str << str::form( "<%p(%p)>", obj.base_reference(), &obj.base_reference() );
+ str << str::form( "<%p(%p)>", obj._baseRef, (obj._baseRef ? *obj._baseRef : 0) );
+ return str;
+ }
+
+ /////////////////////////////////////////////////////////////////
+ } //namespace detail
+ ///////////////////////////////////////////////////////////////////
+
/////////////////////////////////////////////////////////////////
} // namespace sat
///////////////////////////////////////////////////////////////////