author | timothy.murphy@nokia.com |
Mon, 14 Dec 2009 18:19:38 +0000 | |
changeset 44 | cf0c187b284a |
parent 0 | 044383f39525 |
permissions | -rw-r--r-- |
0
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
1 |
/* |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of the License "Eclipse Public License v1.0" |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
8 |
* |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
11 |
* |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
13 |
* |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
14 |
* Description: |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
15 |
* |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
17 |
|
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
18 |
|
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
19 |
#include "qualifar.h" |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
20 |
|
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
21 |
QualifiedString::QualifiedString(const String& aEntry, const String * aFileName, int aLineNumber) |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
22 |
:iEntry(aEntry), |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
23 |
iFileName((*aFileName)), |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
24 |
iLineNumber(aLineNumber) |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
25 |
{ |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
26 |
} |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
27 |
|
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
28 |
QualifiedString::~QualifiedString() |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
29 |
{ |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
30 |
} |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
31 |
|
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
32 |
String QualifiedString::GetEntry() |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
33 |
{ |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
34 |
return iEntry; |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
35 |
} |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
36 |
|
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
37 |
String QualifiedString::GetFileName() |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
38 |
{ |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
39 |
return iFileName; |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
40 |
} |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
41 |
|
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
42 |
int QualifiedString::GetLineNumber() |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
43 |
{ |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
44 |
return iLineNumber; |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
45 |
} |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
46 |
|
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
47 |
|
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
48 |
QualifiedStringArray::QualifiedStringArray() |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
49 |
{ |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
50 |
} |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
51 |
|
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
52 |
void QualifiedStringArray::Add(QualifiedString * pNewItem) |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
53 |
{ |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
54 |
Array::Add(pNewItem); |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
55 |
} |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
56 |
|
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
57 |
QualifiedStringArrayIterator::QualifiedStringArrayIterator(const QualifiedStringArray & c) |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
58 |
:ArrayIterator(c) |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
59 |
{} |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
60 |
|
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
61 |
QualifiedString* QualifiedStringArrayIterator::operator() () |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
62 |
{ |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
63 |
return (QualifiedString *) ArrayIterator::operator() (); |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
64 |
} |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
65 |
|
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
66 |
ostream& operator<< ( ostream & aOs, QualifiedStringArray & aQualifiedStringArray) |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
67 |
{ |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
68 |
if(aQualifiedStringArray.Size() == 0) |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
69 |
{ |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
70 |
return ( aOs << "<none>"); |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
71 |
} |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
72 |
QualifiedStringArrayIterator next(aQualifiedStringArray); |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
73 |
QualifiedString * pQualifiedString; |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
74 |
//Output first QualifiedString |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
75 |
if( ( pQualifiedString = next() ) != NULL) |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
76 |
{ |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
77 |
aOs << (* pQualifiedString).GetEntry(); |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
78 |
aOs << ":"; |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
79 |
aOs << (* pQualifiedString).GetFileName(); |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
80 |
aOs << ":"; |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
81 |
aOs << (* pQualifiedString).GetLineNumber(); |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
82 |
} |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
83 |
// Output remaining with newline before each |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
84 |
while( ( pQualifiedString = next() ) != NULL) |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
85 |
{ |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
86 |
aOs << "\n"; |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
87 |
aOs << (* pQualifiedString).GetEntry(); |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
88 |
aOs << ":"; |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
89 |
aOs << (* pQualifiedString).GetFileName(); |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
90 |
aOs << ":"; |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
91 |
aOs << (* pQualifiedString).GetLineNumber(); |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
92 |
} |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
93 |
return aOs; |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
94 |
} |
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
95 |
|
044383f39525
Convert Build package from SFL to EPL
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
96 |