Navigation 導航
Unreal Engine C++ API Reference > Runtime > Core > Containers
虛幻引擎 C++ API 參考 > 執行時期 > 核心 > 容器
Inheritance Hierarchy 繼承層次結構
- TMapBase 地圖庫
- TSortableMapBase 可排序地圖庫
- TMap 地圖
- FConfigFile F設定檔
- FLocalizationConfigurationScript
F在地化配置腳本 - FConfigFileHierarchy
- FContextCache
- FExample F範例
- FOnlineKeyValuePairs F在線鍵值對
- FOnlineEventParms F在線事件參數
- FScopes F範圍
- FSecurityRequirement F安全要求
References 參考
Module 模組 | Core 核 |
Header 標頭 | /Engine/Source/Runtime/Core/Public/Containers/Map.h |
Include 包括 | #include "Containers/Map.h" #include“容器/Map.h” |
Syntax 句法
template<typename InKeyType, typename InValueType, typename SetAllocator, typename KeyFuncs> class TMap : public TSortableMapBase< InKeyType, InValueType, SetAllocator, KeyFuncs >
Remarks 評論
A TMapBase specialization that only allows a single value associated with each key.
TMapBase 專門化,僅允許與每個鍵關聯的單一值。
Constructors 建構函數
Type 類型 | Name 姓名 | Description 描述 | |
---|---|---|---|
![]() |
TMap () 地圖 () |
||
![]() |
|||
![]() |
|||
![]() |
Constructor for moving elements from a TMap with a different SetAllocator 使用不同的 SetAllocator 從 TMap 移動元素的建構函數 |
||
![]() |
Constructor for copying elements from a TMap with a different SetAllocator 使用不同的 SetAllocator 從 TMap 複製元素的建構函數 |
||
![]() |
TMap
(
std::initializer_list< TPairInitializer< const KeyType&, const ValueType& >> InitList |
Constructor which gets its elements from a native initializer list 從本機初始化列表取得其元素的建構函數 |
Functions 功能
Type 類型 | Name 姓名 | Description 描述 | |
---|---|---|---|
![]() |
void 空白 | Move all items from another map into our map (if any keys are in both, the value from the other map wins) and empty the other map. 將所有項目從另一個地圖移動到我們的地圖中(如果兩個地圖中都有任何鍵,則另一個地圖中的值獲勝)並清空另一個地圖。 |
|
![]() |
void 空白 | Add all items from another map to our map (if any keys are in both, the value from the other map wins). 將另一個地圖中的所有項目添加到我們的地圖中(如果兩個地圖中都有任何鍵,則另一個地圖中的值獲勝)。 |
|
![]() |
ValueType 值類型 | FindAndRemoveChecked
(
KeyConstPointerType Key |
Find a pair with the specified key, removes it from the map, and returns the value part of the pair. 尋找具有指定鍵的對,將其從映射中刪除,並傳回該對的值部分。 |
![]() |
bool 布林值 | RemoveAndCopyValue
(
KeyInitType Key, |
Remove the pair with the specified key and copies the value that was removed to the ref parameter 刪除具有指定鍵的對,並將刪除的值複製到 ref 參數 |
![]() |
bool 布林值 | RemoveAndCopyValueByHash
(
uint32 KeyHash, |
See RemoveAndCopyValue() and class documentation section on ByHash() functions 請參閱RemoveAndCopyValue() 和有關ByHash() 函數的類別文檔部分 |
Operators 營運商
Type 類型 | Name 姓名 | Description 描述 | |
---|---|---|---|
![]() |
ValueType & 值類型 & | operator[]
(
KeyConstPointerType Key |
|
![]() ![]() |
const ValueType & const 值類型 & | operator[]
(
KeyConstPointerType Key |
|
![]() |
TMap & 地圖& | operator=
(
std::initializer_list< TPairInitializer< const KeyType&, const ValueType& >> InitList |
Assignment operator which gets its elements from a native initializer list 從本機初始化清單取得其元素的賦值運算符 |
![]() |
TMap & 地圖& | Assignment operator for copying elements from a TMap with a different SetAllocator 用於使用不同的 SetAllocator 從 TMap 複製元素的賦值運算符 |
|
![]() |
TMap & 地圖& | Assignment operator for moving elements from a TMap with a different SetAllocator 用於使用不同的 SetAllocator 從 TMap 移動元素的賦值運算符 |
|
![]() |
TMap & 地圖& | ||
![]() |
TMap & 地圖& |