-
Notifications
You must be signed in to change notification settings - Fork 1
DsMap
Jump To | Go Back |
Arguments | Methods | Variables |
---|
Implements: None
Creates a wrapper for GML's map data structure. If using GMS2.3.1 or above, the structure will be cleaned up automatically, otherwise destroy() must be called to properly clean it up.
// no example
Name | Type | Purpose |
---|---|---|
None |
Jump To | top |
add | replace | assume | empty | size | find | first | next | remove |
---|---|---|---|---|---|---|---|---|---|---|
destroy | read | copy | toArray | toString | is |
Returns: mixed
Name | Type | Purpose |
---|---|---|
key | string |
The key that will be used to retrieve this value. |
value | mixed |
The value to be assigned to the key. |
Adds the specified key-value pair to the map.
Returns: mixed
Name | Type | Purpose |
---|---|---|
key | string |
The key to retrieve from the map. |
value | mixed |
The value to be assigned to the key. |
Adds the specified key-value pair if it doesn't exist, and replaces it if it does.
Returns: mixed
Name | Type | Purpose |
---|---|---|
key | string |
The key to retrieve from the map. |
value | mixed |
The value that will be set if key does not exist. |
If the value read at {key} is undefined, the value at {key} assumes the value of {value}
Returns: N/A undefined
Name | Type | Purpose |
---|---|---|
None |
Returns true if the DsMap is empty
Returns: N/A undefined
Name | Type | Purpose |
---|---|---|
None |
Returns the number of elements in the DsMap
Returns: N/A undefined
Name | Type | Purpose |
---|---|---|
key | string |
The key to find in the map. |
undefined | mixed |
optional: The value to return if the key is undefined. |
Searches for the given key, and returns the value if found, other wise undefined.
Returns: N/A undefined
Name | Type | Purpose |
---|---|---|
None |
Returns the first key in the map.
Returns: N/A undefined
Name | Type | Purpose |
---|---|---|
_key | undef |
none provided |
Returns the next key in the map after the given key.
Returns: N/A undefined
Name | Type | Purpose |
---|---|---|
key | string |
The key to find in the map. |
If the given key exists, it will be removed from the map.
Returns: N/A undefined
Name | Type | Purpose |
---|---|---|
None |
Destroys the internal map, required to properly clean up DsMap
Returns: N/A undefined
Name | Type | Purpose |
---|---|---|
_string | undef |
none provided |
Decodes the given string into the contents of the map.
Returns: N/A undefined
Name | Type | Purpose |
---|---|---|
None |
Returns a copy of the internal map.
Returns: array ([values...]
)
Name | Type | Purpose |
---|---|---|
None |
Returns the map as an array of values.
Returns: string ("string"
)
Name | Type | Purpose |
---|---|---|
None |
Encodes the map as a string.
Returns: boolean (true
or false
)
Name | Type | Purpose |
---|---|---|
type | Constructor |
The Constructor to compare this against. |
Returns true
if the provided type is DsMap.
Jump To | top |
---|
- pointer - The internal pointer to the map data structure.
Devon Mullane 2020