|
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 SIGNATUREPROCESSOR_H |
|
17 #define SIGNATUREPROCESSOR_H |
|
18 |
|
19 #include "keywordprocessorbase.h" |
|
20 #include "signatureidentifier.h" |
|
21 |
|
22 namespace Parser |
|
23 { |
|
24 |
|
25 class CSignatureProcessor : public CKeywordProcessor<Parser::EStateSignature, Parser::CSignatureIdentifier> |
|
26 { |
|
27 public: |
|
28 explicit CSignatureProcessor(CDefinitionParser& aStateMachine) |
|
29 : CKeywordProcessor<Parser::EStateSignature, Parser::CSignatureIdentifier>(aStateMachine), iTempMember(NULL) |
|
30 { |
|
31 } |
|
32 |
|
33 public: |
|
34 //virtual void EnterState(); |
|
35 virtual void ProcessState(); |
|
36 |
|
37 private: |
|
38 enum |
|
39 { |
|
40 EStateExpectSignatureIdentifier = CKeywordProcessorBase::EStateInitialState, |
|
41 EStateExpectTypeIdOrBaseColon, |
|
42 EStateExpectTypeIdEquals, |
|
43 EStateExpectSignatureUidValue, |
|
44 EStateExpectSignatureIdColon, |
|
45 EStateExpectSignatureIdValue, |
|
46 EStateExpectMoreMembersOrEnd, |
|
47 EStateExpectMemberName, |
|
48 EStateExpectMemberNameOrFormat, |
|
49 EStateExpectEndSignature, |
|
50 EStateExpectTypeId, |
|
51 EStateExpectPadSize, |
|
52 EStateExpectSignatureBase, |
|
53 }; |
|
54 |
|
55 void AddMember(TMember* aMember); |
|
56 const TMember* FindMember(const char* aName); |
|
57 |
|
58 private: |
|
59 TMember* iTempMember; |
|
60 }; |
|
61 |
|
62 } // namespace Parser |
|
63 |
|
64 #endif |
|
65 // SIGNATUREPROCESSOR_H |
|
66 |