CDTDModel Class Reference

#include <mw/cdtdmodel.h>

Link against: dtdmdl.lib

class CDTDModel : public CBNFParser

Nested Classes and Structures

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
Public Member Enumerations
enumTRuleMarks { ERuleStartMark, EConditionalMark, EGroupMark }
Public Member Functions
virtual ~CDTDModel()
IMPORT_C voidBuildWml11DTDL(CBNFNode &)
IMPORT_C CBNFNode *GeneratedTree()
IMPORT_C CDTDModel *NewL(CAttributeLookupTable &)
virtual 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()
virtual 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 &)
virtual IMPORT_C voidStartConditional(TParserNodeTypes)
virtual IMPORT_C CBNFNode *TreeL()
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
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()
Inherited Type Definitions
CBNFParser::CRuleStack
CBNFParser::TRuleCallback

Detailed Description

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

Deprecated

Member Type Definition Documentation

Typedef COwnerRuleMarkedStack

typedef CRuleMarkedStack< ETrue >COwnerRuleMarkedStack[protected]

Member Attribute Documentation

iCharRefCheck

TBool iCharRefCheck[protected]

iGEContent

HBufC *iGEContent[protected]

iInPEDecl

TBool iInPEDecl[protected]

iNewAttfieldName

HBufC *iNewAttfieldName[protected]

iNewElementAttribute

CDTDElementAttribute *iNewElementAttribute[protected]

iNewRule

CBNFNode *iNewRule[protected]

iNewRuleStack

COwnerRuleMarkedStack iNewRuleStack[protected]

iNewTree

CBNFNode *iNewTree[protected]

Member Enumeration Documentation

Enum TRuleMarks

EnumeratorValueDescription
ERuleStartMark1
EConditionalMark
EGroupMark

Constructor & Destructor Documentation

CDTDModel ( CAttributeLookupTable & )

IMPORT_CCDTDModel(CAttributeLookupTable &aLUT)[protected]

Constructor.

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

~CDTDModel ( )

IMPORT_C~CDTDModel()[virtual]

Destructor.

Member Function Documentation

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

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

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

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

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

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

BuildWml11DTDL ( CBNFNode & )

IMPORT_C voidBuildWml11DTDL(CBNFNode &aPackageRootNode)

Builds a parser tree for the WML1.1 DTD.

Parameters
aPackageRootNodeA root node to which the generated tree is attached

CharRefReplacement ( TPtr & )

voidCharRefReplacement(TPtr &aString)[protected]

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
aRuleTypeRule type
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.

Return Value
Root node of the tree

NewL ( CAttributeLookupTable & )

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

Allocates and constructs a new DTD parser.

Parameters
aLUTAttribute lookup table in which to store attributes for the rule tree
Return Value
New parser

PostAndL ( CBNFParser & )

voidPostAndL(CBNFParser &aParser)[protected, static]

PostAttValueL ( CBNFParser & )

voidPostAttValueL(CBNFParser &aParser)[protected, static]

PostAttfieldNameL ( CBNFParser & )

voidPostAttfieldNameL(CBNFParser &aParser)[protected, static]

PostAttlistDeclNameL ( CBNFParser & )

voidPostAttlistDeclNameL(CBNFParser &aParser)[protected, static]

PostAttlistLineL ( CBNFParser & )

voidPostAttlistLineL(CBNFParser &aParser)[protected, static]

PostAttlistReferenceL ( CBNFParser & )

voidPostAttlistReferenceL(CBNFParser &aParser)[protected, static]

PostElementDeclL ( CBNFParser & )

voidPostElementDeclL(CBNFParser &aParser)[protected, static]

PostElementDeclNameL ( CBNFParser & )

voidPostElementDeclNameL(CBNFParser &aParser)[protected, static]

PostEntityDeclL ( CBNFParser & )

voidPostEntityDeclL(CBNFParser &aParser)[protected, static]

PostEntityDeclNameL ( CBNFParser & )

voidPostEntityDeclNameL(CBNFParser &aParser)[protected, static]

PostFixedL ( CBNFParser & )

voidPostFixedL(CBNFParser &aParser)[protected, static]

PostGEContentL ( CBNFParser & )

voidPostGEContentL(CBNFParser &aParser)[protected, static]

PostGEDeclL ( CBNFParser & )

voidPostGEDeclL(CBNFParser &aParser)[protected, static]

PostGroupL ( CBNFParser & )

voidPostGroupL(CBNFParser &aParser)[protected, static]

PostIdentifierL ( CBNFParser & )

voidPostIdentifierL(CBNFParser &aParser)[protected, static]

PostImpliedL ( CBNFParser & )

voidPostImpliedL(CBNFParser &aParser)[protected, static]

PostMatch0PlusL ( CBNFParser & )

voidPostMatch0PlusL(CBNFParser &aParser)[protected, static]

PostMatch1PlusL ( CBNFParser & )

voidPostMatch1PlusL(CBNFParser &aParser)[protected, static]

PostOptionalL ( CBNFParser & )

voidPostOptionalL(CBNFParser &aParser)[protected, static]

PostOrL ( CBNFParser & )

voidPostOrL(CBNFParser &aParser)[protected, static]

PostPEDeclL ( CBNFParser & )

voidPostPEDeclL(CBNFParser &aParser)[protected, static]

PostReferenceNameL ( CBNFParser & )

voidPostReferenceNameL(CBNFParser &aParser)[protected, static]

PostRequiredL ( CBNFParser & )

voidPostRequiredL(CBNFParser &aParser)[protected, static]

PostRuleL ( CBNFParser &, TParserNodeTypes, const TDesC * )

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

PostRulesL ( CBNFParser & )

voidPostRulesL(CBNFParser &aParser)[protected, static]

PostStringL ( CBNFParser & )

voidPostStringL(CBNFParser &aParser)[protected, static]

PostValidCharL ( CBNFParser &, TRadix )

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

PostValidDecCharL ( CBNFParser & )

voidPostValidDecCharL(CBNFParser &aParser)[protected, static]

PostValidHexCharL ( CBNFParser & )

voidPostValidHexCharL(CBNFParser &aParser)[protected, static]

PreAttValueL ( CBNFParser & )

voidPreAttValueL(CBNFParser &aParser)[protected, static]

PreAttlistLineL ( CBNFParser & )

voidPreAttlistLineL(CBNFParser &aParser)[protected, static]

PreElementDeclL ( CBNFParser & )

voidPreElementDeclL(CBNFParser &aParser)[protected, static]

PreEntityDeclL ( CBNFParser & )

voidPreEntityDeclL(CBNFParser &aParser)[protected, static]

PreGEContentL ( CBNFParser & )

voidPreGEContentL(CBNFParser &aParser)[protected, static]

PreGroupL ( CBNFParser & )

voidPreGroupL(CBNFParser &aParser)[protected, static]

PrePEDeclL ( CBNFParser & )

voidPrePEDeclL(CBNFParser &aParser)[protected, static]

PreRulesL ( CBNFParser & )

voidPreRulesL(CBNFParser &aParser)[protected, static]

ResetL ( )

IMPORT_C voidResetL()[virtual]

Reimplemented from CBNFParser::ResetL()

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
aRuleTypeRule type

TreeL ( )

IMPORT_C CBNFNode *TreeL()[protected, virtual]

Reimplemented from CBNFParser::TreeL()

Creates a BNF rule tree to parse the input stream.

This overrides CBNFParser::TreeL().

Return Value
BNF rule tree