|
1 /* |
|
2 * Copyright (c) 2004-2008 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 using System; |
|
19 using System.Collections; |
|
20 using SymBuildParsingLib.Utils; |
|
21 |
|
22 namespace SymBuildParsingLib.Common.Objects |
|
23 { |
|
24 public class SymDefineDirectory |
|
25 { |
|
26 #region Constructors & destructor |
|
27 public SymDefineDirectory() |
|
28 { |
|
29 } |
|
30 |
|
31 public SymDefineDirectory( SymDefineDirectory aCopy ) |
|
32 { |
|
33 } |
|
34 #endregion |
|
35 |
|
36 #region API |
|
37 public void Add( SymDefineDefinition aDefinition ) |
|
38 { |
|
39 object key = aDefinition.GetHashCode(); |
|
40 iDefines.Add( key, aDefinition ); |
|
41 } |
|
42 |
|
43 public bool IsDefined( string aName ) |
|
44 { |
|
45 SymDefineDefinition ret = DefineDefinition( aName ); |
|
46 return ( ret != null ); |
|
47 } |
|
48 |
|
49 public SymDefineDefinition DefineDefinition( string aName ) |
|
50 { |
|
51 SymDefineDefinition ret = null; |
|
52 // |
|
53 object key = new SymDefineDefinition( aName ).GetHashCode(); |
|
54 object item = iDefines[ key ]; |
|
55 if ( item != null ) |
|
56 { |
|
57 ret = (SymDefineDefinition) item; |
|
58 } |
|
59 // |
|
60 return ret; |
|
61 } |
|
62 #endregion |
|
63 |
|
64 #region Properties |
|
65 #endregion |
|
66 |
|
67 #region Internal methods |
|
68 #endregion |
|
69 |
|
70 #region Data members |
|
71 private Hashtable iDefines = new Hashtable( 10 ); |
|
72 #endregion |
|
73 } |
|
74 } |