|
1 /* |
|
2 * Copyright (c) 2002-2004 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 |
|
19 #ifndef LAYOUTPARSE_H |
|
20 #define LAYOUTPARSE_H |
|
21 |
|
22 // disable "identifier was truncated to '255' characters in the browser information" warning |
|
23 #pragma warning (disable:4786) |
|
24 #include <vector> |
|
25 #include <string> |
|
26 #include <iosfwd> |
|
27 #include "LayoutCompilerErr.h" |
|
28 #include "Layout.h" |
|
29 using namespace std; |
|
30 |
|
31 |
|
32 /** |
|
33 * LayParseErr |
|
34 * An exception class for .lay file parsing errors |
|
35 */ |
|
36 class LayParseErr : public LayoutCompilerErr |
|
37 { |
|
38 public: |
|
39 LayParseErr(istream& aIn, const string& aTok, const string& aMsg); |
|
40 void Show(ostream& aOut) const; |
|
41 private: |
|
42 string iLoc; |
|
43 string iTok; |
|
44 string iMsg; |
|
45 }; |
|
46 |
|
47 |
|
48 /** |
|
49 * TLayParseValues |
|
50 * Parse the values in a layout cell from .lay format |
|
51 */ |
|
52 class TLayParseValues : public TValues |
|
53 { |
|
54 // This class is generic with respect to the type of line it is used by |
|
55 public: |
|
56 TLayParseValues(TLayoutLine* aLine, string aName); |
|
57 void Parse(istream& aIn); |
|
58 }; |
|
59 |
|
60 |
|
61 /** |
|
62 * TLayParseLayoutLine |
|
63 * Abstract class for common line parsing functionality |
|
64 */ |
|
65 class TLayParseLayoutLine : public TLayoutLine |
|
66 { |
|
67 public: |
|
68 TLayParseLayoutLine(TLayoutTable* aTable, int aId); |
|
69 void Parse(istream& aIn); |
|
70 }; |
|
71 |
|
72 |
|
73 /** |
|
74 * TLayParseLayoutTable |
|
75 * Parse a layout table in .lay format |
|
76 */ |
|
77 class TLayParseLayoutTable : public TLayoutTable |
|
78 { |
|
79 public: |
|
80 TLayParseLayoutTable(TLayout* aTables); |
|
81 virtual void Parse(istream& aIn); |
|
82 }; |
|
83 |
|
84 |
|
85 /** |
|
86 * TLayParseLayout |
|
87 * Parse a layout file in .lay format |
|
88 */ |
|
89 class TLayParseLayout : public TLayout |
|
90 { |
|
91 public: |
|
92 static auto_ptr<TLayParseLayout> Parse(const string& aLayName); |
|
93 void Parse(istream& aIn); |
|
94 }; |
|
95 |
|
96 |
|
97 #endif |
|
98 |
|
99 // End of File |