template<class Predicate, class Type, class ReferenceType = Type&, class PointerType = Type*>template<typename IterType> struct variant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::Iter< IterType >
The actual iterator object is held as a template parameter here.
Definition at line 105 of file variant_filter_iterator.h.
Member Typedef Documentation
template<class Predicate, class Type, class ReferenceType = Type&, class PointerType = Type*> typedef variant_filter_iterator<Predicate, Type const, Type const & , Type const*>::IterBasevariant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::IterBase::const_IterBase [inherited]
Definition at line 70 of file variant_filter_iterator.h.
Constructor & Destructor Documentation
template<class Predicate, class Type, class ReferenceType = Type&, class PointerType = Type*> template<typename IterType> variant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::Iter< IterType >::Iter (const IterType &v) [inline]Constructor
Definition at line 111 of file variant_filter_iterator.h.
{
#ifdef __SUNPRO_CC
variant_filter_iterator::Iter<IterType> *copy =
new variant_filter_iterator::Iter<IterType>(iter_data);
#else
Iter<IterType> *copy =
new Iter<IterType>(iter_data);
#endif
return copy;
}
template<class Predicate, class Type, class ReferenceType = Type&, class PointerType = Type*> template<typename IterType> virtual IterBase::const_IterBase* variant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::Iter< IterType >::const_clone () const [inline, virtual]Returns a copy of this object as a pointer to a different type of object.
Important typedef for const_iterators. Notice the weird syntax! Does it compile everywhere?
{
// typedef typename variant_filter_iterator<Predicate, Type, const Type&, const Type*>::template Iter<IterType> const_Iter;
typedef typename variant_filter_iterator<Predicate, Type const, Type const &, Type const *>::template Iter<IterType> const_Iter;
typename IterBase::const_IterBase* copy =
new const_Iter(iter_data);
return copy;
}
template<class Predicate, class Type, class ReferenceType = Type&, class PointerType = Type*> template<typename IterType> virtual bool variant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::Iter< IterType >::equal (const IterBase *other) const [inline, virtual]Use dynamic_cast to convert the base pointer passed in to the derived type. If the cast fails it means you compared two different derived classes.
template<class Predicate, class Type, class ReferenceType = Type&, class PointerType = Type*> template<typename IterType> IterType variant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::Iter< IterType >::iter_dataThis is the iterator passed by the user.
Definition at line 205 of file variant_filter_iterator.h.