CDTDModel Class Reference

class CDTDModel : public CBNFParser

Creates a tree that represents a specified DTD.

To use it:

1. call the base class function ProcessDataL() with the filename of the DTD, and call CommitL()

2. call GeneratedTree() to get the tree

Inherits from

Nested Classes and Structures

Public Member Functions
~CDTDModel()
IMPORT_C voidBuildWml11DTDL(CBNFNode &)
IMPORT_C CBNFNode *GeneratedTree()
IMPORT_C CDTDModel *NewL(CAttributeLookupTable &)
IMPORT_C voidResetL()
Protected Member Functions
CDTDModel(CAttributeLookupTable &)
voidAddNewAttributeL(CBNFNode &, const TDesC *, const TDesC &, CDTDElementAttribute::KValueType, CBNFNode *)
voidAddNewAttributeWithValueL(CBNFNode &, const TDesC *, const TDesC &, const TDesC &, CBNFNode *)
voidAddNewReferenceAttributeL(CBNFNode &, const TDesC &, CBNFNode *)
voidCharRefReplacement(TPtr &)
voidDoClear()
IMPORT_C voidEndConditional(TParserNodeTypes, TBool)
voidPostAndL(CBNFParser &)
voidPostAttValueL(CBNFParser &)
voidPostAttfieldNameL(CBNFParser &)
voidPostAttlistDeclNameL(CBNFParser &)
voidPostAttlistLineL(CBNFParser &)
voidPostAttlistReferenceL(CBNFParser &)
voidPostElementDeclL(CBNFParser &)
voidPostElementDeclNameL(CBNFParser &)
voidPostEntityDeclL(CBNFParser &)
voidPostEntityDeclNameL(CBNFParser &)
voidPostFixedL(CBNFParser &)
voidPostGEContentL(CBNFParser &)
voidPostGEDeclL(CBNFParser &)
voidPostGroupL(CBNFParser &)
voidPostIdentifierL(CBNFParser &)
voidPostImpliedL(CBNFParser &)
voidPostMatch0PlusL(CBNFParser &)
voidPostMatch1PlusL(CBNFParser &)
voidPostOptionalL(CBNFParser &)
voidPostOrL(CBNFParser &)
voidPostPEDeclL(CBNFParser &)
voidPostReferenceNameL(CBNFParser &)
voidPostRequiredL(CBNFParser &)
voidPostRuleL(CBNFParser &, TParserNodeTypes, const TDesC *)
voidPostRulesL(CBNFParser &)
voidPostStringL(CBNFParser &)
voidPostValidCharL(CBNFParser &, TRadix)
voidPostValidDecCharL(CBNFParser &)
voidPostValidHexCharL(CBNFParser &)
voidPreAttValueL(CBNFParser &)
voidPreAttlistLineL(CBNFParser &)
voidPreElementDeclL(CBNFParser &)
voidPreEntityDeclL(CBNFParser &)
voidPreGEContentL(CBNFParser &)
voidPreGroupL(CBNFParser &)
voidPrePEDeclL(CBNFParser &)
voidPreRulesL(CBNFParser &)
IMPORT_C voidStartConditional(TParserNodeTypes)
IMPORT_C CBNFNode *TreeL()
Inherited Functions
CBNFParser::AddComponentAttributeL(CBNFNode &,CBNFNodeAttributeType,TInt)
CBNFParser::AddRuleCallbackL(CBNFNode &,const TDesC *,TRuleCallback *)
CBNFParser::AndL(CBNFNode &,CFragmentedString::TStringMatch &)
CBNFParser::AttributeLUT()const
CBNFParser::CBNFParser(CAttributeLookupTable &)
CBNFParser::CommitL()
CBNFParser::CurrentRule()
CBNFParser::DeleteMark()
CBNFParser::ExactL(CBNFNode &,CFragmentedString::TStringMatch &)
CBNFParser::ExecutePostRuleCallbackL(CBNFNode &)
CBNFParser::ExecutePreRuleCallbackL(CBNFNode &)
CBNFParser::MDataProviderObserverReserved1()
CBNFParser::MDataProviderObserverReserved2()
CBNFParser::Mark()
CBNFParser::MarkCallback(CBNFParser &)
CBNFParser::MarkedL()
CBNFParser::MarkedWithInitialTextL(const TDesC &)
CBNFParser::NMoreL(CBNFNode &,CFragmentedString::TStringMatch &)
CBNFParser::NewBNFL()
CBNFParser::NewComponentL(CBNFNode &,TParserNodeTypes,HBufC *,TRuleCallback *,TRuleCallback *)
CBNFParser::NewComponentL(CBNFNode &,TParserNodeTypes,const TDesC &)
CBNFParser::NewComponentL(CBNFNode *,CBNFNode &,const TDesC &)
CBNFParser::NewComponentL(CBNFNode *,const TDesC &)
CBNFParser::NewComponentL(TParserNodeTypes,HBufC *,TRuleCallback *,TRuleCallback *)
CBNFParser::NewComponentL(TParserNodeTypes,const TDesC &)
CBNFParser::NewRuleL(CBNFNode *,const TDesC &,TParserNodeTypes,HBufC *,TRuleCallback *,TRuleCallback *)
CBNFParser::NewRuleL(CBNFNode *,const TDesC &,TParserNodeTypes,const TDesC &,TRuleCallback *,TRuleCallback *)
CBNFParser::OptionalL(CBNFNode &,CFragmentedString::TStringMatch &)
CBNFParser::OptionalMatched()const
CBNFParser::OrL(CBNFNode &,CFragmentedString::TStringMatch &)
CBNFParser::ParseL()
CBNFParser::PerformRuleL(CBNFNode &,CFragmentedString::TStringMatch &)
CBNFParser::ProcessDataL(HBufC8 &)
CBNFParser::RangeL(CBNFNode &,CFragmentedString::TStringMatch &)
CBNFParser::ReferenceL(CBNFNode &,CFragmentedString::TStringMatch &)
CBNFParser::RuleMatched()const
CBNFParser::SelectL(CBNFNode &,CFragmentedString::TStringMatch &)
CBNFParser::SetAttributeLookupTable(CAttributeLookupTable &)
CBNFParser::SetBaseUriL(const TDesC *)
CBNFParser::SetDataExpected(TInt)
CBNFParser::SetDocumentTypeL(const TDesC &)
CBNFParser::SetDocumentTypeL(const TDesC &,const TDesC &)
CBNFParser::SetState(TParseState)
CBNFParser::SetStatus(TInt)
CBNFParser::State()const
CBNFParser::StringL()const
CBNFParser::Valid()const
CBNFParser::WithoutL(CBNFNode &,CFragmentedString::TStringMatch &)
CBNFParser::~CBNFParser()
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enumTRuleMarks { ERuleStartMark = 1, EConditionalMark, EGroupMark }
Protected Member Type Definitions
typedef CRuleMarkedStack< ETrue > COwnerRuleMarkedStack
Protected Attributes
TBool iCharRefCheck
HBufC *iGEContent
TBool iInPEDecl
HBufC *iNewAttfieldName
CDTDElementAttribute *iNewElementAttribute
CBNFNode *iNewRule
COwnerRuleMarkedStack iNewRuleStack
CBNFNode *iNewTree
Inherited Attributes
CBNFParser::iCurrentRule
CBNFParser::iLUT
CBNFParser::iMatched
CBNFParser::iMoreCount
CBNFParser::iMoreMaximum
CBNFParser::iMoreMinimum
CBNFParser::iOptionalMatched
CBNFParser::iParsing
CBNFParser::iPostRuleCallback
CBNFParser::iPreRuleCallback
CBNFParser::iRangeEnd
CBNFParser::iRangeStart
CBNFParser::iReferenceString
CBNFParser::iRuleStack
CBNFParser::iString
CBNFParser::iStringComplete
CBNFParser::iSubRule
CBNFParser::iSubRuleMatched
CBNFParser::iTree

Constructor & Destructor Documentation

CDTDModel(CAttributeLookupTable &)

IMPORT_CCDTDModel(CAttributeLookupTable &aLUT)[protected]

Constructor.

Parameters

CAttributeLookupTable & aLUTAttribute lookup table in which to store attributes for the rule tree

~CDTDModel()

IMPORT_C~CDTDModel()[virtual]

Destructor.

Member Functions Documentation

AddNewAttributeL(CBNFNode &, const TDesC *, const TDesC &, CDTDElementAttribute::KValueType, CBNFNode *)

voidAddNewAttributeL(CBNFNode &aNode,
const TDesC *aAttributeId,
const TDesC &aAttributeType,
CDTDElementAttribute::KValueTypeaAttributeValueType,
CBNFNode *aRootNode
)[protected]

Parameters

CBNFNode & aNode
const TDesC * aAttributeId
const TDesC & aAttributeType
CDTDElementAttribute::KValueType aAttributeValueType
CBNFNode * aRootNode

AddNewAttributeWithValueL(CBNFNode &, const TDesC *, const TDesC &, const TDesC &, CBNFNode *)

voidAddNewAttributeWithValueL(CBNFNode &aNode,
const TDesC *aAttributeId,
const TDesC &aAttributeType,
const TDesC &aAttributeDefaultValue,
CBNFNode *aRootNode
)[protected]

Parameters

CBNFNode & aNode
const TDesC * aAttributeId
const TDesC & aAttributeType
const TDesC & aAttributeDefaultValue
CBNFNode * aRootNode

AddNewReferenceAttributeL(CBNFNode &, const TDesC &, CBNFNode *)

voidAddNewReferenceAttributeL(CBNFNode &aNode,
const TDesC &aAttributeType,
CBNFNode *aRootNode
)[protected]

Parameters

CBNFNode & aNode
const TDesC & aAttributeType
CBNFNode * aRootNode

BuildWml11DTDL(CBNFNode &)

IMPORT_C voidBuildWml11DTDL(CBNFNode &aPackageRootNode)

Builds a parser tree for the WML1.1 DTD.

Parameters

CBNFNode & aPackageRootNodeA root node to which the generated tree is attached

CharRefReplacement(TPtr &)

voidCharRefReplacement(TPtr &aString)[protected]

Parameters

TPtr & aString

DoClear()

voidDoClear()[protected]

EndConditional(TParserNodeTypes, TBool)

IMPORT_C voidEndConditional(TParserNodeTypesaRuleType,
TBoolaSuccess
)[protected, virtual]

Called when the parser ends a conditional point (i.e. And/Or rules) in the BNF grammar.

This overrides CBNFParser::EndConditional().

Parameters

TParserNodeTypes aRuleTypeRule type
TBool aSuccessTrue if processing was sucessful, otherwise false

GeneratedTree()

IMPORT_C CBNFNode *GeneratedTree()

Gets the root node of the tree generated to process the DTD.

It transfers ownership of the tree to the caller.

NewL(CAttributeLookupTable &)

IMPORT_C CDTDModel *NewL(CAttributeLookupTable &aLUT)[static]

Allocates and constructs a new DTD parser.

Parameters

CAttributeLookupTable & aLUTAttribute lookup table in which to store attributes for the rule tree

PostAndL(CBNFParser &)

voidPostAndL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostAttValueL(CBNFParser &)

voidPostAttValueL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostAttfieldNameL(CBNFParser &)

voidPostAttfieldNameL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostAttlistDeclNameL(CBNFParser &)

voidPostAttlistDeclNameL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostAttlistLineL(CBNFParser &)

voidPostAttlistLineL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostAttlistReferenceL(CBNFParser &)

voidPostAttlistReferenceL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostElementDeclL(CBNFParser &)

voidPostElementDeclL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostElementDeclNameL(CBNFParser &)

voidPostElementDeclNameL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostEntityDeclL(CBNFParser &)

voidPostEntityDeclL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostEntityDeclNameL(CBNFParser &)

voidPostEntityDeclNameL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostFixedL(CBNFParser &)

voidPostFixedL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostGEContentL(CBNFParser &)

voidPostGEContentL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostGEDeclL(CBNFParser &)

voidPostGEDeclL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostGroupL(CBNFParser &)

voidPostGroupL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostIdentifierL(CBNFParser &)

voidPostIdentifierL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostImpliedL(CBNFParser &)

voidPostImpliedL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostMatch0PlusL(CBNFParser &)

voidPostMatch0PlusL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostMatch1PlusL(CBNFParser &)

voidPostMatch1PlusL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostOptionalL(CBNFParser &)

voidPostOptionalL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostOrL(CBNFParser &)

voidPostOrL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostPEDeclL(CBNFParser &)

voidPostPEDeclL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostReferenceNameL(CBNFParser &)

voidPostReferenceNameL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostRequiredL(CBNFParser &)

voidPostRequiredL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostRuleL(CBNFParser &, TParserNodeTypes, const TDesC *)

voidPostRuleL(CBNFParser &aParser,
TParserNodeTypesaType,
const TDesC *aAttribute
)[protected, static]

Parameters

CBNFParser & aParser
TParserNodeTypes aType
const TDesC * aAttribute

PostRulesL(CBNFParser &)

voidPostRulesL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostStringL(CBNFParser &)

voidPostStringL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostValidCharL(CBNFParser &, TRadix)

voidPostValidCharL(CBNFParser &aParser,
TRadixaRadix
)[protected, static]

Parameters

CBNFParser & aParser
TRadix aRadix

PostValidDecCharL(CBNFParser &)

voidPostValidDecCharL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PostValidHexCharL(CBNFParser &)

voidPostValidHexCharL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PreAttValueL(CBNFParser &)

voidPreAttValueL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PreAttlistLineL(CBNFParser &)

voidPreAttlistLineL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PreElementDeclL(CBNFParser &)

voidPreElementDeclL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PreEntityDeclL(CBNFParser &)

voidPreEntityDeclL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PreGEContentL(CBNFParser &)

voidPreGEContentL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PreGroupL(CBNFParser &)

voidPreGroupL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PrePEDeclL(CBNFParser &)

voidPrePEDeclL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

PreRulesL(CBNFParser &)

voidPreRulesL(CBNFParser &aParser)[protected, static]

Parameters

CBNFParser & aParser

ResetL()

IMPORT_C voidResetL()[virtual]

Reset the parser to a state where it can accept and parse new input. Any existing state of parsing and input data is destroyed.

StartConditional(TParserNodeTypes)

IMPORT_C voidStartConditional(TParserNodeTypesaRuleType)[protected, virtual]

Called when the parser starts a conditional point (i.e. And/Or rules) in the BNF grammar.

This overrides CBNFParser::StartConditional().

Parameters

TParserNodeTypes aRuleTypeRule type

TreeL()

IMPORT_C CBNFNode *TreeL()[protected, virtual]

Creates a BNF rule tree to parse the input stream.

This overrides CBNFParser::TreeL().

Member Enumerations Documentation

Enum TRuleMarks

Enumerators

ERuleStartMark = 1
EConditionalMark
EGroupMark

Member Type Definitions Documentation

Typedef COwnerRuleMarkedStack

typedef CRuleMarkedStack< ETrue >COwnerRuleMarkedStack[protected]

Member Data Documentation

TBool iCharRefCheck

TBool iCharRefCheck[protected]

HBufC * iGEContent

HBufC *iGEContent[protected]

TBool iInPEDecl

TBool iInPEDecl[protected]

HBufC * iNewAttfieldName

HBufC *iNewAttfieldName[protected]

CDTDElementAttribute * iNewElementAttribute

CDTDElementAttribute *iNewElementAttribute[protected]

CBNFNode * iNewRule

CBNFNode *iNewRule[protected]

COwnerRuleMarkedStack iNewRuleStack

COwnerRuleMarkedStack iNewRuleStack[protected]

CBNFNode * iNewTree

CBNFNode *iNewTree[protected]