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 void BuildWml11DTDL ( CBNFNode &)
IMPORT_C CBNFNode * GeneratedTree ()
IMPORT_C CDTDModel * NewL ( CAttributeLookupTable &)
IMPORT_C void ResetL ()
Protected Member Functions
CDTDModel ( CAttributeLookupTable &)
void AddNewAttributeL ( CBNFNode &, const TDesC *, const TDesC &, CDTDElementAttribute::KValueType , CBNFNode *)
void AddNewAttributeWithValueL ( CBNFNode &, const TDesC *, const TDesC &, const TDesC &, CBNFNode *)
void AddNewReferenceAttributeL ( CBNFNode &, const TDesC &, CBNFNode *)
void CharRefReplacement ( TPtr &)
void DoClear ()
IMPORT_C void EndConditional ( TParserNodeTypes , TBool )
void PostAndL ( CBNFParser &)
void PostAttValueL ( CBNFParser &)
void PostAttfieldNameL ( CBNFParser &)
void PostAttlistDeclNameL ( CBNFParser &)
void PostAttlistLineL ( CBNFParser &)
void PostAttlistReferenceL ( CBNFParser &)
void PostElementDeclL ( CBNFParser &)
void PostElementDeclNameL ( CBNFParser &)
void PostEntityDeclL ( CBNFParser &)
void PostEntityDeclNameL ( CBNFParser &)
void PostFixedL ( CBNFParser &)
void PostGEContentL ( CBNFParser &)
void PostGEDeclL ( CBNFParser &)
void PostGroupL ( CBNFParser &)
void PostIdentifierL ( CBNFParser &)
void PostImpliedL ( CBNFParser &)
void PostMatch0PlusL ( CBNFParser &)
void PostMatch1PlusL ( CBNFParser &)
void PostOptionalL ( CBNFParser &)
void PostOrL ( CBNFParser &)
void PostPEDeclL ( CBNFParser &)
void PostReferenceNameL ( CBNFParser &)
void PostRequiredL ( CBNFParser &)
void PostRuleL ( CBNFParser &, TParserNodeTypes , const TDesC *)
void PostRulesL ( CBNFParser &)
void PostStringL ( CBNFParser &)
void PostValidCharL ( CBNFParser &, TRadix )
void PostValidDecCharL ( CBNFParser &)
void PostValidHexCharL ( CBNFParser &)
void PreAttValueL ( CBNFParser &)
void PreAttlistLineL ( CBNFParser &)
void PreElementDeclL ( CBNFParser &)
void PreEntityDeclL ( CBNFParser &)
void PreGEContentL ( CBNFParser &)
void PreGroupL ( CBNFParser &)
void PrePEDeclL ( CBNFParser &)
void PreRulesL ( CBNFParser &)
IMPORT_C void StartConditional ( 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
enum TRuleMarks { 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_C CDTDModel ( CAttributeLookupTable & aLUT ) [protected]

Constructor.

Parameters

CAttributeLookupTable & aLUT Attribute 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 *)

void AddNewAttributeL ( CBNFNode & aNode,
const TDesC * aAttributeId,
const TDesC & aAttributeType,
CDTDElementAttribute::KValueType aAttributeValueType,
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 *)

void AddNewAttributeWithValueL ( 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 *)

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

Parameters

CBNFNode & aNode
const TDesC & aAttributeType
CBNFNode * aRootNode

BuildWml11DTDL(CBNFNode &)

IMPORT_C void BuildWml11DTDL ( CBNFNode & aPackageRootNode )

Builds a parser tree for the WML1.1 DTD.

Parameters

CBNFNode & aPackageRootNode A root node to which the generated tree is attached

CharRefReplacement(TPtr &)

void CharRefReplacement ( TPtr & aString ) [protected]

Parameters

TPtr & aString

DoClear()

void DoClear ( ) [protected]

EndConditional(TParserNodeTypes, TBool)

IMPORT_C void EndConditional ( TParserNodeTypes aRuleType,
TBool aSuccess
) [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 aRuleType Rule type
TBool aSuccess True 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 & aLUT Attribute lookup table in which to store attributes for the rule tree

PostAndL(CBNFParser &)

void PostAndL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostAttValueL(CBNFParser &)

void PostAttValueL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostAttfieldNameL(CBNFParser &)

void PostAttfieldNameL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostAttlistDeclNameL(CBNFParser &)

void PostAttlistDeclNameL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostAttlistLineL(CBNFParser &)

void PostAttlistLineL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostAttlistReferenceL(CBNFParser &)

void PostAttlistReferenceL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostElementDeclL(CBNFParser &)

void PostElementDeclL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostElementDeclNameL(CBNFParser &)

void PostElementDeclNameL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostEntityDeclL(CBNFParser &)

void PostEntityDeclL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostEntityDeclNameL(CBNFParser &)

void PostEntityDeclNameL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostFixedL(CBNFParser &)

void PostFixedL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostGEContentL(CBNFParser &)

void PostGEContentL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostGEDeclL(CBNFParser &)

void PostGEDeclL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostGroupL(CBNFParser &)

void PostGroupL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostIdentifierL(CBNFParser &)

void PostIdentifierL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostImpliedL(CBNFParser &)

void PostImpliedL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostMatch0PlusL(CBNFParser &)

void PostMatch0PlusL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostMatch1PlusL(CBNFParser &)

void PostMatch1PlusL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostOptionalL(CBNFParser &)

void PostOptionalL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostOrL(CBNFParser &)

void PostOrL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostPEDeclL(CBNFParser &)

void PostPEDeclL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostReferenceNameL(CBNFParser &)

void PostReferenceNameL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostRequiredL(CBNFParser &)

void PostRequiredL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostRuleL(CBNFParser &, TParserNodeTypes, const TDesC *)

void PostRuleL ( CBNFParser & aParser,
TParserNodeTypes aType,
const TDesC * aAttribute
) [protected, static]

Parameters

CBNFParser & aParser
TParserNodeTypes aType
const TDesC * aAttribute

PostRulesL(CBNFParser &)

void PostRulesL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostStringL(CBNFParser &)

void PostStringL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostValidCharL(CBNFParser &, TRadix)

void PostValidCharL ( CBNFParser & aParser,
TRadix aRadix
) [protected, static]

Parameters

CBNFParser & aParser
TRadix aRadix

PostValidDecCharL(CBNFParser &)

void PostValidDecCharL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PostValidHexCharL(CBNFParser &)

void PostValidHexCharL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PreAttValueL(CBNFParser &)

void PreAttValueL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PreAttlistLineL(CBNFParser &)

void PreAttlistLineL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PreElementDeclL(CBNFParser &)

void PreElementDeclL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PreEntityDeclL(CBNFParser &)

void PreEntityDeclL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PreGEContentL(CBNFParser &)

void PreGEContentL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PreGroupL(CBNFParser &)

void PreGroupL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PrePEDeclL(CBNFParser &)

void PrePEDeclL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

PreRulesL(CBNFParser &)

void PreRulesL ( CBNFParser & aParser ) [protected, static]

Parameters

CBNFParser & aParser

ResetL()

IMPORT_C void ResetL ( ) [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 void StartConditional ( TParserNodeTypes aRuleType ) [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 aRuleType Rule 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]