
Joaquin M Lopez Munoz wrote:
Dan Bloomquist
writes: Not sure whether this is what you'r after, but have you considered using adobe::any_iterator?
http://stlab.adobe.com/classadobe_1_1any__iterator.html
adobe::any_iterator is a polymorphic iterator wrapper so that you can use it to handle at run-time any iterator with the specified category (bidirectional, foward, etc.) Kind of like boost::any for general objects, but already specialized for the iterator interface.
Hi Joaquin,
Thank you for the link. I'm on tangents right now but have/will look
over these adobe headers. I have attempted to write my own based on
itereator_facade. I've gotten all the members to work except for
dereferance. I've looked every example I can find where it works, but in
my case some iterator base gets called which is invalid. I've even tried
overriding the arrow operator. In that case I land in operators.hhp with:
template
{ friend class boost::iterator_core_access; friend RaOrderRecords; //container RaOrderRecords* pParent; //this index RsOrderIndex::RecOrderIndex index; //iterators for proxy SP_it_adaptor_container spIterators; public: //base( ) const { return *this; } RaOrderRecordsIt( RaOrderRecords* pPrnt, RsOrderIndex::RecOrderIndex inIdx ); RaOrderRecordsIt( ) :pParent( NULL )//for asserts { } void increment( );// { } bool equal( const RaOrderRecordsIt& f2 ) const; ord_record_item const& dereference( ) const; //ord_record_item& dereference( ) const; const ord_record_item* operator->( ) const; RaOrderRecordsIt begin( ); RaOrderRecordsIt end( ); };