コード例 #1
0
        // Operations (type-safe ICloneable)
        /// <summary>
///
/// </summary>
/// <returns></returns>
        public BlockTypeCollection Clone()
        {
            BlockTypeCollection tc = new BlockTypeCollection();

            tc.AddRange(this);
            tc.Capacity  = this.m_array.Length;
            tc.m_version = this.m_version;
            return(tc);
        }
コード例 #2
0
        /// <summary>
///
/// </summary>
/// <param name="collection"></param>
        public void AddRange(BlockTypeCollection collection)
        {
            // for (int i=0; i < collection.Count; ++i) Add(collection[i]);

            ++m_version;

            Capacity += collection.Count;
            Array.Copy(collection.m_array, 0, this.m_array, m_count, collection.m_count);
            m_count += collection.Count;
        }
コード例 #3
0
        /// <summary>
///
/// </summary>
/// <param name="collection"></param>
        public BlockTypeCollection(BlockTypeCollection collection)
        {
            AddRange(collection);
        }
コード例 #4
0
            // Construction

            public Enumerator(BlockTypeCollection tc)
            {
                m_collection = tc;
                m_index      = -1;
                m_version    = tc.m_version;
            }
コード例 #5
0
ファイル: BlockTypeCollection.cs プロジェクト: bartKam/hardek
		/// <summary>
/// 
/// </summary>
/// <param name="collection"></param>
		public BlockTypeCollection(BlockTypeCollection collection)
		{
			AddRange(collection);
		}
コード例 #6
0
ファイル: BlockTypeCollection.cs プロジェクト: bartKam/hardek
			// Construction

			public Enumerator(BlockTypeCollection tc)
			{
				m_collection = tc;
				m_index = -1;
				m_version = tc.m_version;
			}
コード例 #7
0
ファイル: BlockTypeCollection.cs プロジェクト: bartKam/hardek
		/// <summary>
/// 
/// </summary>
/// <param name="collection"></param>
		public void AddRange(BlockTypeCollection collection)
		{
			// for (int i=0; i < collection.Count; ++i) Add(collection[i]);

			++m_version;

			Capacity += collection.Count;
			Array.Copy(collection.m_array, 0, this.m_array, m_count, collection.m_count);
			m_count += collection.Count;
		}
コード例 #8
0
ファイル: BlockTypeCollection.cs プロジェクト: bartKam/hardek
		// Operations (type-safe ICloneable)
		/// <summary>
/// 
/// </summary>
/// <returns></returns>
		public BlockTypeCollection Clone()
		{
			BlockTypeCollection tc = new BlockTypeCollection();
			tc.AddRange(this);
			tc.Capacity = this.m_array.Length;
			tc.m_version = this.m_version;
			return tc;
		}