crashanalysercmd/PerfToolsSharedLibraries/Engine/SymBuildParsingLib/Parser/BuildFile/Nodes/SymNodeBuildFilePlatformList.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.Collections.Specialized;
       
    20 using SymBuildParsingLib.Tree;
       
    21 using SymbianTree;
       
    22 
       
    23 namespace SymBuildParsingLib.Parser.BuildFile.Nodes
       
    24 {
       
    25 	public sealed class SymNodeBuildFilePlatformList : SymNodeAddAsChild
       
    26 	{
       
    27 		#region Constructors & destructor
       
    28 		public SymNodeBuildFilePlatformList()
       
    29 		{
       
    30 		}
       
    31 		#endregion
       
    32 
       
    33 		#region API
       
    34 		public void Add( string aPlatform )
       
    35 		{
       
    36 			if	( iPlatforms.IndexOf( aPlatform ) < 0 )
       
    37 			{
       
    38 				iPlatforms.Add( aPlatform );
       
    39 			}
       
    40 		}
       
    41 
       
    42 		public void Remove( string aPlatform )
       
    43 		{
       
    44 			if	( iPlatforms.IndexOf( aPlatform ) >= 0 )
       
    45 			{
       
    46 				iPlatforms.Remove( aPlatform );
       
    47 			}
       
    48 		}
       
    49 
       
    50 		public bool IsPresent( string aPlatform )
       
    51 		{
       
    52 			return ( iPlatforms.IndexOf( aPlatform ) >= 0 );
       
    53 		}
       
    54 
       
    55 		public string At( int aIndex )
       
    56 		{
       
    57 			// NB. Cannot use indexer because it would hide SymNode::this[ int ]
       
    58 			return iPlatforms[ aIndex ];
       
    59 		}
       
    60 		#endregion
       
    61 
       
    62 		#region Properties
       
    63 		public int Count
       
    64 		{
       
    65 			get { return iPlatforms.Count; }
       
    66 		}
       
    67 		#endregion
       
    68 
       
    69 		#region Data members
       
    70 		private StringCollection iPlatforms = new StringCollection();
       
    71 		#endregion
       
    72 	}
       
    73 }