hmnew
hmnew |
Purpose
Create a new hashmap.
Synopsis
XPRMhashmap hmnew(XPRMcontext ctx,unsigned int minsize,int flags);
Arguments
ctx
|
Mosel's execution context
|
minsize
|
Initial size of the hash table (
0 for default size)
|
flags
|
Reserved for future use (should be
0)
|
Return value
A reference to the newly created hashmap or
NULL in case of error.
Further information
1. This function creates a
hashmap from the current context of execution. This datastructure makes it possible to record <key,value> pairs and retrieve efficiently the value associated to a given key.
2. Hashmaps and their associated datastructures are allocated using the memory management routines of the running model, as a consequence, hashmaps are automatically released when the model is reset. During the execution of the model it is however possible to release a map using function
hmdel
Related topics