Example #1
0
 /// <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);
 }
Example #2
0
 public void Destroy()
 {
     Native_FScriptMap.Destroy(ref this);
     ZeroMemory();
 }
Example #3
0
 /// <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));
 }
Example #4
0
 public static FScriptMapLayout GetScriptLayout(int keySize, int keyAlignment, int valueSize, int valueAlignment)
 {
     return(Native_FScriptMap.GetScriptLayout(keySize, keyAlignment, valueSize, valueAlignment));
 }