equal
deleted
inserted
replaced
|
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 |
|
21 namespace SymbianUtils.XRef |
|
22 { |
|
23 public class XRefEngine |
|
24 { |
|
25 #region Constructors |
|
26 public XRefEngine() |
|
27 { |
|
28 } |
|
29 #endregion |
|
30 |
|
31 #region API |
|
32 public bool Contains( XRefIdentifer aIdentifier ) |
|
33 { |
|
34 bool ret = false; |
|
35 // |
|
36 foreach ( XRefIdentifer identifier in iIdentifiers ) |
|
37 { |
|
38 if ( identifier.Identifier == aIdentifier.Identifier ) |
|
39 { |
|
40 ret = true; |
|
41 break; |
|
42 } |
|
43 } |
|
44 // |
|
45 return ret; |
|
46 } |
|
47 |
|
48 public void ParseIdentifiers( string aText ) |
|
49 { |
|
50 XRefIdentiferExtractor extractor = new XRefIdentiferExtractor( aText ); |
|
51 |
|
52 // Add items, checking for dupes |
|
53 foreach ( XRefIdentifer identifier in extractor.Identifiers ) |
|
54 { |
|
55 if ( !Contains( identifier ) ) |
|
56 { |
|
57 iIdentifiers.Add( identifier ); |
|
58 } |
|
59 } |
|
60 } |
|
61 #endregion |
|
62 |
|
63 #region Properties |
|
64 public List<XRefIdentifer> Identifiers |
|
65 { |
|
66 get { return iIdentifiers; } |
|
67 } |
|
68 #endregion |
|
69 |
|
70 #region Data members |
|
71 private readonly List<XRefIdentifer> iIdentifiers = new List<XRefIdentifer>(); |
|
72 #endregion |
|
73 } |
|
74 } |