Xml::MStringDictionary Class Reference

class Xml::MStringDictionary

This interface defines the API of a single string dictionary. This class is not used directly, but via a derived class the user provides. Derived classes must add all elements, attributes names, and attribute values that belong to this string dictionary as static string tables to the StringPool. WBXML token mappings between strings and WBXML tokens should also be maintained. RStringPool

Member Functions Documentation

AttributeL(TInt, RString &)

voidAttributeL(TIntaToken,
RString &aAttribute
)const [pure virtual]

This method returns the attribute string associated with the given token.

leave
KErrXmlUnsupportedAttribute, if the token doesn't correspond to an attribute.

Parameters

TInt aTokenthe attribute token.
RString & aAttributeOn return reflects the string corresponding to the token.

AttributeValueL(TInt, RString &)

voidAttributeValueL(TIntaToken,
RString &aValue
)const [pure virtual]

This method returns the value string associated with the given token.

leave
KErrXmlUnsupportedAttributeValue, if the token doesn't correspond to value.

Parameters

TInt aTokenthe attribute token.
RString & aValueOn return reflects the string corresponding to the value for this attibute.

AttributeValuePairL(TInt, RString &, RString &)

voidAttributeValuePairL(TIntaToken,
RString &aAttribute,
RString &aValue
)const [pure virtual]

This method returns the attribute and value string associated with the given token.

leave
KErrXmlUnsupportedAttribute, if the token doesn't correspond to an attribute
leave
KErrXmlUnsupportedAttributeValue, if the token doesn't correspond to a value

Parameters

TInt aTokenthe attribute token.
RString & aAttributeOn return reflects the string corresponding to the token.
RString & aValueOn return reflects the string corresponding to the value for this attibute.

CompareThisDictionary(const RString &)

TBool CompareThisDictionary(const RString &aDictionaryDescription)const [pure virtual]

This method compares the Dictionary description with that provided.

Parameters

const RString & aDictionaryDescriptionThe description we want to compare.

ElementL(TInt, RString &)

voidElementL(TIntaToken,
RString &aElement
)const [pure virtual]

This method returns the element string associated with the given token.

leave
KErrXmlUnsupportedElement, if the token doesn't correspond to an element.

Parameters

TInt aTokenthe element token.
RString & aElementOn return reflects the string corresponding to the token.

NamespaceUri(RString &)

voidNamespaceUri(RString &aUri)[pure virtual]

The element types in the Device Information DTD are defined within a namespace associated with the Uri/Urn available from the StringTable. The RString need not be closed, but closing is harmless.

Parameters

RString & aUriThe associated namespace for this string dictionary.

PublicIdentifier(RString &)

voidPublicIdentifier(RString &aPubId)[pure virtual]

This method obtains the public identifier from the StringTable. Either the formal or non formal public id will do. The stringDictionary .rss files must list both these as wbxml documents have one or the other.

Parameters

RString & aPubIdThe public identifier for this string dictionary.

Release()

voidRelease()[pure virtual]

This method allows for the correct destrution of the string dictionary plugin.

Post-condition
the objects memory is cleaned up.

SwitchCodePage(TInt)

TInt SwitchCodePage(TIntaCodePage)[pure virtual]

This method switches the dictionary to use the specified codepage.

Parameters

TInt aCodePageThe code page to switch to.