コード例 #1
0
ファイル: FScriptMap.cs プロジェクト: yimengfan/USharp
 /// <summary>
 /// Adds the (key, value) pair to the map, returning true if the element was added, or false if the element was already present and has been overwritten
 /// </summary>
 public void Add(IntPtr key, IntPtr value, ref FScriptMapLayout layout, HashDelegates.GetKeyHash getKeyHash, HashDelegates.Equality keyEqualityFn,
                 HashDelegates.ConstructAndAssign keyConstructAndAssignFn, HashDelegates.ConstructAndAssign valueConstructAndAssignFn,
                 HashDelegates.Assign valueAssignFn, HashDelegates.Destruct destructKeyFn, HashDelegates.Destruct destructValueFn)
 {
     Native_FScriptMap.Add(ref this, key, value, ref layout, getKeyHash, keyEqualityFn, keyConstructAndAssignFn, valueConstructAndAssignFn,
                           valueAssignFn, destructKeyFn, destructValueFn);
 }
コード例 #2
0
ファイル: FScriptMap.cs プロジェクト: yimengfan/USharp
 public void Destroy()
 {
     Native_FScriptMap.Destroy(ref this);
     ZeroMemory();
 }
コード例 #3
0
ファイル: FScriptMap.cs プロジェクト: yimengfan/USharp
 /// <summary>
 /// Finds the associated value from hash of Key, rather than linearly searching
 /// </summary>
 public IntPtr FindValue(IntPtr key, ref FScriptMapLayout layout, HashDelegates.GetKeyHash getKeyHash, HashDelegates.Equality keyEqualityFn)
 {
     return(Native_FScriptMap.FindValue(ref this, key, ref layout, getKeyHash, keyEqualityFn));
 }
コード例 #4
0
ファイル: FScriptMap.cs プロジェクト: yimengfan/USharp
 public static FScriptMapLayout GetScriptLayout(int keySize, int keyAlignment, int valueSize, int valueAlignment)
 {
     return(Native_FScriptMap.GetScriptLayout(keySize, keyAlignment, valueSize, valueAlignment));
 }