crashanalysercmd/PerfToolsSharedLibraries/Engine/SymbianStructuresLib/Debug/Common/Id/PlatformlId.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;
       
    20 using System.Text;
       
    21 using SymbianStructuresLib.Debug.Common.Interfaces;
       
    22 
       
    23 namespace SymbianStructuresLib.Debug.Common.Id
       
    24 {
       
    25     public class PlatformId : IComparable<PlatformId>
       
    26     {
       
    27         #region Constructors
       
    28         public PlatformId( uint aId )
       
    29         {
       
    30             iValue = aId;
       
    31         }
       
    32 
       
    33         public PlatformId( PlatformId aId )
       
    34             : this( aId.Value )
       
    35         {
       
    36         }
       
    37         #endregion
       
    38 
       
    39         #region Constants
       
    40         public const uint KInitialValue = 0;
       
    41         #endregion
       
    42 
       
    43         #region API
       
    44         #endregion
       
    45 
       
    46         #region Properties
       
    47         public uint Value
       
    48         {
       
    49             get { return iValue; }
       
    50             set { iValue = value; }
       
    51         }
       
    52         #endregion
       
    53 
       
    54         #region Operators
       
    55         public static implicit operator ulong( PlatformId aElement )
       
    56         {
       
    57             return aElement.Value;
       
    58         }
       
    59  
       
    60         public static implicit operator string( PlatformId aElement )
       
    61         {
       
    62             return aElement.ToString();
       
    63         }
       
    64         #endregion
       
    65 
       
    66         #region From System.Object
       
    67         public override string ToString()
       
    68         {
       
    69             return iValue.ToString();
       
    70         }
       
    71         #endregion
       
    72 
       
    73         #region From IComparable<PlatformId>
       
    74         public int CompareTo( PlatformId aOther )
       
    75         {
       
    76             int ret = 1;
       
    77             //
       
    78             if ( aOther != null )
       
    79             {
       
    80                 ret = this.Value.CompareTo( aOther.Value );
       
    81             }
       
    82             //
       
    83             return ret;
       
    84         }
       
    85         #endregion
       
    86 
       
    87         #region Data members
       
    88         private uint iValue = KInitialValue;
       
    89         #endregion
       
    90     }
       
    91 }