crashanalysercmd/PerfToolsSharedLibraries/Engine/SymbolLib/Generic/Collection/GenericSymbolCollectionList.cs
equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 using System; |
|
18 using System.IO; |
|
19 using System.Collections.Generic; |
|
20 |
|
21 namespace SymbolLib.Generics |
|
22 { |
|
23 public class GenericSymbolCollectionList : IEnumerable< GenericSymbolCollection > |
|
24 { |
|
25 #region Construct & destruct |
|
26 public GenericSymbolCollectionList() |
|
27 { |
|
28 } |
|
29 #endregion |
|
30 |
|
31 #region API |
|
32 public void Add( GenericSymbolCollection aCollection ) |
|
33 { |
|
34 iList.Add( aCollection ); |
|
35 } |
|
36 |
|
37 public void Remove( GenericSymbolCollection aCollection ) |
|
38 { |
|
39 iList.Remove( aCollection ); |
|
40 } |
|
41 |
|
42 public void Reset() |
|
43 { |
|
44 iList.Clear(); |
|
45 } |
|
46 #endregion |
|
47 |
|
48 #region Properties |
|
49 public int Count |
|
50 { |
|
51 get { return iList.Count; } |
|
52 } |
|
53 |
|
54 public GenericSymbolCollection this[ int aIndex ] |
|
55 { |
|
56 get { return (GenericSymbolCollection) iList[ aIndex ]; } |
|
57 } |
|
58 #endregion |
|
59 |
|
60 #region From IEnumerable<GenericSymbolCollection> |
|
61 IEnumerator<GenericSymbolCollection> IEnumerable<GenericSymbolCollection>.GetEnumerator() |
|
62 { |
|
63 foreach ( GenericSymbolCollection col in iList ) |
|
64 { |
|
65 yield return col; |
|
66 } |
|
67 } |
|
68 |
|
69 System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() |
|
70 { |
|
71 foreach ( GenericSymbolCollection col in iList ) |
|
72 { |
|
73 yield return col; |
|
74 } |
|
75 } |
|
76 #endregion |
|
77 |
|
78 #region Data members |
|
79 private List<GenericSymbolCollection> iList = new List<GenericSymbolCollection>( 100 ); |
|
80 #endregion |
|
81 } |
|
82 } |