コード例 #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));
 }