-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# TMap | ||
|
||
## Inheritance | ||
[RemoteObject](./remoteobject.md) | ||
|
||
## Metamethods | ||
|
||
### __len | ||
- **Usage:** `#TMap` | ||
- **Return type:** `integer` | ||
- Returns the number of current pairs in the map. | ||
|
||
## Methods | ||
|
||
### Find(key) | ||
- **Return type:** `RemoteUnrealParam` | `LocalUnrealParam` | ||
- **Returns:** the element found in the map | ||
- **Throws:** if an element was not found in the map | ||
- Finds the specified key in the map | ||
|
||
### Add(key, value) | ||
- Inserts a key/value pair into the map. If the key already exists in the map, replaces the value. | ||
|
||
### Contains(key) | ||
- **Return type:** `bool` | ||
- **Returns:** if the element exists in the map. | ||
- Checks if a key exists inside of the map. | ||
|
||
### Remove(key) | ||
- Removes an element from the map. If an element doesn't exist, does nothing. | ||
|
||
### Empty() | ||
- Clears the map. | ||
|
||
### ForEach(function Callback) | ||
- Iterates the entire `TMap` and calls the callback function for each element in the array. | ||
- The callback params are: `RemoteUnrealParam key`, `RemoteUnrealParam value` | `LocalUnrealParam value`. | ||
- Use `elem:get()` and `elem:set()` to access/mutate the value. | ||
- Mutating the key is undefined behavior. |