예제 #1
0
            public void Add(TKey key, TValue item)
            {
#if ENABLE_UNITY_COLLECTIONS_CHECKS
                AtomicSafetyHandle.CheckWriteAndThrow(m_Safety);
#endif
                NativeHashMapBase <TKey, TValue> .AddAtomicMulti(m_Buffer, key, item, m_ThreadIndex);
            }
예제 #2
0
        public bool TryGetNextValue(out TValue item, ref NativeMultiHashMapIterator <TKey> it)
        {
#if ENABLE_UNITY_COLLECTIONS_CHECKS
            AtomicSafetyHandle.CheckReadAndThrow(m_Safety);
#endif
            return(NativeHashMapBase <TKey, TValue> .TryGetNextValueAtomic(m_Buffer, out item, ref it));
        }
예제 #3
0
        public bool SetValue(TValue item, NativeMultiHashMapIterator <TKey> it)
        {
#if ENABLE_UNITY_COLLECTIONS_CHECKS
            AtomicSafetyHandle.CheckWriteAndThrow(m_Safety);
#endif
            return(NativeHashMapBase <TKey, TValue> .SetValue(m_Buffer, ref it, ref item));
        }
예제 #4
0
        public void Remove(TKey key)
        {
#if ENABLE_UNITY_COLLECTIONS_CHECKS
            AtomicSafetyHandle.CheckWriteAndThrow(m_Safety);
#endif
            NativeHashMapBase <TKey, TValue> .Remove(m_Buffer, key, true);
        }
예제 #5
0
        public void Remove(NativeMultiHashMapIterator <TKey> it)
        {
#if ENABLE_UNITY_COLLECTIONS_CHECKS
            AtomicSafetyHandle.CheckWriteAndThrow(m_Safety);
#endif
            NativeHashMapBase <TKey, TValue> .Remove(m_Buffer, it);
        }
예제 #6
0
        public void Add(TKey key, TValue item)
        {
#if ENABLE_UNITY_COLLECTIONS_CHECKS
            AtomicSafetyHandle.CheckWriteAndThrow(m_Safety);
#endif
            NativeHashMapBase <TKey, TValue> .TryAdd(m_Buffer, key, item, true, m_AllocatorLabel);
        }
예제 #7
0
        public void Clear()
        {
#if ENABLE_UNITY_COLLECTIONS_CHECKS
            AtomicSafetyHandle.CheckWriteAndThrow(m_Safety);
#endif
            NativeHashMapBase <TKey, TValue> .Clear(m_Buffer);
        }
예제 #8
0
            public bool TryAdd(TKey key, TValue item)
            {
#if ENABLE_UNITY_COLLECTIONS_CHECKS
                AtomicSafetyHandle.CheckWriteAndThrow(m_Safety);
#endif
                return(NativeHashMapBase <TKey, TValue> .TryAddAtomic(m_Buffer, key, item, m_ThreadIndex));
            }
예제 #9
0
 unsafe public bool TryGetFirstValue(TKey key, out TValue item, out NativeMultiHashMapIterator <TKey> it)
 {
                 #if ENABLE_UNITY_COLLECTIONS_CHECKS
     AtomicSafetyHandle.CheckReadAndThrow(m_Safety);
                 #endif
     return(NativeHashMapBase <TKey, TValue> .TryGetFirstValueAtomic((NativeHashMapData *)m_Buffer, key, out item, out it));
 }
예제 #10
0
 unsafe public bool TryAdd(TKey key, TValue item)
 {
                 #if ENABLE_UNITY_COLLECTIONS_CHECKS
     AtomicSafetyHandle.CheckWriteAndThrow(m_Safety);
                 #endif
     return(NativeHashMapBase <TKey, TValue> .TryAdd((NativeHashMapData *)m_Buffer, key, item, false, m_AllocatorLabel));
 }