crashanalysercmd/PerfToolsSharedLibraries/Engine/SymbolLib/Generic/Engine/GenericSymbolEngineEnumerator.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.Text; |
|
20 using System.Threading; |
|
21 using System.Collections.Generic; |
|
22 using SymbianUtils; |
|
23 using SymbianUtils.Range; |
|
24 |
|
25 namespace SymbolLib.Generics |
|
26 { |
|
27 internal class GenericSymbolEngineEnumerator : IEnumerator<GenericSymbolCollection> |
|
28 { |
|
29 #region Construct & destruct |
|
30 public GenericSymbolEngineEnumerator( GenericSymbolEngine aEngine ) |
|
31 { |
|
32 iEngine = aEngine; |
|
33 } |
|
34 #endregion |
|
35 |
|
36 #region From IEnumerator |
|
37 public void Reset() |
|
38 { |
|
39 iCurrentIndex = -1; |
|
40 } |
|
41 |
|
42 public object Current |
|
43 { |
|
44 get |
|
45 { |
|
46 return iEngine[ iCurrentIndex ]; |
|
47 } |
|
48 } |
|
49 |
|
50 public bool MoveNext() |
|
51 { |
|
52 return ( ++iCurrentIndex < iEngine.NumberOfCollections ); |
|
53 } |
|
54 #endregion |
|
55 |
|
56 #region From IEnumerator<GenericSymbolCollection> |
|
57 GenericSymbolCollection IEnumerator<GenericSymbolCollection>.Current |
|
58 { |
|
59 get { return iEngine[ iCurrentIndex ]; } |
|
60 } |
|
61 #endregion |
|
62 |
|
63 #region From IDisposable |
|
64 public void Dispose() |
|
65 { |
|
66 } |
|
67 #endregion |
|
68 |
|
69 #region Data members |
|
70 private readonly GenericSymbolEngine iEngine; |
|
71 private int iCurrentIndex = -1; |
|
72 #endregion |
|
73 } |
|
74 } |