|
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 |
|
18 #ifndef MEMSPYENGINEOUTPUTLISTITEM_H |
|
19 #define MEMSPYENGINEOUTPUTLISTITEM_H |
|
20 |
|
21 // System includes |
|
22 #include <e32base.h> |
|
23 |
|
24 |
|
25 NONSHARABLE_CLASS( CMemSpyEngineOutputListItem ) : public CBase |
|
26 { |
|
27 friend class CMemSpyEngineOutputList; |
|
28 |
|
29 public: |
|
30 static CMemSpyEngineOutputListItem* NewLC( const CMemSpyEngineOutputListItem& aCopyMe ); |
|
31 static CMemSpyEngineOutputListItem* NewLC( const TDesC& aCaption ); |
|
32 static CMemSpyEngineOutputListItem* NewLC( const TDesC& aCaption, const TDesC& aValue ); |
|
33 static CMemSpyEngineOutputListItem* NewLC( const TDesC& aCaption, TUint aValue ); |
|
34 static CMemSpyEngineOutputListItem* NewHexLC( const TDesC& aCaption, TUint aValue ); |
|
35 static CMemSpyEngineOutputListItem* NewDecimalLC( const TDesC& aCaption, TInt aValue ); |
|
36 static CMemSpyEngineOutputListItem* NewLongLC( const TDesC& aCaption, const TInt64& aValue ); |
|
37 static CMemSpyEngineOutputListItem* NewYesNoLC( const TDesC& aCaption, TBool aYes ); |
|
38 static CMemSpyEngineOutputListItem* NewTrueFalseLC( const TDesC& aCaption, TBool aTrue ); |
|
39 static CMemSpyEngineOutputListItem* NewOnOffLC( const TDesC& aCaption, TBool aOn ); |
|
40 static CMemSpyEngineOutputListItem* NewPercentageLC( const TDesC& aCaption, TInt aOneHundredPercentValue, TInt aValue ); |
|
41 ~CMemSpyEngineOutputListItem(); |
|
42 |
|
43 private: |
|
44 CMemSpyEngineOutputListItem(); |
|
45 void ConstructL( const TDesC& aCaption, const TDesC& aValue ); |
|
46 |
|
47 public: // API |
|
48 inline const TDesC& Caption() const { return *iCaption; } |
|
49 inline const TDesC& Value() const { return *iValue; } |
|
50 inline const TDesC& Combined() const { return *iCombined; } |
|
51 void UpdateCombinedL(); |
|
52 |
|
53 public: |
|
54 void SetValueL( const TDesC& aValue ); |
|
55 void SetHexL( TUint aValue ); |
|
56 void SetDecimalL( TInt aValue ); |
|
57 void SetUnsignedL( TUint aValue ); |
|
58 void SetLongL( const TInt64& aValue ); |
|
59 void SetYesNoL( TBool aYes ); |
|
60 void SetTrueFalseL( TBool aTrue ); |
|
61 void SetOnOffL( TBool aOn ); |
|
62 void SetPercentageL( TInt aOneHundredPercentValue, TInt aValue ); |
|
63 |
|
64 private: |
|
65 HBufC* iCaption; |
|
66 HBufC* iValue; |
|
67 HBufC* iCombined; |
|
68 }; |
|
69 |
|
70 |
|
71 |
|
72 #endif |