mapscript.hashTableObj¶
- class mapscript.hashTableObj¶
An object to store key-value pairs
Attributes
numitemsint immutable immutable number of items
thisownThe membership flag
Methods
- __init__()[broncode]¶
Create a new instance
- clear() void[broncode]¶
Empties the table of all items
- get(key: char, default_value: char = None) char[broncode]¶
Returns the value of the item by its key, or default if the key does not exist
- keys()[broncode]¶
Python-only. In Python MapScript the
hashTableObjcan be used and accessed as a dictionary. Thekeysmethod returns a view of all the keys in thehashTableObj.
- nextKey(prevkey: char = None) char const[broncode]¶
Returns the name of the next key or NULL if there is no valid next key. If the input key is NULL, returns the first key
- remove(key: char) int[broncode]¶
Removes the hash item by its key. Returns
MS_SUCCESSorMS_FAILURE
- set(key: char, value: char) int[broncode]¶
Set a hash item given key and value. Returns
MS_SUCCESSorMS_FAILURE
