Windows Dev Center

Platform::Collections::MapView Class

Represents a read-only view into a map, which is a collection of key-value pairs.

template <
   typename K,
   typename V,
   typename C = ::std::less<K>
ref class MapView sealed;


The type of the key in the key-value pair.


The type of the value in the key-value pair.


A type that provides a function object that can compare two element values as sort keys to determine their relative order in the MapView. By default, ::std::less<K>.

MapView is a concrete C++ implementation of the Windows::Foundation::Collections::IMapView <K,V> interface that is passed across the application binary interface (ABI). For more information, see Collections (C++/CX).



MapView::MapView Constructor

Initializes a new instance of the MapView class.



MapView::First Method

Returns an iterator that is initialized to the first element in the map view.

MapView::HasKey Method

Determines whether the current MapView contains the specified key.

MapView::Lookup Method

Retrieves the element at the specified key in the current MapView object.

MapView::Size Method

Returns the number of elements in the current MapView object.

MapView::Split Method

Splits an original MapView object into two MapView objects.

Header: collection.h

Namespace: Platform::Collections

Other Resources

Platform Namespace
© 2015 Microsoft