|
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 using SymbianUtils.PluginManager; |
|
21 using SymbianStructuresLib.Arm; |
|
22 using SymbianStructuresLib.Arm.Instructions; |
|
23 using SymbianDebugLib.Engine; |
|
24 using SymbianDebugLib.PluginAPI.Types; |
|
25 |
|
26 namespace SymbianDebugLib.PluginAPI.Types.MetaDataConfig |
|
27 { |
|
28 public abstract class DbgEngineMetaDataConfig : DbgPluginEngine |
|
29 { |
|
30 #region Factory function |
|
31 public static DbgEngineMetaDataConfig New( DbgEngine aEngine ) |
|
32 { |
|
33 PluginManager<DbgEngineMetaDataConfig> loader = new PluginManager<DbgEngineMetaDataConfig>( 1 ); |
|
34 loader.Load( new object[] { aEngine } ); |
|
35 // |
|
36 DbgEngineMetaDataConfig ret = null; |
|
37 foreach ( DbgEngineMetaDataConfig engine in loader ) |
|
38 { |
|
39 if ( engine is DbgEngineMetaDataConfigStub && loader.Count > 1 ) |
|
40 { |
|
41 continue; |
|
42 } |
|
43 else |
|
44 { |
|
45 ret = engine; |
|
46 break; |
|
47 } |
|
48 } |
|
49 // |
|
50 return ret; |
|
51 } |
|
52 #endregion |
|
53 |
|
54 #region Constructors |
|
55 protected DbgEngineMetaDataConfig( DbgEngine aEngine ) |
|
56 : base( aEngine ) |
|
57 { |
|
58 } |
|
59 #endregion |
|
60 |
|
61 #region From DbgPluginEngine |
|
62 protected override void DoClear() |
|
63 { |
|
64 base.Engine.ConfigManager.Clear(); |
|
65 } |
|
66 #endregion |
|
67 |
|
68 #region Properties |
|
69 public bool IsConfigurationDataAvailable |
|
70 { |
|
71 get { return base.Engine.ConfigManager.Count > 0; } |
|
72 } |
|
73 #endregion |
|
74 |
|
75 #region Internal methods |
|
76 #endregion |
|
77 |
|
78 #region Data members |
|
79 #endregion |
|
80 } |
|
81 } |