// * // * Copyright (C) 2008 Roger Alsing : http://www.RogerAlsing.com // * // * This library is free software; you can redistribute it and/or modify it // * under the terms of the GNU Lesser General Public License 2.1 or later, as // * published by the Free Software Foundation. See the included license.txt // * or http://www.gnu.org/copyleft/lesser.html for details. // * // * using System.Collections; namespace Alsing.SourceCode { /// /// /// public sealed class PatternListList : IEnumerable { private readonly ArrayList mGroups = new ArrayList(); /// /// /// public bool IsKeyword; /// /// /// public bool IsOperator; /// /// /// public SpanDefinition Parent; /// /// /// public PatternListList() {} public PatternListList(SpanDefinition parent) { Parent = parent; } /// /// /// public PatternList this[int index] { get { return (PatternList) mGroups[index]; } set { mGroups[index] = value; } } #region IEnumerable Members /// /// /// /// public IEnumerator GetEnumerator() { return mGroups.GetEnumerator(); } #endregion /// /// /// /// /// public PatternList Add(PatternList Group) { mGroups.Add(Group); Group.Parent = this; if (Parent != null && Parent.Parent != null) Parent.Parent.ChangeVersion(); return Group; } /// /// /// public void Clear() { mGroups.Clear(); } } }