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