|
1 // Copyright (c) 2007-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 // |
|
15 |
|
16 #ifndef STRUCTPROCESSOR_H |
|
17 #define STRUCTPROCESSOR_H |
|
18 |
|
19 #include "keywordprocessorbase.h" |
|
20 #include "structidentifier.h" |
|
21 |
|
22 namespace Parser |
|
23 { |
|
24 |
|
25 class CStructProcessor : public CKeywordProcessor<Parser::EStateStruct, Parser::CStructIdentifier> |
|
26 { |
|
27 public: |
|
28 explicit CStructProcessor(CDefinitionParser& aStateMachine) |
|
29 : CKeywordProcessor<Parser::EStateStruct, Parser::CStructIdentifier>(aStateMachine), iTempMember(NULL) |
|
30 { |
|
31 } |
|
32 |
|
33 public: |
|
34 //virtual void EnterState(); |
|
35 virtual void ProcessState(); |
|
36 |
|
37 private: |
|
38 enum |
|
39 { |
|
40 EStateExpectStructIdentifier = CKeywordProcessorBase::EStateInitialState, |
|
41 EStateExpectMoreMembersOrEnd, |
|
42 EStateExpectMemberName, |
|
43 EStateExpectMemberNameOrFormat, |
|
44 EStateExpectEndStruct, |
|
45 EStateExpectPadSize, |
|
46 }; |
|
47 |
|
48 TMember* iTempMember; |
|
49 Parser::TResult iResult; |
|
50 }; |
|
51 |
|
52 } // namespace Parser |
|
53 |
|
54 #endif |
|
55 // STRUCTPROCESSOR_H |
|
56 |