commsfwtools/commstools/utracedecoder/inc/messagedefparser/contextprocessor.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 CONTEXTPROCESSOR_H
       
    17 #define CONTEXTPROCESSOR_H
       
    18 
       
    19 #include "messagedefparser\contextidentifier.h"
       
    20 #include "messagedefparser\keywordprocessorbase.h"
       
    21 
       
    22 namespace Parser
       
    23 {
       
    24 
       
    25 class CContextProcessor : public CKeywordProcessor<Parser::EStateContext, Parser::CContextIdentifier>
       
    26     {
       
    27     public:
       
    28         explicit CContextProcessor(CDefinitionParser& aStateMachine)
       
    29             : CKeywordProcessor<Parser::EStateContext, Parser::CContextIdentifier>(aStateMachine), iTempMember(NULL)
       
    30             {
       
    31             }
       
    32 
       
    33     public:
       
    34         //virtual void EnterState();
       
    35         virtual void ProcessState();
       
    36 
       
    37     private:
       
    38         void CreateTempContext();
       
    39         void CreateTempMember();
       
    40 
       
    41     private:
       
    42         TMember* iTempMember;
       
    43         Parser::TResult iResult;
       
    44 
       
    45         enum
       
    46             {
       
    47             EStateExpectContextIdentifier = CKeywordProcessorBase::EStateInitialState,
       
    48             EStateExpectBaseOrFirstMember,
       
    49             EStateExpectBaseIdentifier,
       
    50             EStateExpectMemberName,
       
    51             EStateExpectMemberNameOrFormat,
       
    52             EStateExpectMoreMembersOrEnd,
       
    53             EStateExpectEndContext,
       
    54             EStateExpectPadSize,
       
    55             };
       
    56     };
       
    57 
       
    58 
       
    59 } // namespace Parser
       
    60 
       
    61 #endif
       
    62 // CONTEXTPROCESSOR_H
       
    63