|
1 /* |
|
2 * Copyright (c) 2005-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 the License "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 * A Message is an object containing information about a particular |
|
16 * compiler warning or error. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef __MESSAGES_H__ |
|
22 #define __MESSAGES_H__ |
|
23 |
|
24 |
|
25 |
|
26 #include "STRINGAR.H" |
|
27 #include "ASTRING.H" |
|
28 |
|
29 enum { KError, KWarning, }; |
|
30 |
|
31 enum { |
|
32 LT_001, LT_002, LT_003, LT_004, LT_005, |
|
33 LT_006, LT_007, LT_008, LT_009, LT_010, |
|
34 LT_011, LT_012, LT_013, LT_014, LT_015, |
|
35 LT_016, LT_017, LT_018, LT_019, LT_020, |
|
36 LT_021, LT_022, LT_023, LT_024, LT_025, |
|
37 LT_026, LT_027, LT_028, LT_029, LT_030, |
|
38 LT_031, LT_032, LT_033, LT_034, LT_035, |
|
39 LT_036, LT_037, LT_038, LT_039, LT_040, |
|
40 LT_041, LT_042, LT_043, LT_044, LT_045, |
|
41 LT_046, LT_047, |
|
42 }; |
|
43 |
|
44 class Message : public ArrayItem |
|
45 { |
|
46 public: |
|
47 Message(String aMessage, int aIndex, String aTextIndex, bool aActivated=true, int aMessageType=KError); |
|
48 ~Message(); |
|
49 void SetActivationStatus(bool aActivationStatus); |
|
50 bool GetActivated(); |
|
51 String GetMessageOutput(); |
|
52 String GetTextIndex(); |
|
53 int GetIndex(); |
|
54 private: |
|
55 String iMessage; |
|
56 int iIndex; |
|
57 String iTextIndex; |
|
58 bool iActivated; |
|
59 int iMessageType; |
|
60 }; |
|
61 |
|
62 class MessageArray : public Array |
|
63 { |
|
64 public: |
|
65 MessageArray(); |
|
66 void Add( Message * pNewItem); |
|
67 bool InstanceExists(); |
|
68 Message * GetTextEntry(String aEntry); |
|
69 Message * GetEntry(int aEntry); |
|
70 private: |
|
71 bool iInstanceExists; |
|
72 }; |
|
73 |
|
74 class MessageArrayIterator : public ArrayIterator |
|
75 { |
|
76 public: |
|
77 MessageArrayIterator(const MessageArray & c); |
|
78 Message * operator()(); |
|
79 }; |
|
80 |
|
81 #endif |