You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
helpviewer_keywords: ["<adapter> header [STL/CLR]", "adapter [STL/CLR]", "<cliext/adapter> header [STL/CLR]", "collection_adapter class [STL/CLR]", "base member [STL/CLR]", "begin member [STL/CLR]", "collection_adapter member [STL/CLR]", "difference_type member [STL/CLR]", "end member [STL/CLR]", "iterator member [STL/CLR]", "key_type member [STL/CLR]", "mapped_type member [STL/CLR]", "operator= member [STL/CLR]", "reference member [STL/CLR]", "size member [STL/CLR]", "size_type member [STL/CLR]", "swap member [STL/CLR]", "value_type member [STL/CLR]", "make_collection function [STL/CLR]", "range_adapter class [STL/CLR]", "operator= member [STL/CLR]", "range_adapter member [STL/CLR]"]
8
8
ms.assetid: 71ce7e51-42b6-4f70-9595-303791a97677
9
9
---
10
-
# adapter (STL/CLR)
10
+
# `<cliext/adapter>` (STL/CLR)
11
11
12
12
The STL/CLR header `<cliext/adapter>` specifies two class templates (`collection_adapter` and `range_adapter`), and the function template `make_collection`.
13
13
@@ -25,18 +25,18 @@ The STL/CLR header `<cliext/adapter>` specifies two class templates (`collection
25
25
26
26
## Declarations
27
27
28
-
|Class|Description|
29
-
|-----------|-----------------|
30
-
|[collection_adapter (STL/CLR)](#collection_adapter)|Wraps the Base Class Library (BCL) collection as a range.|
31
-
|[range_adapter (STL/CLR)](#range_adapter)|Wraps the range as a BCL collection.|
28
+
|Class|Description|
29
+
|---|---|
30
+
|[`collection_adapter`](#collection_adapter)|Wraps the Base Class Library (BCL) collection as a range.|
31
+
|[`range_adapter`](#range_adapter)|Wraps the range as a BCL collection.|
32
32
33
-
|Function|Description|
34
-
|--------------|-----------------|
35
-
|[make_collection (STL/CLR)](#make_collection)|Creates a range adapter using an iterator pair.|
33
+
|Function|Description|
34
+
|---|---|
35
+
|[`make_collection`](#make_collection)|Creates a range adapter using an iterator pair.|
Wraps a .NET collection for use as an STL/CLR container. A `collection_adapter` is a template class that describes a simple STL/CLR container object. It wraps a Base Class Library (BCL) interface, and returns an iterator pair that you use to manipulate the controlled sequence.
42
42
@@ -80,47 +80,47 @@ The type of the wrapped collection.
80
80
81
81
### Specializations
82
82
83
-
|Specialization|Description|
84
-
|--------------------|-----------------|
85
-
|`IEnumerable`|Sequences through elements.|
86
-
|`ICollection`|Maintains a group of elements.|
87
-
|`IList`|Maintains an ordered group of elements.|
88
-
|`IDictionary`|Maintain a set of {key, value} pairs.|
89
-
|`IEnumerable<Value>`|Sequences through typed elements.|
90
-
|`ICollection<Value>`|Maintains a group of typed elements.|
91
-
|`IList<Value>`|Maintains an ordered group of typed elements.|
92
-
|`IDictionary<Value>`|Maintains a set of typed {key, value} pairs.|
83
+
|Specialization | Description|
84
+
|---|---|
85
+
|`IEnumerable` | Sequences through elements.|
86
+
|`ICollection` | Maintains a group of elements.|
87
+
|`IList` | Maintains an ordered group of elements.|
88
+
|`IDictionary` | Maintain a set of {key, value} pairs.|
89
+
|`IEnumerable<Value>` | Sequences through typed elements.|
90
+
|`ICollection<Value>` | Maintains a group of typed elements.|
91
+
|`IList<Value>` | Maintains an ordered group of typed elements.|
92
+
|`IDictionary<Value>` | Maintains a set of typed {key, value} pairs.|
93
93
94
94
### Members
95
95
96
-
|Type Definition|Description|
97
-
|---------------------|-----------------|
98
-
|[collection_adapter::difference_type (STL/CLR)](#difference_type)|The type of a signed distance between two elements.|
99
-
|[collection_adapter::iterator (STL/CLR)](#iterator)|The type of an iterator for the controlled sequence.|
100
-
|[collection_adapter::key_type (STL/CLR)](#key_type)|The type of a dictionary key.|
101
-
|[collection_adapter::mapped_type (STL/CLR)](#mapped_type)|The type of a dictionary value.|
102
-
|[collection_adapter::reference (STL/CLR)](#reference)|The type of a reference to an element.|
103
-
|[collection_adapter::size_type (STL/CLR)](#size_type)|The type of a signed distance between two elements.|
104
-
|[collection_adapter::value_type (STL/CLR)](#value_type)|The type of an element.|
105
-
106
-
|Member Function|Description|
107
-
|---------------------|-----------------|
108
-
|[collection_adapter::base (STL/CLR)](#base)|Designates the wrapped BCL interface.|
109
-
|[collection_adapter::begin (STL/CLR)](#begin)|Designates the beginning of the controlled sequence.|
110
-
|[collection_adapter::collection_adapter (STL/CLR)](#collection_adapter_collection_adapter)|Constructs an adapter object.|
111
-
|[collection_adapter::end (STL/CLR)](#end)|Designates the end of the controlled sequence.|
112
-
|[collection_adapter::size (STL/CLR)](#size)|Counts the number of elements.|
113
-
|[collection_adapter::swap (STL/CLR)](#swap)|Swaps the contents of two containers.|
114
-
115
-
|Operator|Description|
116
-
|--------------|-----------------|
117
-
|[collection_adapter::operator= (STL/CLR)](#op_eq)|Replaces the stored BCL handle.|
96
+
|Type definition | Description|
97
+
|---|---|
98
+
| [`collection_adapter::difference_type`](#difference_type) | The type of a signed distance between two elements.|
99
+
| [`collection_adapter::iterator`](#iterator) | The type of an iterator for the controlled sequence.|
100
+
| [`collection_adapter::key_type`](#key_type) | The type of a dictionary key.|
101
+
| [`collection_adapter::mapped_type`](#mapped_type) | The type of a dictionary value.|
102
+
| [`collection_adapter::reference`](#reference) | The type of a reference to an element.|
103
+
| [`collection_adapter::size_type`](#size_type) | The type of a signed distance between two elements.|
104
+
| [`collection_adapter::value_type`](#value_type) | The type of an element.|
105
+
106
+
|Member function | Description|
107
+
|---|---|
108
+
| [`collection_adapter::base`](#base) | Designates the wrapped BCL interface.|
109
+
| [`collection_adapter::begin`](#begin) | Designates the beginning of the controlled sequence.|
110
+
| [`collection_adapter::collection_adapter`](#collection_adapter_collection_adapter) | Constructs an adapter object.|
111
+
| [`collection_adapter::end`](#end) | Designates the end of the controlled sequence.|
112
+
| [`collection_adapter::size`](#size) | Counts the number of elements.|
113
+
| [`collection_adapter::swap`](#swap) | Swaps the contents of two containers.|
114
+
115
+
|Operator | Description|
116
+
|---|---|
117
+
| [`collection_adapter::operator=`](#op_eq) | Replaces the stored BCL handle.|
118
118
119
119
### Remarks
120
120
121
121
You use this template class to manipulate a BCL container as a STL/CLR container. The `collection_adapter` stores a handle to a BCL interface, which in turn controls a sequence of elements. A `collection_adapter` object `X` returns a pair of input iterators `X.begin()` and `X.end()` that you use to visit the elements, in order. Some of the specializations also let you write `X.size()` to determine the length of the controlled sequence.
@@ -964,28 +964,28 @@ The type associated with the wrapped iterators.
964
964
965
965
### Members
966
966
967
-
|Member Function|Description|
968
-
|---------------------|-----------------|
969
-
|[range_adapter::range_adapter (STL/CLR)](#range_adapter_range_adapter)|Constructs an adapter object.|
967
+
|Member function | Description|
968
+
|---|---|
969
+
| [`range_adapter::range_adapter`](#range_adapter_range_adapter) | Constructs an adapter object.|
970
970
971
-
|Operator|Description|
972
-
|--------------|-----------------|
973
-
|[range_adapter::operator= (STL/CLR)](#range_adapter_op_eq)|Replaces the stored iterator pair.|
971
+
|Operator | Description|
972
+
|---|---|
973
+
| [`range_adapter::operator=`](#range_adapter_op_eq) | Replaces the stored iterator pair.|
974
974
975
975
### Interfaces
976
976
977
-
|Interface|Description|
978
-
|---------------|-----------------|
979
-
|<xref:System.Collections.IEnumerable>|Iterates through elements in the collection.|
980
-
|<xref:System.Collections.ICollection>|Maintains a group of elements.|
981
-
|<xref:System.Collections.Generic.IEnumerable%601>|Iterates through typed elements in the collection.|
982
-
|<xref:System.Collections.Generic.ICollection%601>|Maintains a group of typed elements.|
977
+
|Interface | Description|
978
+
|---|---|
979
+
|<xref:System.Collections.IEnumerable> | Iterates through elements in the collection.|
980
+
|<xref:System.Collections.ICollection> | Maintains a group of elements.|
981
+
|<xref:System.Collections.Generic.IEnumerable%601> | Iterates through typed elements in the collection.|
982
+
|<xref:System.Collections.Generic.ICollection%601> | Maintains a group of typed elements.|
983
983
984
984
### Remarks
985
985
986
986
The range_adapter stores a pair of iterators, which in turn delimit a sequence of elements. The object implements four BCL interfaces that let you iterate through the elements, in order. You use this template class to manipulate STL/CLR ranges much like BCL containers.
0 commit comments