mirror of
https://github.com/boostorg/utility.git
synced 2025-05-09 15:04:00 +00:00
various edits
[SVN r9108]
This commit is contained in:
parent
eeeb7ef5b9
commit
5c6dd2f172
@ -46,12 +46,12 @@ namespace boost {
|
|||||||
Generator</a></h2>
|
Generator</a></h2>
|
||||||
|
|
||||||
The class <tt>filter_iterator_generator</tt> is a helper class who's
|
The class <tt>filter_iterator_generator</tt> is a helper class who's
|
||||||
purpose is to construct a filter iterator adaptor type. The template
|
purpose is to construct a filter iterator type. The template
|
||||||
parameters for this class are the <tt>Predicate</tt> function object
|
parameters for this class are the <tt>Predicate</tt> function object
|
||||||
type and the <tt>BaseIterator</tt> type that is being wrapped. In most
|
type and the <tt>BaseIterator</tt> type that is being wrapped. In
|
||||||
cases the associated types for the wrapped iterator can be deduced
|
most cases the associated types for the wrapped iterator can be
|
||||||
from <tt>std::iterator_traits</tt>, but in some situations the user
|
deduced from <tt>std::iterator_traits</tt>, but in some situations the
|
||||||
may want to override these types, so there are also template
|
user may want to override these types, so there are also template
|
||||||
parameters for each of the iterator's associated types.
|
parameters for each of the iterator's associated types.
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
@ -60,11 +60,12 @@ template <class Predicate, class BaseIterator,
|
|||||||
class filter_iterator_generator
|
class filter_iterator_generator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef ... type; // the resulting filter <a href="./iterator_adaptor.htm"><tt>iterator_adaptor</tt></a> type
|
typedef ... type; // the resulting filter iterator type which is <a href="./iterator_adaptor.htm"><tt>iterator_adaptor</tt></a>
|
||||||
typedef ... policies_type; // the policies type for the iterator adaptor
|
typedef ... policies_type; // the policies type for the iterator adaptor
|
||||||
}
|
}
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
<h3>Example</h3>
|
<h3>Example</h3>
|
||||||
|
|
||||||
The following example uses filter iterator to print out all the
|
The following example uses filter iterator to print out all the
|
||||||
@ -172,8 +173,22 @@ href="www.sgi.com/tech/stl/InputIterator.html">InputIterator</a> or <a
|
|||||||
href="www.sgi.com/tech/stl/ForwardIterator.html">ForwardIterator</a>
|
href="www.sgi.com/tech/stl/ForwardIterator.html">ForwardIterator</a>
|
||||||
depending on the adapted iterator type.
|
depending on the adapted iterator type.
|
||||||
|
|
||||||
<p>
|
|
||||||
|
|
||||||
|
<h3>Members</h3>
|
||||||
|
|
||||||
|
The filter iterator type implements all of the member functions and
|
||||||
|
operators required of the <a
|
||||||
|
href="http://www.sgi.com/tech/stl/ForwardIterator.html">ForwardIterator</a>
|
||||||
|
concept. In addition it has the following constructor:
|
||||||
|
|
||||||
|
<pre>filter_iterator_generator::type(const BaseIterator& it, const Policies& p = Policies())</pre>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The policies type has only one public function, which is its constructor:
|
||||||
|
|
||||||
|
<pre>filter_iterator_generator::policies_type(const Predicate& p, const BaseIterator& end)</pre>
|
||||||
|
|
||||||
|
<p>
|
||||||
<hr>
|
<hr>
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user