crashanalysercmd/PerfToolsSharedLibraries/Engine/SymbolLib/Sources/Symbol/Collection/SymbolsForBinaryCollectionEnumerator.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.Collections; |
|
19 using System.Collections.Generic; |
|
20 using SymbolLib.Sources.Symbol.File; |
|
21 |
|
22 namespace SymbolLib.Sources.Symbol.Collection |
|
23 { |
|
24 internal class SymbolsForBinaryCollectionEnumerator : IEnumerator<SymbolsForBinary> |
|
25 { |
|
26 #region Constructors & destructor |
|
27 public SymbolsForBinaryCollectionEnumerator( SymbolsForBinaryCollection aCollection ) |
|
28 { |
|
29 iCollection = aCollection; |
|
30 } |
|
31 #endregion |
|
32 |
|
33 #region IEnumerator Members |
|
34 public void Reset() |
|
35 { |
|
36 iCurrentIndex = -1; |
|
37 } |
|
38 |
|
39 public object Current |
|
40 { |
|
41 get |
|
42 { |
|
43 return iCollection[ iCurrentIndex ]; |
|
44 } |
|
45 } |
|
46 |
|
47 public bool MoveNext() |
|
48 { |
|
49 return ( ++iCurrentIndex < iCollection.Count ); |
|
50 } |
|
51 #endregion |
|
52 |
|
53 #region From IEnumerator<SymbolsForBinary> |
|
54 SymbolsForBinary IEnumerator<SymbolsForBinary>.Current |
|
55 { |
|
56 get { return iCollection[ iCurrentIndex ]; } |
|
57 } |
|
58 #endregion |
|
59 |
|
60 #region From IDisposable |
|
61 public void Dispose() |
|
62 { |
|
63 } |
|
64 #endregion |
|
65 |
|
66 #region Data members |
|
67 private readonly SymbolsForBinaryCollection iCollection; |
|
68 private int iCurrentIndex = -1; |
|
69 #endregion |
|
70 } |
|
71 } |