commsfwtools/commstools/utracedecoder/inc/messagedefparser/enumidentifier.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 ENUMIDENTIFIER_H
       
    17 #define ENUMIDENTIFIER_H
       
    18 
       
    19 #include <vector>
       
    20 
       
    21 #include "integeridentifier.h"
       
    22 #include "constidentifier.h"
       
    23 
       
    24 namespace Parser
       
    25 {
       
    26 
       
    27 //class CEnumValueIdentifier;
       
    28 typedef CConstIdentifier CEnumValueIdentifier;
       
    29 
       
    30 class CEnumTypeIdentifier : public CIntegerTypeIdentifier
       
    31     {
       
    32     public:
       
    33         explicit CEnumTypeIdentifier(const char* aName)
       
    34             : CIntegerTypeIdentifier(Parser::EEnumTypeIdentifier, aName)
       
    35             {
       
    36             iSize = 4;
       
    37             }
       
    38 
       
    39     public:
       
    40         void AddValue(CEnumValueIdentifier* aEnumValue);
       
    41         CIdentifierBase* FindValue(const char* aName);
       
    42 
       
    43         inline void SetSize(int aSize)
       
    44             {
       
    45             iSize = aSize;
       
    46             }
       
    47 
       
    48         virtual void Describe(const unsigned char* aData, unsigned int aLength, const void* aOptions, std::ostream& aDescription) const;
       
    49 
       
    50     public:
       
    51         std::vector<CEnumValueIdentifier*> iEnumValues;
       
    52         TIntegerIdentifierOptions iFormatOptions;
       
    53     };
       
    54 
       
    55 
       
    56 /*
       
    57 class CEnumValueIdentifier : public CIdentifierBase
       
    58     {
       
    59     public:
       
    60         explicit CEnumValueIdentifier(const char* aName, const CEnumTypeIdentifier& aEnumType)
       
    61             : CIdentifierBase(Parser::EEnumValueIdentifier, aName), iEnumType(aEnumType), iValue(0)
       
    62             {
       
    63             }
       
    64 
       
    65         virtual void Describe(const unsigned char* aData, unsigned int aLength, const void* aOptions, std::ostream& aDescription) const;
       
    66 
       
    67     public:
       
    68         const CEnumTypeIdentifier& iEnumType;
       
    69         unsigned int iValue;
       
    70     };
       
    71 */
       
    72 
       
    73 } // namespace Parser
       
    74 
       
    75 #endif
       
    76 // ENUMIDENTIFIER_H
       
    77