C4 Engine
C4 Engine API Documentation

Map::GetFirstMapElement

Defined in:  TSMap.h
Returns the first element in a map.
Prototype

type *GetFirstMapElement(voidconst;

Description
The GetFirstMapElement function returns a pointer to the first element in a map. If the map is empty, then this function returns nullptr.

The first element in a map is always the one having the least key value based on the ordering defined for the KeyType type. The MapElement::GetNextMapElement function can be repeatedly called to iterate through the members of a map in order.

NOTE. The running time for the First function is O(log n), where n is the number of objects stored in the map.
See Also

Map::GetLastMapElement