crashanalysercmd/PerfToolsSharedLibraries/Engine/SymBuildParsingLib/Token/SymTokenContainerEnumerator.cs
changeset 0 818e61de6cd1
equal deleted inserted replaced
-1:000000000000 0:818e61de6cd1
       
     1 /*
       
     2 * Copyright (c) 2004-2008 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 
       
    18 using System;
       
    19 using System.Text;
       
    20 using System.Collections;
       
    21 
       
    22 namespace SymBuildParsingLib.Token
       
    23 {
       
    24 	internal class SymTokenContainerEnumerator : IEnumerator
       
    25 	{
       
    26 		#region Constructors & destructor
       
    27 		public SymTokenContainerEnumerator( SymTokenContainer aContainer )
       
    28 		{
       
    29 			iContainer = aContainer;
       
    30 		}
       
    31 		#endregion
       
    32 
       
    33 		#region IEnumerator Members
       
    34 		void IEnumerator.Reset()
       
    35 		{
       
    36 			iEnumeratorIndex = -1;
       
    37 		}
       
    38 
       
    39 		object IEnumerator.Current
       
    40 		{
       
    41 			get
       
    42 			{
       
    43 				return iContainer[ iEnumeratorIndex ];
       
    44 			}
       
    45 		}
       
    46 
       
    47 		bool IEnumerator.MoveNext()
       
    48 		{
       
    49 			return ( ++iEnumeratorIndex < iContainer.Count );
       
    50 		}
       
    51 		#endregion
       
    52 
       
    53 		#region Data members
       
    54 		private int iEnumeratorIndex = -1;
       
    55 		private readonly SymTokenContainer iContainer;
       
    56 		#endregion
       
    57 	}
       
    58 }