diff --git a/doc/boost_range.html b/doc/boost_range.html index b92a786..7ee54ee 100644 --- a/doc/boost_range.html +++ b/doc/boost_range.html @@ -1,4 +1,4 @@ -
![]() |
|
This library makes it possible to treat different types as if they have +
![]() |
|
This library makes it possible to treat different types as if they have
implemented a subset of the container requirements
(see §23.1of the C++ standard). Formally, that subset is defined by
the CollectionConcept.
diff --git a/doc/range.htm b/doc/range.htm
index 7819b69..2119e7a 100755
--- a/doc/range.htm
+++ b/doc/range.htm
@@ -20,6 +20,7 @@
+
Range
Description
@@ -439,8 +440,10 @@ An algorithm that iterates through the range [a.begin(), a.end())
+
ReversibleRange
+
Description
This concept provides access to iterators that traverse in both
directions (forward and reverse). The iterator type must meet all of
diff --git a/doc/style.html b/doc/style.html
new file mode 100755
index 0000000..5dbace7
--- /dev/null
+++ b/doc/style.html
@@ -0,0 +1,146 @@
+
+
+
+
+
+
![]() |
+
+ Boost.Range terminology and style guidelines+ |
+
+ The use of a consistent terminologi is as important for + iterator Ranges and + ExternalRange-based algorithms + as it is for iterators and iterator-based algorithms. + If a conventional set of names are adopted, we can avoid misunderstandings + and write generic function prototypes that are self-documenting. +
+ ++ Since iterator ranges are characterized by a specific underlying + iterator type, we get a type of iterator range for each type of + iterator. Hence we can speak of the following types of iterator + ranges: +
X
to mean "External" save us from
+rediculously long parameter names and is easy to associate with an
+ external concept.
+
+ + Notice that an interator (and therefore an iterator range) has + one traversal property and one or more properties from the + value access category. So in reality we will mostly talk about + mixtures such as
+ As an example, consider how we specify the interface of
+ std::sort()
. The iterator-based version looks like
+ this:
+
+
+ template< class RandomAccessTraversalReadableWritableIterator > + void sort( RandomAccessTraversalReadableWritableIterator first, + RandomAccessTraversalReadableWritableIterator last ); ++ For external iterator ranges the interface becomes + +
+ template< class XRandomAccessReadableWritableRange > + void sort( XRandomAccessReadableWritableRange& r ); ++ Had the function been specified like + +
+ template< class RandomAccessReadableWritableRange > + void sort( RandomAccessReadableWritableRange& r ); ++ + we should expect the underlying code to call
r.begin()
+ and r.end()
to extract the iterators instead of
+ begin( r )
and end( r )
. In general
+ it is much more flexible to rely on external iterator ranges
+ than iterator ranges.
+
+
+
+
+ + (C) Copyright Thorsten Ottosen 2003-2004 +
+ + Having an abstraction that encapsulates a pair of iterators is very
useful. The standard library uses std::pair
in some
@@ -29,8 +28,8 @@ whereas more domain specific class names are. Therefore these two
classes are provided:
iterator_range
+ sub_range
The iterator_range
class is templated on an iterator and should be
@@ -40,7 +39,7 @@ and it is less general, but a bit easier to use since its template argument
is easier to specify.
-iterator_range
iterator_range
iterator_range
class is to encapsulate
@@ -137,7 +136,7 @@ client must ensure that the two iterators delimit a valid closed-open range
sub_range
sub_range
sub_range
class inherits all its functionality
from the iterator_range
class.
diff --git a/index.html b/index.html
index 2bf64b7..a54591b 100755
--- a/index.html
+++ b/index.html
@@ -38,33 +38,26 @@
iterator_range
+ sub_range