30
|
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 |
#include <memspy/api/memspyapimemorytrackingcycle.h>
|
|
19 |
#include <memspy/engine/memspymemorytrackingcycledata.h>
|
|
20 |
|
|
21 |
EXPORT_C TInt CMemSpyApiMemoryTrackingCycle::CycleNumber() const
|
|
22 |
{
|
|
23 |
return iData->iCycleNumber;
|
|
24 |
}
|
|
25 |
|
|
26 |
EXPORT_C const TTime& CMemSpyApiMemoryTrackingCycle::Time() const
|
|
27 |
{
|
|
28 |
return iData->iTime;
|
|
29 |
}
|
|
30 |
|
|
31 |
EXPORT_C const TDesC& CMemSpyApiMemoryTrackingCycle::Caption() const
|
|
32 |
{
|
|
33 |
return iData->iCaption;
|
|
34 |
}
|
|
35 |
|
|
36 |
EXPORT_C const TInt64& CMemSpyApiMemoryTrackingCycle::FreeMemory() const
|
|
37 |
{
|
|
38 |
return iData->iFreeMemory;
|
|
39 |
}
|
|
40 |
|
|
41 |
EXPORT_C TInt64 CMemSpyApiMemoryTrackingCycle::MemoryDelta() const
|
|
42 |
{
|
|
43 |
return iData->iMemoryDelta;
|
|
44 |
}
|
|
45 |
|
|
46 |
EXPORT_C TInt64 CMemSpyApiMemoryTrackingCycle::PreviousCycleDiff() const
|
|
47 |
{
|
|
48 |
return iData->iPreviousCycleDiff;
|
|
49 |
}
|
|
50 |
|
|
51 |
EXPORT_C CMemSpyApiMemoryTrackingCycle::~CMemSpyApiMemoryTrackingCycle()
|
|
52 |
{
|
|
53 |
delete iData;
|
|
54 |
}
|
|
55 |
|
|
56 |
CMemSpyApiMemoryTrackingCycle* CMemSpyApiMemoryTrackingCycle::NewL(const TMemSpyMemoryTrackingCycleData& aData)
|
|
57 |
{
|
|
58 |
CMemSpyApiMemoryTrackingCycle* self = CMemSpyApiMemoryTrackingCycle::NewLC(aData);
|
|
59 |
CleanupStack::Pop(self);
|
|
60 |
return (self);
|
|
61 |
}
|
|
62 |
|
|
63 |
CMemSpyApiMemoryTrackingCycle* CMemSpyApiMemoryTrackingCycle::NewLC(const TMemSpyMemoryTrackingCycleData& aData)
|
|
64 |
{
|
|
65 |
CMemSpyApiMemoryTrackingCycle* self = new (ELeave) CMemSpyApiMemoryTrackingCycle;
|
|
66 |
CleanupStack::PushL(self);
|
|
67 |
self->ConstructL(aData);
|
|
68 |
return self;
|
|
69 |
}
|
|
70 |
|
|
71 |
CMemSpyApiMemoryTrackingCycle::CMemSpyApiMemoryTrackingCycle()
|
|
72 |
{
|
|
73 |
}
|
|
74 |
|
|
75 |
void CMemSpyApiMemoryTrackingCycle::ConstructL(const TMemSpyMemoryTrackingCycleData& aData)
|
|
76 |
{
|
|
77 |
iData = new (ELeave) TMemSpyMemoryTrackingCycleData(aData);
|
|
78 |
}
|