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.

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.

Member FunctionDescription
range_adapter::range_adapter (STL/CLR)Constructs an adapter object.
OperatorDescription
range_adapter::operator= (STL/CLR)Replaces the stored iterator pair.
InterfaceDescription
IEnumerableIterates through elements in the collection.
ICollectionMaintains a group of elements.
IEnumerable<T>Iterates through typed elements in the collection..
ICollection<T>Maintains a group of typed elements.

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.

Header: <cliext/adapter>

Namespace: cliext

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

Show: