コード例 #1
0
ファイル: ScopeCollection.cs プロジェクト: ummerland/FireBall
        // Operations (type-safe ICloneable)

        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public ScopeCollection Clone()
        {
            ScopeCollection tc = new ScopeCollection();

            tc.AddRange(this);
            tc.Capacity  = this.m_array.Length;
            tc.m_version = this.m_version;
            return(tc);
        }
コード例 #2
0
ファイル: ScopeCollection.cs プロジェクト: ummerland/FireBall
        /// <summary>
        ///
        /// </summary>
        /// <param name="collection"></param>
        public void AddRange(ScopeCollection 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
        public BlockType()
        {
            this.KeywordsList  = new PatternListList(this);
            this.OperatorsList = new PatternListList(this);

            Style = new TextStyle();
            KeywordsList.Parent      = this;
            KeywordsList.IsKeyword   = true;
            OperatorsList.Parent     = this;
            OperatorsList.IsOperator = true;
            ScopePatterns            = new ScopeCollection(this);
        }
コード例 #4
0
ファイル: BlockType.cs プロジェクト: westybsa/MP.LSharp
		public BlockType()
		{
			this.KeywordsList = new PatternListList(this);
			this.OperatorsList = new PatternListList(this);

			Style = new TextStyle();
			KeywordsList.Parent = this;
			KeywordsList.IsKeyword = true;
			OperatorsList.Parent = this;
			OperatorsList.IsOperator = true;
			ScopePatterns = new ScopeCollection(this);
		}
コード例 #5
0
ファイル: ScopeCollection.cs プロジェクト: ummerland/FireBall
            // Construction

            public Enumerator(ScopeCollection tc)
            {
                m_collection = tc;
                m_index      = -1;
                m_version    = tc.m_version;
            }
コード例 #6
0
ファイル: ScopeCollection.cs プロジェクト: ummerland/FireBall
 /// <summary>
 ///
 /// </summary>
 /// <param name="collection"></param>
 public ScopeCollection(ScopeCollection collection)
 {
     AddRange(collection);
 }
コード例 #7
0
ファイル: ScopeCollection.cs プロジェクト: westybsa/MP.LSharp
		/// <summary>
		/// 
		/// </summary>
		/// <param name="collection"></param>
		public ScopeCollection(ScopeCollection collection)
		{
			AddRange(collection);
		}
コード例 #8
0
ファイル: ScopeCollection.cs プロジェクト: westybsa/MP.LSharp
			// Construction

			public Enumerator(ScopeCollection tc)
			{
				m_collection = tc;
				m_index = -1;
				m_version = tc.m_version;
			}
コード例 #9
0
ファイル: ScopeCollection.cs プロジェクト: westybsa/MP.LSharp
		/// <summary>
		/// 
		/// </summary>
		/// <param name="collection"></param>
		public void AddRange(ScopeCollection 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;
		}
コード例 #10
0
ファイル: ScopeCollection.cs プロジェクト: westybsa/MP.LSharp
		// Operations (type-safe ICloneable)

		/// <summary>
		/// 
		/// </summary>
		/// <returns></returns>
		public ScopeCollection Clone()
		{
			ScopeCollection tc = new ScopeCollection();
			tc.AddRange(this);
			tc.Capacity = this.m_array.Length;
			tc.m_version = this.m_version;
			return tc;
		}