Mission Base

Program Base Library Functions

int pblMapAddStrStr

( PblMap* map, char* key, char* value )

Associates the specified string value with the specified string key in this map.

Documentation

Associates the specified string value with the specified string key in this map.

If the map previously contained a mapping for the key, the old value is replaced by the specified value. (A map m is said to contain a mapping for a key k if and only if pblMapContainsKey(k) would return true.)

For hash maps this method has a time complexity of O(1). For tree maps this method has a time complexity of O(Log N).

Parameters:
map - The map to add to
key - Key to add a mapping for
value - Value of the new mapping
Returns:
int rc > 0: The map did not already contain a mapping for the key.
int rc == 0: The map did already contain a mapping for the key.
int rc < 0: An error, see pbl_errno:
PBL_ERROR_OUT_OF_MEMORY - Out of memory.
PBL_ERROR_OUT_OF_BOUNDS - Maximum capacity of the hash set exceeded.

Alphabetic index



This page was generated with the help of DOC++.