Partager via


range_adapter (STL/CLR)

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at range_adapter (STL/CLR).

A template class that wraps a pair of iterators that are used to implement several Base Class Library (BCL) interfaces. You use the range_adapter to manipulate an STL/CLR range as if it were a BCL collection.

Syntax

template<typename Iter>  
    ref class range_adapter  
        :   public  
        System::Collections::IEnumerable,  
        System::Collections::ICollection,  
        System::Collections::Generic::IEnumerable<Value>,  
        System::Collections::Generic::ICollection<Value>  
    { ..... };  

Parameters

Iter
The type associated with the wrapped iterators.

Members

Member Function Description
range_adapter::range_adapter (STL/CLR) Constructs an adapter object.
Operator Description
range_adapter::operator= (STL/CLR) Replaces the stored iterator pair.

Interfaces

Interface Description
IEnumerable Iterates through elements in the collection.
ICollection Maintains a group of elements.
IEnumerable<T> Iterates through typed elements in the collection..
ICollection<T> Maintains a group of typed elements.

Remarks

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.

Requirements

Header: <cliext/adapter>

Namespace: cliext

See Also

collection_adapter (STL/CLR)
make_collection (STL/CLR)