commsfwtools/commstools/utracedecoder/inc/messagedefparser/enumprocessor.h
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     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 ENUMPROCESSOR_H
       
    17 #define ENUMPROCESSOR_H
       
    18 
       
    19 #include "keywordprocessorbase.h"
       
    20 #include "enumidentifier.h"
       
    21 
       
    22 namespace Parser
       
    23 {
       
    24 class CEnumProcessor : public CKeywordProcessor<Parser::EStateEnum, Parser::CEnumTypeIdentifier>
       
    25     {
       
    26     public:
       
    27         explicit CEnumProcessor(CDefinitionParser& aStateMachine)
       
    28             : CKeywordProcessor<Parser::EStateEnum, Parser::CEnumTypeIdentifier>(aStateMachine),
       
    29             iTempEnumValue(NULL)
       
    30             {
       
    31             }
       
    32 
       
    33     public:
       
    34         //virtual void EnterState();
       
    35         virtual void ProcessState();
       
    36 
       
    37     private:
       
    38         CEnumValueIdentifier* iTempEnumValue;
       
    39         TIntegerIdentifierOptions iFormatOptions;
       
    40 
       
    41         enum
       
    42             {
       
    43             EStateExpectEnumIdentifierOrFormat = CKeywordProcessorBase::EStateInitialState,
       
    44             EStateExpectEnumIdentifier,
       
    45             EStateExpectColon,
       
    46             EStateExpectBaseIntType,
       
    47             EStateExpectEnumValueIdentifierOrEnd,
       
    48             EStateExpectEquals,
       
    49             EStateExpectEnumValue,
       
    50             EStateExpectEndEnum,
       
    51             };
       
    52     };
       
    53 
       
    54 } // namespace Parser
       
    55 
       
    56 #endif
       
    57 // ENUMPROCESSOR_H
       
    58