예제 #1
0
        // Operations (type-safe ICloneable)
        /// <summary>
///
/// </summary>
/// <returns></returns>
        public SegmentCollection Clone()
        {
            SegmentCollection tc = new SegmentCollection();

            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(SegmentCollection 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
 // Construction
 public Enumerator(SegmentCollection tc)
 {
     m_collection = tc;
     m_index = -1;
     m_version = tc.m_version;
 }
예제 #4
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="collection"></param>
 public SegmentCollection(SegmentCollection collection)
 {
     AddRange(collection);
 }
예제 #5
0
 // Operations (type-safe ICloneable)
 /// <summary>
 /// 
 /// </summary>
 /// <returns></returns>
 public SegmentCollection Clone()
 {
     SegmentCollection tc = new SegmentCollection();
     tc.AddRange(this);
     tc.Capacity = this.m_array.Length;
     tc.m_version = this.m_version;
     return tc;
 }
예제 #6
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="collection"></param>
        public void AddRange(SegmentCollection 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;
        }
예제 #7
0
            // Construction

            public Enumerator(SegmentCollection tc)
            {
                m_collection = tc;
                m_index      = -1;
                m_version    = tc.m_version;
            }
예제 #8
0
        /// <summary>
///
/// </summary>
/// <param name="collection"></param>
        public SegmentCollection(SegmentCollection collection)
        {
            AddRange(collection);
        }