51
|
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 MEMSPYENGINEOUTPUTLIST_H
|
|
19 |
#define MEMSPYENGINEOUTPUTLIST_H
|
|
20 |
|
|
21 |
// System includes
|
|
22 |
#include <e32base.h>
|
|
23 |
#include <bamdesca.h>
|
|
24 |
|
|
25 |
// Classes referenced
|
|
26 |
class CMemSpyEngineOutputSink;
|
|
27 |
class CMemSpyEngineOutputListItem;
|
|
28 |
|
|
29 |
|
|
30 |
NONSHARABLE_CLASS( CMemSpyEngineOutputList ) : public CBase, public MDesCArray
|
|
31 |
{
|
|
32 |
public:
|
|
33 |
static CMemSpyEngineOutputList* NewL();
|
|
34 |
static CMemSpyEngineOutputList* NewLC( CMemSpyEngineOutputSink& aSink );
|
|
35 |
~CMemSpyEngineOutputList();
|
|
36 |
|
|
37 |
private:
|
|
38 |
CMemSpyEngineOutputList( CMemSpyEngineOutputSink* aSink = NULL );
|
|
39 |
void ConstructL();
|
|
40 |
|
|
41 |
public: // From MDesCArray
|
|
42 |
TInt MdcaCount() const;
|
|
43 |
TPtrC MdcaPoint( TInt aPos ) const;
|
|
44 |
|
|
45 |
public: // API - add
|
|
46 |
void AddItemL( const TDesC& aCaption );
|
|
47 |
void AddItemL( const TDesC& aCaption, const TDesC& aValue );
|
|
48 |
void AddItemL( const TDesC& aCaption, TInt aValue );
|
|
49 |
void AddItemL( const TDesC& aCaption, TUint aValue );
|
|
50 |
void AddItemL( const TDesC& aCaption, const TInt64& aValue );
|
|
51 |
void AddItemL( const TDesC& aCaption, TAny* aValue );
|
|
52 |
void AddItemL( const TDesC& aCaption, TUint* aValue );
|
|
53 |
void AddItemL( const TDesC& aCaption, TUint8* aValue );
|
|
54 |
void AddItemFormatL( const TDesC& aCaption, TRefByValue<const TDesC> aValueFormat, ... );
|
|
55 |
void AddItemFormatL( TRefByValue<const TDesC> aFormat, ... );
|
|
56 |
void AddItemUCL( const TDesC& aCaption, const TDesC& aValue );
|
|
57 |
void AddItemFormatUCL( const TDesC& aCaption, TRefByValue<const TDesC> aValueFormat, ... );
|
|
58 |
void AddItemFormatUCL( TRefByValue<const TDesC> aFormat, ... );
|
|
59 |
void AddItemHexL( const TDesC& aCaption, TUint aValue );
|
|
60 |
void AddItemYesNoL( const TDesC& aCaption, TBool aYes );
|
|
61 |
void AddItemTrueFalseL( const TDesC& aCaption, TBool aTrue );
|
|
62 |
void AddItemOnOffL( const TDesC& aCaption, TBool aOn );
|
|
63 |
void AddItemPercentageL( const TDesC& aCaption, TInt aOneHundredPercentValue, TInt aValue );
|
|
64 |
void AddBlankItemL( TInt aRepetitions = 1 );
|
|
65 |
void AddUnderlineForPreviousItemL( TChar aUnderlineCharacter = '=', TInt aBlankItemCount = 1 );
|
|
66 |
|
|
67 |
public: // API - insert
|
|
68 |
void InsertItemL( TInt aPos, const TDesC& aCaption );
|
|
69 |
void InsertItemL( TInt aPos, const TDesC& aCaption, const TDesC& aValue );
|
|
70 |
void InsertItemFormatUCL( TInt aPos, TRefByValue<const TDesC> aValueFormat, ... );
|
|
71 |
void InsertBlankItemL( TInt aPos, TInt aRepetitions = 1 );
|
|
72 |
void InsertUnderlineForItemAtL( TInt aPos, TChar aUnderlineCharacter = '=', TInt aBlankItemCount = 1 );
|
|
73 |
|
|
74 |
public: // API - print
|
|
75 |
void PrintL();
|
|
76 |
void PrintL( CMemSpyEngineOutputSink& aSink );
|
|
77 |
|
62
|
78 |
public: // API - flush
|
|
79 |
void FlushL();
|
|
80 |
|
51
|
81 |
public: // API - access
|
|
82 |
CMemSpyEngineOutputListItem& Item( TInt aPos );
|
|
83 |
const CMemSpyEngineOutputListItem& Item( TInt aPos ) const;
|
|
84 |
inline TInt Count() const { return iItems.Count(); }
|
|
85 |
|
|
86 |
private: // Internal methods
|
|
87 |
TPtr& FormatBuffer();
|
|
88 |
|
|
89 |
private: // Data members
|
|
90 |
CMemSpyEngineOutputSink* iSink;
|
|
91 |
HBufC* iFormatBuffer;
|
|
92 |
TPtr iFormatBufferPtr;
|
|
93 |
RPointerArray<CMemSpyEngineOutputListItem> iItems;
|
|
94 |
};
|
|
95 |
|
|
96 |
|
62
|
97 |
#endif
|