applayerprotocols/wapbase/inc/CBNFNode.h
changeset 0 b16258d2340f
equal deleted inserted replaced
-1:000000000000 0:b16258d2340f
       
     1 // Copyright (c) 1999-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 // BNF node header
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef __CBNFNODE_H__
       
    19 #define __CBNFNODE_H__
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <cnode.h>
       
    23 
       
    24 /** Declares that the "type" for node attributes is stored as a string. */
       
    25 typedef const TDesC* CBNFNodeAttributeType;
       
    26 
       
    27 #define _SHAREDSTRING(X) IMPORT_C static CBNFNodeAttributeType K##X();
       
    28 #define _SHAREDSTRINGBODY(X) EXPORT_C CBNFNodeAttributeType CBNFNode::K##X() \
       
    29     { \
       
    30     _LIT(K##X, #X); \
       
    31     return &(K##X); \
       
    32     }
       
    33 
       
    34 
       
    35 class CBNFNode : public CTypedNode<TInt, const TDesC*> 
       
    36 /** Backus-Naur Form (BNF) node that forms part of a BNF tree (CBNFParser).
       
    37 
       
    38 Node types are stored as TInts, and attribute types as descriptors.
       
    39 @publishedAll
       
    40 @deprecated
       
    41 */
       
    42 {
       
    43 public:
       
    44 	//##ModelId=3B666BC70146
       
    45 	IMPORT_C ~CBNFNode();
       
    46 
       
    47 	//##ModelId=3B666BC70144
       
    48 	IMPORT_C static CBNFNode* NewL(TInt aType);
       
    49 
       
    50     _SHAREDSTRING(PreRuleCallback)
       
    51     _SHAREDSTRING(PostRuleCallback)
       
    52     _SHAREDSTRING(Reference)
       
    53     _SHAREDSTRING(RangeStart)
       
    54     _SHAREDSTRING(RangeEnd)
       
    55     _SHAREDSTRING(NMoreCount)
       
    56     _SHAREDSTRING(NMoreMinimum)
       
    57     _SHAREDSTRING(NMoreMaximum)
       
    58 
       
    59 protected:
       
    60     IMPORT_C CBNFNode(TInt aType);
       
    61 };
       
    62 
       
    63 #endif // __CBNFNODE_H__