From 5c6dd2f17252d0e36e76230a6bc6ff4fd4ad6223 Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Sun, 11 Feb 2001 04:34:32 +0000 Subject: [PATCH] various edits [SVN r9108] --- filter_iterator.htm | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/filter_iterator.htm b/filter_iterator.htm index f71118e..d9d4134 100644 --- a/filter_iterator.htm +++ b/filter_iterator.htm @@ -46,12 +46,12 @@ namespace boost { Generator The class filter_iterator_generator 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 Predicate function object -type and the BaseIterator type that is being wrapped. In most -cases the associated types for the wrapped iterator can be deduced -from std::iterator_traits, but in some situations the user -may want to override these types, so there are also template +type and the BaseIterator type that is being wrapped. In +most cases the associated types for the wrapped iterator can be +deduced from std::iterator_traits, but in some situations the +user may want to override these types, so there are also template parameters for each of the iterator's associated types.
@@ -60,11 +60,12 @@ template <class Predicate, class BaseIterator,
 class filter_iterator_generator
 {
 public:
-  typedef ... type;          // the resulting filter iterator_adaptor type
+  typedef ... type;          // the resulting filter iterator type which is iterator_adaptor
   typedef ... policies_type; // the policies type for the iterator adaptor
 }
 
+

Example

The following example uses filter iterator to print out all the @@ -172,8 +173,22 @@ href="www.sgi.com/tech/stl/InputIterator.html">InputIterator or ForwardIterator depending on the adapted iterator type. -

+

Members

+ +The filter iterator type implements all of the member functions and +operators required of the ForwardIterator +concept. In addition it has the following constructor: + +
filter_iterator_generator::type(const BaseIterator& it, const Policies& p = Policies())
+ +

+The policies type has only one public function, which is its constructor: + +

filter_iterator_generator::policies_type(const Predicate& p, const BaseIterator& end)
+ +