From 129815f3dd67c765dde7c54e62e2a720792f1774 Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Mon, 12 Jan 2004 16:10:29 +0000 Subject: [PATCH] added links to example source code [SVN r21632] --- doc/counting_iterator.html | 23 ++++++++++++----------- doc/counting_iterator_eg.rst | 5 +++++ doc/filter_iterator_eg.rst | 4 ++++ doc/indirect_iterator.html | 23 ++++++++++++----------- doc/indirect_iterator_eg.rst | 5 +++++ doc/permutation_iterator.html | 23 ++++++++++++----------- doc/permutation_iterator_eg.rst | 5 +++++ doc/reverse_iterator.html | 23 ++++++++++++----------- doc/reverse_iterator_eg.rst | 5 +++++ doc/transform_iterator.html | 23 ++++++++++++----------- doc/transform_iterator_eg.rst | 5 +++++ example/indirect_iterator_example.cpp | 10 ++++++---- 12 files changed, 95 insertions(+), 59 deletions(-) diff --git a/doc/counting_iterator.html b/doc/counting_iterator.html index 0e9af8f..731a220 100644 --- a/doc/counting_iterator.html +++ b/doc/counting_iterator.html @@ -45,15 +45,15 @@ adding an operator* that retur

Table of Contents

-

counting_iterator synopsis

+

counting_iterator synopsis

 template <
     class Incrementable
@@ -81,13 +81,13 @@ the cases when the Incrementable
 
-

counting_iterator requirements

+

counting_iterator requirements

The Incrementable type must be Default Constructible, Copy Constructible, and Assignable. The default distance is an implementation defined signed integral type.

-

counting_iterator models

+

counting_iterator models

counting_iterator models Readable Lvalue Iterator.

Furthermore, if you wish to create a counting iterator that is a Forward Traversal Iterator, then the following expressions must be valid:

@@ -112,7 +112,7 @@ i < j
-

counting_iterator operations

+

counting_iterator operations

In addition to the operations required by the concepts modeled by counting_iterator, counting_iterator provides the following operations.

@@ -199,7 +199,7 @@ with current constructed from
-

Example

+

Example

This example fills an array with numbers and a second array with pointers into the first array, using counting_iterator for both tasks. Finally indirect_iterator is used to print out the numbers @@ -229,12 +229,13 @@ std::cout << std::endl; indirectly printing out the numbers from 0 to 7 0 1 2 3 4 5 6 +

The source code for this example can be found here.

diff --git a/doc/counting_iterator_eg.rst b/doc/counting_iterator_eg.rst index a5e6baa..5f6b3b3 100644 --- a/doc/counting_iterator_eg.rst +++ b/doc/counting_iterator_eg.rst @@ -33,3 +33,8 @@ The output is:: indirectly printing out the numbers from 0 to 7 0 1 2 3 4 5 6 + +The source code for this example can be found `here`__. + +__ ../example/counting_iterator_example.cpp + diff --git a/doc/filter_iterator_eg.rst b/doc/filter_iterator_eg.rst index 9b19db3..36448fe 100644 --- a/doc/filter_iterator_eg.rst +++ b/doc/filter_iterator_eg.rst @@ -63,3 +63,7 @@ The output is:: 4 5 8 0 -1 4 5 8 + +The source code for this example can be found `here`__. + +__ ../example/filter_iterator_example.cpp diff --git a/doc/indirect_iterator.html b/doc/indirect_iterator.html index 84a4d50..f0aa387 100644 --- a/doc/indirect_iterator.html +++ b/doc/indirect_iterator.html @@ -50,15 +50,15 @@ iterators over smart pointers, which the impl handles. -JGS -->
-

indirect_iterator synopsis

+

indirect_iterator synopsis

 template <
     class Iterator
@@ -130,7 +130,7 @@ satisfies the requirements of the concepts modeled by the indirect
 iterator as specified in the models section.

-

indirect_iterator requirements

+

indirect_iterator requirements

The Iterator argument shall meet the requirements of Readable Iterator. The CategoryOrTraversal argument shall be one of the standard iterator tags or use_default. If CategoryOrTraversal @@ -146,7 +146,7 @@ is not use_default, as implied default for the value_type member.

-

indirect_iterator models

+

indirect_iterator models

If CategoryOrTraversal is a standard iterator tag, indirect_iterator is a model of the iterator concept corresponding to the tag, otherwise indirect_iterator satisfies the requirements @@ -160,7 +160,7 @@ the Iterator argument.

indirect_iterator models Lvalue Iterator.

-

indirect_iterator operations

+

indirect_iterator operations

In addition to the operations required by the concepts modeled by indirect_iterator, indirect_iterator provides the following operations.

@@ -251,7 +251,7 @@ indirect_iterator(
-

Example

+

Example

This example prints an array of characters, using indirect_iterator to access the array of characters through an array of pointers. Next indirect_iterator is used with the @@ -309,12 +309,13 @@ a,b,c,d,e,f,g, b,c,d,e,f,g,h, a,b,c,d,e,f,g, +

The source code for this example can be found here.

diff --git a/doc/indirect_iterator_eg.rst b/doc/indirect_iterator_eg.rst index 9e92cc3..356a2dd 100644 --- a/doc/indirect_iterator_eg.rst +++ b/doc/indirect_iterator_eg.rst @@ -62,3 +62,8 @@ The output is:: b,c,d,e,f,g,h, a,b,c,d,e,f,g, + +The source code for this example can be found `here`__. + +__ ../example/indirect_iterator_example.cpp + diff --git a/doc/permutation_iterator.html b/doc/permutation_iterator.html index fead95c..7ecaa8a 100644 --- a/doc/permutation_iterator.html +++ b/doc/permutation_iterator.html @@ -45,17 +45,17 @@ in a potentially different order.

-

Introduction

+

Introduction

The adaptor takes two arguments:

    @@ -75,7 +75,7 @@ end permutation iterator is completely defined by means of the past-the-end iterator to the indices.

-

Reference

+

Reference

 template< class ElementIterator
         , class IndexIterator
@@ -105,14 +105,14 @@ permutation_iterator<ElementIterator, IndexIterator>
 make_permutation_iterator( ElementIterator e, IndexIterator i);
 
-

permutation_iterator requirements

+

permutation_iterator requirements

ElementIterator must be a model of RandomAccessIterator. IndexIterator must at least be a model ForwardIterator. The value type of the IndexIterator must be convertible to the difference type of ElementIterator.

-

permutation_iterator operations

+

permutation_iterator operations

The permutation iterator implements the member functions and operators required for the Random Access Iterator concept. However, the permutation iterator can only meet the complexity guarantees of the @@ -147,7 +147,7 @@ that views the range of elements starting at -

Example

+

Example

 using namespace boost;
 int i = 0;
@@ -209,12 +209,13 @@ Elements at even indices in the permutation : 9 7
 Permutation backwards : 6 7 8 9 
 Iterate backward with stride 2 : 6 8 
 
+

The source code for this example can be found here.

diff --git a/doc/permutation_iterator_eg.rst b/doc/permutation_iterator_eg.rst index 49a44fc..b493c7a 100644 --- a/doc/permutation_iterator_eg.rst +++ b/doc/permutation_iterator_eg.rst @@ -60,3 +60,8 @@ The output is:: Elements at even indices in the permutation : 9 7 Permutation backwards : 6 7 8 9 Iterate backward with stride 2 : 6 8 + + +The source code for this example can be found `here`__. + +__ ../example/permutation_iterator_example.cpp diff --git a/doc/reverse_iterator.html b/doc/reverse_iterator.html index 19fc39a..f275bc3 100644 --- a/doc/reverse_iterator.html +++ b/doc/reverse_iterator.html @@ -47,15 +47,15 @@ invoking operator--() moves th
-

reverse_iterator synopsis

+

reverse_iterator synopsis

 template <class Iterator>
 class reverse_iterator
@@ -79,19 +79,19 @@ private:
 
-

reverse_iterator requirements

+

reverse_iterator requirements

The base Iterator must be a model of Bidirectional Traversal Iterator and Readable Iterator.

-

reverse_iterator models

+

reverse_iterator models

reverse_iterator models Bidirectional Traversal Iterator and Readable Iterator. In addition, reverse_iterator models the same standard iterator access concepts that the Iterator argument models.

-

reverse_iterator operations

+

reverse_iterator operations

In addition to the operations required by the concepts modeled by reverse_iterator, reverse_iterator provides the following operations.

@@ -194,7 +194,7 @@ with a current constructed fro
-

Example

+

Example

The following example prints an array of characters in reverse order using reverse_iterator.

@@ -225,12 +225,13 @@ original sequence of letters:                   hello world!
 sequence in reverse order:                      !dlrow olleh
 sequence in double-reversed (normal) order:     hello world!
 
+

The source code for this example can be found here.

diff --git a/doc/reverse_iterator_eg.rst b/doc/reverse_iterator_eg.rst index ab8dd90..7923f2f 100644 --- a/doc/reverse_iterator_eg.rst +++ b/doc/reverse_iterator_eg.rst @@ -35,3 +35,8 @@ The output is:: original sequence of letters: hello world! sequence in reverse order: !dlrow olleh sequence in double-reversed (normal) order: hello world! + + +The source code for this example can be found `here`__. + +__ ../example/reverse_iterator_example.cpp diff --git a/doc/transform_iterator.html b/doc/transform_iterator.html index 0cd3f24..0959afd 100644 --- a/doc/transform_iterator.html +++ b/doc/transform_iterator.html @@ -48,15 +48,15 @@ then returns the result.

-

transform_iterator synopsis

+

transform_iterator synopsis

 template <class UnaryFunction,
@@ -87,7 +87,7 @@ private:
 
-

transform_iterator requirements

+

transform_iterator requirements

The type UnaryFunction must be Assignable, Copy Constructible, and the expression f(*i) must be valid where f is an object of type UnaryFunction, i is an object of type Iterator, and @@ -96,7 +96,7 @@ where the type of f(*i) must b

The type Iterator must at least model Readable Iterator.

-

transform_iterator models

+

transform_iterator models

The resulting transform_iterator models the most refined of the following options that is also modeled by Iterator.

@@ -114,7 +114,7 @@ concept that is modeled by Iterator The value_type is remove_cv<remove_reference<reference> >::type.

-

transform_iterator operations

+

transform_iterator operations

In addition to the operations required by the concepts modeled by transform_iterator, transform_iterator provides the following operations.

@@ -234,7 +234,7 @@ default constructed and m_iterator<
-

Example

+

Example

This is a simple example of using the transform_iterators class to generate iterators that multiply (or add to) the value returned by dereferencing the iterator. It would be cooler to use lambda library @@ -267,12 +267,13 @@ multiplying the array by 2: adding 4 to each element in the array: 5 6 7 8 9 10 11 12 +

The source code for this example can be found here.

diff --git a/doc/transform_iterator_eg.rst b/doc/transform_iterator_eg.rst index 3b1403b..a6629ca 100755 --- a/doc/transform_iterator_eg.rst +++ b/doc/transform_iterator_eg.rst @@ -35,3 +35,8 @@ The output is:: 2 4 6 8 10 12 14 16 adding 4 to each element in the array: 5 6 7 8 9 10 11 12 + + +The source code for this example can be found `here`__. + +__ ../example/transform_iterator_example.cpp diff --git a/example/indirect_iterator_example.cpp b/example/indirect_iterator_example.cpp index 1ff98e6..7d74072 100644 --- a/example/indirect_iterator_example.cpp +++ b/example/indirect_iterator_example.cpp @@ -1,7 +1,9 @@ -// (C) Copyright Jeremy Siek 2000. Permission to copy, use, modify, sell and -// distribute this software is granted provided this copyright notice appears -// in all copies. This software is provided "as is" without express or implied -// warranty, and with no claim as to its suitability for any purpose. +// (C) Copyright Jeremy Siek 2000-2004. +// Permission to copy, use, modify, sell and distribute this software +// is granted provided this copyright notice appears in all +// copies. This software is provided "as is" without express or +// implied warranty, and with no claim as to its suitability for any +// purpose. #include #include