chsvlib
chsv helper source code

◆ MapBegin()

EXTERN_C HCHSVMAPITERATOR Chusov::MapBegin ( HCHSVMAP  hMap)
noexcept

The function returns an iterator bound with the first map element.

Parameters
[in]hMapis a handle to a map or a multimap instance.
Returns
On success the function returns a handle to the iterator bound with the first element of the map. If the map is empty the function returns MAP_ITERATOR_DOES_NOT_EXIST (NULL). If the function fails for any other reason it returns MAP_ITERATOR_ERROR (-1) setting appropriate last chsvlib error code which could be retrieved by calling the GetLastChsvError.
Remarks
Map iterators are just pointers to internal memory and they are not need to be closed specifically.
The complexity is \(O(1)\).
Declared in chsvmap.h.
See also
MapEnd;
MapIterPrev;
MapIterNext.