epoc32/include/cbnfnode.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/cbnfnode.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/cbnfnode.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,63 @@
     1.4 -cbnfnode.h
     1.5 +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +// BNF node header
    1.19 +// 
    1.20 +//
    1.21 +
    1.22 +#ifndef __CBNFNODE_H__
    1.23 +#define __CBNFNODE_H__
    1.24 +
    1.25 +#include <e32base.h>
    1.26 +#include <cnode.h>
    1.27 +
    1.28 +/** Declares that the "type" for node attributes is stored as a string. */
    1.29 +typedef const TDesC* CBNFNodeAttributeType;
    1.30 +
    1.31 +#define _SHAREDSTRING(X) IMPORT_C static CBNFNodeAttributeType K##X();
    1.32 +#define _SHAREDSTRINGBODY(X) EXPORT_C CBNFNodeAttributeType CBNFNode::K##X() \
    1.33 +    { \
    1.34 +    _LIT(K##X, #X); \
    1.35 +    return &(K##X); \
    1.36 +    }
    1.37 +
    1.38 +
    1.39 +class CBNFNode : public CTypedNode<TInt, const TDesC*> 
    1.40 +/** Backus-Naur Form (BNF) node that forms part of a BNF tree (CBNFParser).
    1.41 +
    1.42 +Node types are stored as TInts, and attribute types as descriptors.
    1.43 +@publishedAll
    1.44 +@released
    1.45 +*/
    1.46 +{
    1.47 +public:
    1.48 +	//##ModelId=3B666BC70146
    1.49 +	IMPORT_C ~CBNFNode();
    1.50 +
    1.51 +	//##ModelId=3B666BC70144
    1.52 +	IMPORT_C static CBNFNode* NewL(TInt aType);
    1.53 +
    1.54 +    _SHAREDSTRING(PreRuleCallback)
    1.55 +    _SHAREDSTRING(PostRuleCallback)
    1.56 +    _SHAREDSTRING(Reference)
    1.57 +    _SHAREDSTRING(RangeStart)
    1.58 +    _SHAREDSTRING(RangeEnd)
    1.59 +    _SHAREDSTRING(NMoreCount)
    1.60 +    _SHAREDSTRING(NMoreMinimum)
    1.61 +    _SHAREDSTRING(NMoreMaximum)
    1.62 +
    1.63 +protected:
    1.64 +    IMPORT_C CBNFNode(TInt aType);
    1.65 +};
    1.66 +
    1.67 +#endif // __CBNFNODE_H__