BDE 4.14.0 Production release
|
#include <bdlb_transformiterator.h>
Public Types | |
typedef bslmf::ResultType< FUNCTOR >::type | ResultType |
typedef bsl::iterator_traits< ITERATOR > | BaseIteratorTraits |
Define the iterator traits class of the underlying iterator. | |
typedef bsl::conditional< bsl::is_reference< ResultType >::value, typenameBaseIteratorTraits::iterator_category, bsl::input_iterator_tag >::type | iterator_category |
typedef bsl::remove_cv< typenamebsl::remove_reference< ResultType >::type >::type | value_type |
typedef BaseIteratorTraits::difference_type | difference_type |
typedef bsl::remove_reference< ResultType >::type * | pointer |
typedef ResultType | reference |
Define the remaining standard types of the transform iterator. | |
This component-private class defines various types that are used in the implementation of the transform iterator.
typedef bsl::iterator_traits<ITERATOR> bdlb::TransformIterator_Traits< FUNCTOR, ITERATOR >::BaseIteratorTraits |
typedef BaseIteratorTraits::difference_type bdlb::TransformIterator_Traits< FUNCTOR, ITERATOR >::difference_type |
typedef bsl::conditional<bsl::is_reference<ResultType>::value,typenameBaseIteratorTraits::iterator_category,bsl::input_iterator_tag>::type bdlb::TransformIterator_Traits< FUNCTOR, ITERATOR >::iterator_category |
Define the iterator category of the transform iterator. If the functor returns a reference type, we pass through the iterator category of the underlying iterator, otherwise we use the input iterator tag (because all the other tags require that dereferencing produces a reference).
typedef bsl::remove_reference<ResultType>::type* bdlb::TransformIterator_Traits< FUNCTOR, ITERATOR >::pointer |
typedef ResultType bdlb::TransformIterator_Traits< FUNCTOR, ITERATOR >::reference |
typedef bslmf::ResultType<FUNCTOR>::type bdlb::TransformIterator_Traits< FUNCTOR, ITERATOR >::ResultType |
Define the result type returned by the functor. This is not necessarily the same type as the dereference of the iterator. In C++03, the functor must have a result_type
type member. The specializations below transform function pointers to bsl::function
so this works for those types as well.
typedef bsl::remove_cv<typenamebsl::remove_reference<ResultType>::type>::type bdlb::TransformIterator_Traits< FUNCTOR, ITERATOR >::value_type |