This library defines iterator adaptors that extend the STL.
The STL-iterators provided by the STLSoft libraries include:
Classes | |
struct | adapted_iterator_traits |
Traits for adapted_iterator_traits. More... | |
struct | select_first |
Selects the first member of the type to which it is applied. More... | |
struct | select_second |
Selects the first second of the type to which it is applied. More... | |
class | associative_select_iterator |
An iterator adaptor that uses a select functor on its base iterator in order to obtain the value_type. More... | |
struct | c_str_ptr_extract_iterator |
This iterator adaptor translates the values assigned to it via the c_str_ptr access shim, and passes the result to the function on which it's parameterised. More... | |
class | contiguous_diluter_iterator |
An iterator adaptor class for use with Contiguous Iterators, to dilute the iterator category to BiDirectional or lesser. More... | |
class | cstring_concatenator_iterator |
This output iterator adaptor template wraps a C-style string pointer as an output iterator, to enable a C-style string to be built up as a result of the application of an algorithm. More... | |
class | filter_iterator |
An iterator adaptor that uses a predicate to filter desired values from the iterator's underlying sequence. More... | |
class | indirect_reverse_iterator |
This class template provides the same services as std::reverse_iterator, but uses pointers in order to facilitate reverse adaptation of incompletely defined types, such as forward-declared member classes. More... | |
class | member_selector_iterator |
An iterator adaptor class template that presents a member of the underlying iterator's value type as the apparent value type. More... | |
struct | msi_traits |
Traits class used for specifying sub-types for the member_selector() creator function(s). More... | |
class | null_output_iterator |
Null Object pattern applied to the Output Iterator concept. More... | |
class | ostream_iterator |
Enhanced functionality over std::ostream_iterator. More... | |
class | string_concatenator_iterator |
This output iterator adaptor template wraps a C-style string pointer as an output iterator, to enable a C-style string to be built up as a result of the application of an algorithm. More... | |
class | transform_iterator |
An iterator adaptor that uses a predicate to filter desired values from the iterator's underlying sequence. More... | |
struct | unary_function_output_iterator_adaptor |
This class adapts a Unary Function into an OutputIterator, using CRTP/SCTP. More... | |
Functions | |
template<typename F> | |
c_str_ptr_extract_iterator< F > | c_str_inserter (F &f) |
Creates an instance of the c_str insert iterator. | |
template<typename F> | |
c_str_ptr_extract_iterator< F > | c_str_ptr_inserter (F &f) |
[DEPRECATED] Creates an instance of the c_str insert iterator. | |
template<typename C> | |
cstring_concatenator_iterator< C > | make_cstring_concatenator_iterator (C *s, size_t *pNumWritten=NULL) |
Creator function for cstring_concatenator_iterator. | |
template<typename C> | |
cstring_concatenator_iterator< C > | cstring_concatenator (C *s, size_t *pNumWritten=NULL) |
Creates an instance of the cstring_concatenator_iterator from the given c-string pointer. | |
template<typename I, typename P> | |
filter_iterator< I, P > | make_filter_iterator (I from, I to, P pr) |
Creator function for filter_iterator. | |
template<typename I, typename P> | |
filter_iterator< I, P > | filter (I from, I to, P pr) |
Creator function for filter_iterator. | |
template<typename I, typename TF, typename FP> | |
filter_iterator < transform_iterator< I, TF > , FP > | make_filter_transform_iterator (I from, I to, FP pr, TF fn) |
Creator function for filter_iterator + transform_iterator. | |
template<typename I, typename TF, typename FP> | |
filter_iterator < transform_iterator< I, TF > , FP > | filter_transformer (I from, I to, FP pr, TF fn) |
Creator function for filter_iterator + transform_iterator. | |
template<typename I> | |
index_iterator< I > | make_index_iterator (I it, ss_ptrdiff_t index=0) |
Creator function for index_iterator. | |
template<typename I> | |
index_iterator< I > | indexer (I it, ss_ptrdiff_t index=0) |
Creator function for index_iterator. | |
template<typename I, class C, typename M> | |
ss_typename_type_ret_k msi_traits< I, C, M >::type | member_selector (I it, M C::*member) |
Creator function for member_selector_iterator. | |
template<typename S, typename D> | |
string_concatenator_iterator < S, D > | make_string_concatenator_iterator (S &s, D const &delim) |
Creator function for string_concatenator_iterator. | |
template<typename S, typename D> | |
string_concatenator_iterator < S, D > | string_concatenator (S &s, D const &delim) |
Creator function for string_concatenator_iterator. | |
template<typename I, typename TF, typename FP> | |
transform_iterator < filter_iterator< I, FP >, TF > | make_transform_filter_iterator (I from, I to, TF fn, FP pr) |
Creator function for transform_iterator + filter_iterator. | |
template<typename I, typename TF, typename FP> | |
transform_iterator < filter_iterator< I, FP >, TF > | transform_filter (I from, I to, TF fn, FP pr) |
Creator function for transform_iterator + filter_iterator. | |
template<typename I, typename F> | |
transform_iterator< I, F > | make_transform_iterator (I it, F fn) |
Creator function for transform_iterator. | |
template<typename I, typename F> | |
transform_iterator< I, F > | transformer (I it, F fn) |
Creator function for transform_iterator. |
c_str_ptr_extract_iterator<F> stlsoft::c_str_inserter | ( | F & | f | ) | [inline] |
Creates an instance of the c_str insert iterator.
c_str_ptr_extract_iterator<F> stlsoft::c_str_ptr_inserter | ( | F & | f | ) | [inline] |
[DEPRECATED] Creates an instance of the c_str insert iterator.
cstring_concatenator_iterator<C> stlsoft::cstring_concatenator | ( | C * | s, | |
size_t * | pNumWritten = NULL | |||
) | [inline] |
Creates an instance of the cstring_concatenator_iterator from the given c-string pointer.
s | The C-string which in which will be written the results of the application of the iterator's dereference. May not be NULL | |
pNumWritten | An optional paramter to receive a count of how many bytes were written by the iterator. Note: the variable pointed to by this parameter is not set to 0 by the concatenator class. It must be initialised in by the caller |
References stlsoft::make_cstring_concatenator_iterator().
filter_iterator<I, P> stlsoft::filter | ( | I | from, | |
I | to, | |||
P | pr | |||
) | [inline] |
Creator function for filter_iterator.
from | The iterator marking the start of the range to filter | |
to | The iterator marking (one past) the end of the range to filter | |
pr | The predicate used to filter the underlying range |
References stlsoft::make_filter_iterator().
Referenced by stlsoft::make_filter_transform_iterator(), and stlsoft::make_transform_filter_iterator().
filter_iterator<transform_iterator<I, TF>, FP> stlsoft::filter_transformer | ( | I | from, | |
I | to, | |||
FP | pr, | |||
TF | fn | |||
) | [inline] |
Creator function for filter_iterator + transform_iterator.
from | The start of the iterator range to be transformed | |
to | The endpoint of the iterator range to be transformed | |
pr | The predicate used to filter the underlying range | |
fn | The function object used to effect the transformation |
References stlsoft::make_filter_transform_iterator().
index_iterator<I> stlsoft::indexer | ( | I | it, | |
ss_ptrdiff_t | index = 0 | |||
) | [inline] |
Creator function for index_iterator.
it | The iterator to index | |
index | The initial index of the iterator. Defaults to 0 |
References stlsoft::make_index_iterator().
cstring_concatenator_iterator<C> stlsoft::make_cstring_concatenator_iterator | ( | C * | s, | |
size_t * | pNumWritten = NULL | |||
) | [inline] |
Creator function for cstring_concatenator_iterator.
s | Pointer to the string buffer into which elements will be concatenated | |
pNumWritten | Optional pointer to receive the number of characters written to the buffer |
Referenced by stlsoft::cstring_concatenator().
filter_iterator<I, P> stlsoft::make_filter_iterator | ( | I | from, | |
I | to, | |||
P | pr | |||
) | [inline] |
Creator function for filter_iterator.
from | The iterator marking the start of the range to filter | |
to | The iterator marking (one past) the end of the range to filter | |
pr | The predicate used to filter the underlying range |
Referenced by stlsoft::filter().
filter_iterator<transform_iterator<I, TF>, FP> stlsoft::make_filter_transform_iterator | ( | I | from, | |
I | to, | |||
FP | pr, | |||
TF | fn | |||
) | [inline] |
Creator function for filter_iterator + transform_iterator.
from | The start of the iterator range to be transformed | |
to | The endpoint of the iterator range to be transformed | |
pr | The predicate used to filter the underlying range | |
fn | The function object used to effect the transformation |
References stlsoft::filter(), ss_typename_param_k, STLSOFT_STATIC_ASSERT, and stlsoft::transformer().
Referenced by stlsoft::filter_transformer().
index_iterator<I> stlsoft::make_index_iterator | ( | I | it, | |
ss_ptrdiff_t | index = 0 | |||
) | [inline] |
Creator function for index_iterator.
it | The iterator to index | |
index | The initial index of the iterator. Defaults to 0 |
Referenced by stlsoft::indexer().
string_concatenator_iterator<S, D> stlsoft::make_string_concatenator_iterator | ( | S & | s, | |
D const & | delim | |||
) | [inline] |
Creator function for string_concatenator_iterator.
s | The string instance to which elements will be concatenated | |
delim | The delimiter applied between consecutive elements in the concatenation |
Referenced by stlsoft::string_concatenator().
transform_iterator<filter_iterator<I, FP>, TF> stlsoft::make_transform_filter_iterator | ( | I | from, | |
I | to, | |||
TF | fn, | |||
FP | pr | |||
) | [inline] |
Creator function for transform_iterator + filter_iterator.
from | The iterator marking the start of the range to transform and filter | |
to | The iterator marking (one past) the end of the range to transform and filter | |
pr | The predicate used to filter the given range | |
fn | The predicate used to transform values of the filtered range |
References stlsoft::filter(), ss_typename_param_k, STLSOFT_STATIC_ASSERT, and stlsoft::transformer().
Referenced by stlsoft::transform_filter().
transform_iterator<I, F> stlsoft::make_transform_iterator | ( | I | it, | |
F | fn | |||
) | [inline] |
Creator function for transform_iterator.
it | The iterator to transform | |
fn | The function object used to effect the transformation |
Referenced by stlsoft::transformer().
ss_typename_type_ret_k msi_traits<I, C, M>::type stlsoft::member_selector | ( | I | it, | |
M C::* | member | |||
) | [inline] |
Creator function for member_selector_iterator.
it | The iterator whose values will be subject to member selection | |
member | The member pointer which will be used in the selection |
References ss_typename_type_k, and STLSOFT_STATIC_ASSERT.
string_concatenator_iterator<S, D> stlsoft::string_concatenator | ( | S & | s, | |
D const & | delim | |||
) | [inline] |
Creator function for string_concatenator_iterator.
s | The string instance to which elements will be concatenated | |
delim | The delimiter applied between consecutive elements in the concatenation |
References stlsoft::make_string_concatenator_iterator().
transform_iterator<filter_iterator<I, FP>, TF> stlsoft::transform_filter | ( | I | from, | |
I | to, | |||
TF | fn, | |||
FP | pr | |||
) | [inline] |
Creator function for transform_iterator + filter_iterator.
from | The iterator marking the start of the range to transform and filter | |
to | The iterator marking (one past) the end of the range to transform and filter | |
pr | The predicate used to filter the given range | |
fn | The predicate used to transform values of the filtered range |
References stlsoft::make_transform_filter_iterator().
transform_iterator<I, F> stlsoft::transformer | ( | I | it, | |
F | fn | |||
) | [inline] |
Creator function for transform_iterator.
it | The iterator to transform | |
fn | The function object used to effect the transformation |
References stlsoft::make_transform_iterator().
Referenced by stlsoft::make_filter_transform_iterator(), and stlsoft::make_transform_filter_iterator().