equal
deleted
inserted
replaced
|
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // DST TZ Database Compiler |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __TZSCANNER_H |
|
19 #define __TZSCANNER_H |
|
20 |
|
21 #include <iostream> |
|
22 #include <fstream> |
|
23 #include <vector> |
|
24 |
|
25 #include "MScanner.h" |
|
26 //============================================================================ |
|
27 // Forward declarations |
|
28 //============================================================================ |
|
29 class MDocument; |
|
30 //============================================================================ |
|
31 // CTzCpScanner class definition |
|
32 //============================================================================ |
|
33 class CTzCpScanner : public MScanner |
|
34 { |
|
35 public: |
|
36 CTzCpScanner(); |
|
37 ~CTzCpScanner(); |
|
38 |
|
39 void SetDocument(MDocument* aDocument) { iDocument = aDocument; } |
|
40 private: |
|
41 //From MScanner |
|
42 int Scan(const char* aFileName); |
|
43 |
|
44 void ControlScanning(); |
|
45 MDocument* iDocument; |
|
46 |
|
47 std::ifstream dbFile; |
|
48 |
|
49 enum EScanState |
|
50 { |
|
51 EWaitFirstChar, |
|
52 EWaitTokenEnd, |
|
53 EWaitTokenStart, |
|
54 EWaitLineFeed |
|
55 }; |
|
56 EScanState scanState; |
|
57 |
|
58 int iLineNo; |
|
59 int iColumnNo; |
|
60 |
|
61 std::string iFileName; |
|
62 const char* iValidChars; |
|
63 }; |
|
64 |
|
65 #endif //__TZSCANNER_H |
|
66 //============================================================================ |
|
67 // End of file |
|
68 //============================================================================ |