crashanalysercmd/PerfToolsSharedLibraries/Engine/SymbianUtils/BasicTypes/SymAddress.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.Collections.Generic; |
|
19 using System.Text; |
|
20 |
|
21 namespace SymbianUtils.BasicTypes |
|
22 { |
|
23 public class SymAddress |
|
24 { |
|
25 #region Constructors |
|
26 public SymAddress() |
|
27 : this( 0 ) |
|
28 { |
|
29 } |
|
30 |
|
31 public SymAddress( uint aValue ) |
|
32 { |
|
33 iAddress = aValue; |
|
34 } |
|
35 #endregion |
|
36 |
|
37 #region API |
|
38 #endregion |
|
39 |
|
40 #region Properties |
|
41 public uint Address |
|
42 { |
|
43 get { return iAddress; } |
|
44 set { iAddress = value; } |
|
45 } |
|
46 |
|
47 public virtual string AddressBinary |
|
48 { |
|
49 get |
|
50 { |
|
51 string ret = SymBitUtils.BeautifyBits( iAddress, 32 ); |
|
52 return ret; |
|
53 } |
|
54 } |
|
55 |
|
56 public virtual string AddressHex |
|
57 { |
|
58 get |
|
59 { |
|
60 string ret = this.Address.ToString( "x8" ); |
|
61 return ret; |
|
62 } |
|
63 } |
|
64 #endregion |
|
65 |
|
66 #region Operators |
|
67 public static implicit operator uint( SymAddress aAddress ) |
|
68 { |
|
69 return aAddress.Address; |
|
70 } |
|
71 #endregion |
|
72 |
|
73 #region From System.Object |
|
74 public override string ToString() |
|
75 { |
|
76 string ret = AddressHex; |
|
77 return ret; |
|
78 } |
|
79 #endregion |
|
80 |
|
81 #region Data members |
|
82 private uint iAddress = 0; |
|
83 #endregion |
|
84 } |
|
85 } |