template<class Predicate, class Type, class ReferenceType = Type&, class PointerType = Type*>template<typename IterType, typename PredType> struct variant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::Pred< IterType, PredType >
The actual predicate is held as a template parameter here. There are two template arguments here, one for the actual type of the predicate and one for the iterator type.
Definition at line 217 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 *>::PredBasevariant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::PredBase::const_PredBase [inherited]
Definition at line 91 of file variant_filter_iterator.h.
Constructor & Destructor Documentation
template<class Predicate, class Type, class ReferenceType = Type&, class PointerType = Type*> template<typename IterType, typename PredType> variant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::Pred< IterType, PredType >::Pred (const PredType &v) [inline]Constructor
Definition at line 222 of file variant_filter_iterator.h.
:
pred_data (v) {}
template<class Predicate, class Type, class ReferenceType = Type&, class PointerType = Type*> template<typename IterType, typename PredType> virtual variant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::Pred< IterType, PredType >::~Pred () [inline, virtual]Destructor
Definition at line 228 of file variant_filter_iterator.h.
{}
Member Function Documentation
template<class Predicate, class Type, class ReferenceType = Type&, class PointerType = Type*> template<typename IterType, typename PredType> virtual PredBase* variant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::Pred< IterType, PredType >::clone () const [inline, virtual]Returns a copy of this object as a pointer to the base class.
{
#ifdef __SUNPRO_CC
variant_filter_iterator::Pred<IterType,PredType> *copy =
new variant_filter_iterator::Pred<IterType,PredType>(pred_data);
#else
Pred<IterType,PredType> *copy =
new Pred<IterType,PredType>(pred_data);
#endif
return copy;
}
template<class Predicate, class Type, class ReferenceType = Type&, class PointerType = Type*> template<typename IterType, typename PredType> virtual PredBase::const_PredBase* variant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::Pred< IterType, PredType >::const_clone () const [inline, virtual]The redefinition of the const_clone function for the Pred class. Notice the strange typename syntax required. Will it compile everywhere?
Important typedef for const_iterators. Notice the weird syntax! Does it compile everywhere?
{
libmesh_assert (in != NULL);
// Attempt downcast
const Iter<IterType>* p =
dynamic_cast<const Iter<IterType>* >(in);
// Check for failure
if ( p == NULL )
{
// std::cerr << 'Dynamic cast failed in Pred::op()' << std::endl;
// std::cerr << 'typeid(IterType).name()=' << typeid(IterType).name() << std::endl;
std::abort();
}
// Return result of op() for the user's predicate.
return pred_data(p->iter_data);
}
Member Data Documentation
template<class Predicate, class Type, class ReferenceType = Type&, class PointerType = Type*> template<typename IterType, typename PredType> PredType variant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::Pred< IterType, PredType >::pred_dataThis is the predicate passed in by the user.
Definition at line 295 of file variant_filter_iterator.h.