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: THookCleaner implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 // INCLUDES |
|
19 #include "analyzetoolcleaner.h" |
|
20 #include <e32debug.h> |
|
21 #include "atlog.h" |
|
22 |
|
23 // Global cleaner object |
|
24 static THookCleaner cleaner; |
|
25 |
|
26 // ordinal 1 |
|
27 EXPORT_C ATCLEANERTABLE* GetCallBackAddress() |
|
28 { |
|
29 LOGSTR1( "ATC GetCallBackAddress()" ); |
|
30 |
|
31 return &( cleaner.iTable ); |
|
32 } |
|
33 |
|
34 // ----------------------------------------------------------------------------- |
|
35 // THookCleaner::THookCleaner() |
|
36 // C++ default constructor can NOT contain any code, that |
|
37 // might leave. |
|
38 // ----------------------------------------------------------------------------- |
|
39 // |
|
40 THookCleaner::THookCleaner() |
|
41 { |
|
42 LOGSTR1( "ATC THookCleaner::THookCleaner()" ); |
|
43 |
|
44 iTable.Reset(); |
|
45 } |
|
46 |
|
47 // ----------------------------------------------------------------------------- |
|
48 // THookCleaner::~THookCleaner() |
|
49 // Destructor. |
|
50 // ----------------------------------------------------------------------------- |
|
51 // |
|
52 THookCleaner::~THookCleaner() |
|
53 { |
|
54 LOGSTR1( "ATC THookCleaner::~THookCleaner()" ); |
|
55 |
|
56 for ( TUint i = 0; i < ATCLEANERTABLESIZE; i++ ) |
|
57 { |
|
58 if ( iTable.At( i ) ) |
|
59 { |
|
60 TAnalyzeToolCleanerBase* obj = |
|
61 ( TAnalyzeToolCleanerBase* ) iTable.At( i ); |
|
62 obj->Cleanup(); |
|
63 } |
|
64 } |
|
65 } |
|
66 |
|
67 // End of File |
|