CSvgContentHandler Class Reference

class CSvgContentHandler : public CBase

Class description goes here.

SVGEngine.lib
Since
1.0

Inherits from

Public Member Functions
~CSvgContentHandler()
voidCancelParsing()
TInt Charecters(TDesC &, TInt, TInt)
TInt Comment(TDesC &)
voidConstructL(TBool)
voidDataBuffer(const TDesC16 &)
TInt EndCDATA()
TInt EndDocument()
TInt EndElement(TDesC &, TDesC &, TDesC &)
TInt EndEntity(TDesC &)
TInt Error(TInt, TInt)
TInt IgnoreWhiteSpace(TDesC &)
CSvgContentHandler *NewL(TBool)
CSvgContentHandler *NewLC()
CSvgElementImpl *Parse16BitData(CSvgDocumentImpl *, const TDesC16 &, CSvgErrorImpl &)
CSvgElementImpl *ParseByteData(CSvgDocumentImpl *, const TDesC8 &, CSvgErrorImpl &)
CSvgElementImpl *ParseFile(CSvgDocumentImpl *, const TDesC &, CSvgErrorImpl &)
TInt ProcessingInstructions(TDesC &, TDesC &)
voidReaderIndex(NW_Uint32)
TInt SkippedEntity(TDesC &)
TInt StartCDATA()
TInt StartDocument()
TInt StartElement(TDesC &, TDesC &, TDesC &, MXMLAttributes *)
TInt StartEntity(TDesC &)
Protected Member Functions
CSvgContentHandler()
voidAppend(TDes &, const TDesC &, TInt, TInt)
voidAppendToCData(const TDesC &)
TBool ConvertDecimalStringToChar(TChar &, const TDesC &)
voidConvertEntitiesToCharsL(CDesCArrayFlat &)
HBufC *ConvertEntitiesToCharsL(const TDesC &)
TBool ConvertEntityToChar(TChar &, const TDesC &)
TBool ConvertHexStringToChar(TChar &, const TDesC &)
TBool ExtractStyleValuePair(const TDesC &, TPtrC &, TPtrC &)
voidFilterCharactersL(TDesC &)
TInt Find(const TDesC &, TInt, TChar)
voidLoadImages()
TGfxColor ParseColor(const TDesC &, TBool &)
TBool ParseEntity(const TDesC &)
voidPostParseProcessing()
TBool ProcessColorAttributeL(const TDesC &, const TDesC &)
TBool ProcessNConvertAttrL(const TDesC &, const TDesC &, const TDesC &)
TBool ProcessStyleL(const TDesC &)
TBool ProcessTransformL(const TDesC &, const TDesC &)
TBool ProcessUnitsL(const TDesC &, const TDesC &)
voidRemoveFalseElementsOrMakeInvisible()
voidRemoveFalseSwitchCasesOrMakeInvisible()
voidRemoveInternalReferences(CSvgElementImpl *)
voidSetForwardReferences(CSvgErrorImpl &)
TInt StartElementL(TDesC &, TDesC &, TDesC &, MXMLAttributes *)
HBufC *SubstringL(const TDesC &, TInt, TInt)
voidSystemLanguage(TPtr)
TBool VerifyReqExReqFtrSysL(CSvgElementImpl *)
Inherited Functions
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()
Private Attributes
RPointerArray< CSvgElementImpl > *iAnimRefElementArray
RPointerArray< CSvgElementImpl > *iAnimationElementArray
TBool iBeginEndAtr
TPtrC iByVal
HBufC *iCData
TBool iCancelRequested
CSvgElementImpl *iCurrentElement
CSvgElementImpl *iCurrentParentElement
CSvgDocumentImpl *iDocument
TPtrC iFromVal
TInt iIgnoreDepth
RPointerArray< CSvgImageElementImpl >iImageElements
TBool iIsColorAnim
TBool iIsSvgElement
const RPointerArray< MSvgLoadingListener > *iLoadingListeners
TBool iRemoveFalseSwitchElements
RPointerArray< CSvgElementImpl > *iReqFetAttSysArray
CSvgElementImpl *iRootElement
TPtrC iSplines
CSvgErrorImpl *iSvgError
RPointerArray< CSvgElementImpl > *iSwitchElementArray
HBufC *iSystemLanguage
TPtrC iTimes
TPtrC iToVal
RPointerArray< CSvgElementImpl > *iUseElementArray
TPtrC iValues

Constructor & Destructor Documentation

CSvgContentHandler()

CSvgContentHandler()[protected]

Private constructor

Since
1.0

~CSvgContentHandler()

~CSvgContentHandler()[virtual]

Destructor. Destructor

Since
1.0

Member Functions Documentation

Append(TDes &, const TDesC &, TInt, TInt)

voidAppend(TDes &aDest,
const TDesC &aSource,
TIntaStartIndex,
TIntaEndIndex
)[protected]

Append a substring to the given string at given indices.

Since
1.0

Parameters

TDes & aDest: string to append substring to.
const TDesC & aSource: string to append substring from.
TInt aStartIndex: starting index for substring.
TInt aEndIndex: ending index for substring.

AppendToCData(const TDesC &)

voidAppendToCData(const TDesC &aText)[protected]

Parameters

const TDesC & aText

CancelParsing()

voidCancelParsing()

Request to cancel parsing.

Charecters(TDesC &, TInt, TInt)

TInt Charecters(TDesC &aBuf,
TIntaStart,
TIntaLength
)

Callback that signals characters inside an XML document

Since
1.0

Parameters

TDesC & aBuf- A string buffer that will contain the characters
TInt aStart- An index indicating the starting position of the characters
TInt aLength

Comment(TDesC &)

TInt Comment(TDesC &aComment)

A callback that signals a XML comment

Since
1.0

Parameters

TDesC & aComment- A string buffer that cintains the comment

ConstructL(TBool)

voidConstructL(TBoolaRemoveFalseSwitchElements = ETrue)[virtual]

Part of two phase construction

Since
1.0

Parameters

TBool aRemoveFalseSwitchElements = ETrue

ConvertDecimalStringToChar(TChar &, const TDesC &)

TBool ConvertDecimalStringToChar(TChar &aChar,
const TDesC &aString
)[protected]

Convert the given string (xml entity character) an unicode character.

Since
1.0

Parameters

TChar & aChar: character object to store unicode character.
const TDesC & aString: xml decimal entity character string.

ConvertEntitiesToCharsL(CDesCArrayFlat &)

voidConvertEntitiesToCharsL(CDesCArrayFlat &aArray)[protected]

Convert any xml entity characters in the given string list to unicode characters.

Since
1.0

Parameters

CDesCArrayFlat & aArray: array of strings to search for xml entities characters.

ConvertEntitiesToCharsL(const TDesC &)

HBufC *ConvertEntitiesToCharsL(const TDesC &aString)[protected]

Convert any xml entity characters in the given string to unicode characters.

Since
1.0

Parameters

const TDesC & aString: string to search for xml entities characters.

ConvertEntityToChar(TChar &, const TDesC &)

TBool ConvertEntityToChar(TChar &aChar,
const TDesC &aString
)[protected]

Convert the given string (xml entity character) to an unicode character.

Since
1.0

Parameters

TChar & aChar: character object to store unicode character.
const TDesC & aString: xml entity character string.

ConvertHexStringToChar(TChar &, const TDesC &)

TBool ConvertHexStringToChar(TChar &aChar,
const TDesC &aString
)[protected]

Convert the given string (xml entity character) an unicode character.

Since
1.0

Parameters

TChar & aChar: character object to store unicode character.
const TDesC & aString: xml hexadecimal entity character string.

DataBuffer(const TDesC16 &)

voidDataBuffer(const TDesC16 &aBuf)

Parameters

const TDesC16 & aBuf

EndCDATA()

TInt EndCDATA()

A callback that signals end of a CDATA section

Since
1.0

EndDocument()

TInt EndDocument()

A callback that signals end of a document

Since
1.0

EndElement(TDesC &, TDesC &, TDesC &)

TInt EndElement(TDesC &aURI,
TDesC &aLocalName,
TDesC &aName
)

A callback that signals end of an element

Since
1.0

Parameters

TDesC & aURI-
TDesC & aLocalName-
TDesC & aName- Name of the element

EndEntity(TDesC &)

TInt EndEntity(TDesC &aName)

A callback that signals end of an entity element

Since
1.0

Parameters

TDesC & aName- A string buffer that will contain the entity name

Error(TInt, TInt)

TInt Error(TIntaErrorCode,
TIntaSeverity
)

Need method description

Since
1.0

Parameters

TInt aErrorCode
TInt aSeverity

ExtractStyleValuePair(const TDesC &, TPtrC &, TPtrC &)

TBool ExtractStyleValuePair(const TDesC &aString,
TPtrC &aName,
TPtrC &aValue
)[protected]

Parameters

const TDesC & aString
TPtrC & aName
TPtrC & aValue

FilterCharactersL(TDesC &)

voidFilterCharactersL(TDesC &aString)[protected]

Parameters

TDesC & aString

Find(const TDesC &, TInt, TChar)

TInt Find(const TDesC &aString,
TIntaStartIndex,
TCharaChar
)[protected]

Find the given character in the given string at the starting index.

Since
1.0

Parameters

const TDesC & aString: string to find character.
TInt aStartIndex: starting index.
TChar aChar: character to search.

IgnoreWhiteSpace(TDesC &)

TInt IgnoreWhiteSpace(TDesC &aString)

Need method description

Since
1.0

Parameters

TDesC & aString

LoadImages()

voidLoadImages()[protected]

NewL(TBool)

CSvgContentHandler *NewL(TBoolaRemoveFalseSwitchElements = ETrue)[static]

Parser phase one constructor

Takes the player interface object as a parameter. This interface is used by the parser for reporting parse errors and for getting values of the content control attributes. It is also passed to the created presentation object. Two phase constructor

Since
1.0

Parameters

TBool aRemoveFalseSwitchElements = ETrue

NewLC()

CSvgContentHandler *NewLC()[static]

Two phase constructor

Since
1.0

Parse16BitData(CSvgDocumentImpl *, const TDesC16 &, CSvgErrorImpl &)

CSvgElementImpl *Parse16BitData(CSvgDocumentImpl *aDocument,
const TDesC16 &aSvgString,
CSvgErrorImpl &aError
)

Parameters

CSvgDocumentImpl * aDocument
const TDesC16 & aSvgString
CSvgErrorImpl & aError

ParseByteData(CSvgDocumentImpl *, const TDesC8 &, CSvgErrorImpl &)

CSvgElementImpl *ParseByteData(CSvgDocumentImpl *aDocument,
const TDesC8 &aByteData,
CSvgErrorImpl &aError
)

Parses the given encrypted SVG source, constructing the presentation objects. This is a variant of ParseL and processes encrypted SVG sources.

Since
1.0

Parameters

CSvgDocumentImpl * aDocument- The document object to which this document is constructed
const TDesC8 & aByteData
CSvgErrorImpl & aError

ParseColor(const TDesC &, TBool &)

TGfxColor ParseColor(const TDesC &aString,
TBool &aTransparent
)[protected]

Parse for a color from the given string.

Since
1.0

Parameters

const TDesC & aString: color string to parse for color value
TBool & aTransparent: transparent flag.

ParseEntity(const TDesC &)

TBool ParseEntity(const TDesC &aEntity)[protected]

Check for possible svg elements placed inside entity references. If so, attempt to parse as part of the document. If parsing was successful, return ETrue, otherwise return EFalse.

Since
1.0

Parameters

const TDesC & aEntity

ParseFile(CSvgDocumentImpl *, const TDesC &, CSvgErrorImpl &)

CSvgElementImpl *ParseFile(CSvgDocumentImpl *aDocument,
const TDesC &aFileName,
CSvgErrorImpl &aError
)

Parameters

CSvgDocumentImpl * aDocument
const TDesC & aFileName
CSvgErrorImpl & aError

PostParseProcessing()

voidPostParseProcessing()[protected]

Post parsing processing, such as removing false switch elements.

Since
1.0

ProcessColorAttributeL(const TDesC &, const TDesC &)

TBool ProcessColorAttributeL(const TDesC &aName,
const TDesC &aValue
)[protected]

Process for a color from the given attribute name and value.

Since
1.0

Parameters

const TDesC & aName: attribute name
const TDesC & aValue: attribute value.

ProcessNConvertAttrL(const TDesC &, const TDesC &, const TDesC &)

TBool ProcessNConvertAttrL(const TDesC &aName,
const TDesC &aAttrName,
const TDesC &aAttrValue
)[protected]
Method to verify the value of the attribute based on its type. If the value is valid then this method sets the value to the corresponding attribtue in the current element
Since
1.0 - name of the attribute - value of the attribute

Parameters

const TDesC & aName
const TDesC & aAttrName
const TDesC & aAttrValue

ProcessStyleL(const TDesC &)

TBool ProcessStyleL(const TDesC &aValue)[protected]

Process a for style info.

Since
1.0

Parameters

const TDesC & aValue: attribute value

ProcessTransformL(const TDesC &, const TDesC &)

TBool ProcessTransformL(const TDesC &aName,
const TDesC &aValue
)[protected]

Process a for transform info.

Since
1.0

Parameters

const TDesC & aName: attribute name
const TDesC & aValue: attribute value

ProcessUnitsL(const TDesC &, const TDesC &)

TBool ProcessUnitsL(const TDesC &aName,
const TDesC &aValue
)[protected]

Process a for unit info.

Since
1.0

Parameters

const TDesC & aName: attribute name
const TDesC & aValue: attribute value

ProcessingInstructions(TDesC &, TDesC &)

TInt ProcessingInstructions(TDesC &aTarget,
TDesC &aData
)

Need method description

Since
1.0

Parameters

TDesC & aTarget
TDesC & aData

ReaderIndex(NW_Uint32)

voidReaderIndex(NW_Uint32aIndex)
Returns reader index
Since
Series60 3.1

Parameters

NW_Uint32 aIndex- reader index

RemoveFalseElementsOrMakeInvisible()

voidRemoveFalseElementsOrMakeInvisible()[protected]

RemoveFalseSwitchCasesOrMakeInvisible()

voidRemoveFalseSwitchCasesOrMakeInvisible()[protected]

RemoveInternalReferences(CSvgElementImpl *)

voidRemoveInternalReferences(CSvgElementImpl *aElement)[protected]

Removes references of element. Usually called before the element is deleted.

Since
s60 3.2

Parameters

CSvgElementImpl * aElementPointer of element that is about to be deleted.

SetForwardReferences(CSvgErrorImpl &)

voidSetForwardReferences(CSvgErrorImpl &aError)[protected]

Parameters

CSvgErrorImpl & aError

SkippedEntity(TDesC &)

TInt SkippedEntity(TDesC &aName)

Need method description

Since
1.0

Parameters

TDesC & aName

StartCDATA()

TInt StartCDATA()

A callback that signals beginning of a CDATA section

Since
1.0

StartDocument()

TInt StartDocument()

A callback that signals start of a document

Since
1.0

StartElement(TDesC &, TDesC &, TDesC &, MXMLAttributes *)

TInt StartElement(TDesC &aURI,
TDesC &aLocalName,
TDesC &aName,
MXMLAttributes *aAttributeList
)

A callback that signals beginning of an element

Since
1.0

Parameters

TDesC & aURI-
TDesC & aLocalName-
TDesC & aName- Name of the element
MXMLAttributes * aAttributeList- a list that keeps track of the attributes found for this element

StartElementL(TDesC &, TDesC &, TDesC &, MXMLAttributes *)

TInt StartElementL(TDesC &aURI,
TDesC &aLocalName,
TDesC &aName,
MXMLAttributes *aAttributeList
)[protected]

Parameters

TDesC & aURI
TDesC & aLocalName
TDesC & aName
MXMLAttributes * aAttributeList

StartEntity(TDesC &)

TInt StartEntity(TDesC &aName)

A callback that signals beginning of an entity element

Since
1.0

Parameters

TDesC & aName- A string buffer that will contain the entity name

SubstringL(const TDesC &, TInt, TInt)

HBufC *SubstringL(const TDesC &aString,
TIntaStartIndex,
TIntaEndIndex
)[protected]

Create a substring from the given string.

Since
1.0

Parameters

const TDesC & aString: string to create a substring.
TInt aStartIndex: starting index.
TInt aEndIndex: endind index.

SystemLanguage(TPtr)

voidSystemLanguage(TPtraValue)[protected]

Find out the system language for the client environment based on SVG source hint

Since
1.0

Parameters

TPtr aValue- A string buffer that contains the System Language hint

VerifyReqExReqFtrSysL(CSvgElementImpl *)

TBool VerifyReqExReqFtrSysL(CSvgElementImpl *aElement)[protected]

Parameters

CSvgElementImpl * aElement

Member Data Documentation

RPointerArray< CSvgElementImpl > * iAnimRefElementArray

RPointerArray< CSvgElementImpl > *iAnimRefElementArray[private]

RPointerArray< CSvgElementImpl > * iAnimationElementArray

RPointerArray< CSvgElementImpl > *iAnimationElementArray[private]

TBool iBeginEndAtr

TBool iBeginEndAtr[private]

TPtrC iByVal

TPtrC iByVal[private]

HBufC * iCData

HBufC *iCData[private]

TBool iCancelRequested

TBool iCancelRequested[private]

CSvgElementImpl * iCurrentElement

CSvgElementImpl *iCurrentElement[private]

CSvgElementImpl * iCurrentParentElement

CSvgElementImpl *iCurrentParentElement[private]

CSvgDocumentImpl * iDocument

CSvgDocumentImpl *iDocument[private]

TPtrC iFromVal

TPtrC iFromVal[private]

TInt iIgnoreDepth

TInt iIgnoreDepth[private]

RPointerArray< CSvgImageElementImpl > iImageElements

RPointerArray< CSvgImageElementImpl >iImageElements[private]

TBool iIsColorAnim

TBool iIsColorAnim[private]

TBool iIsSvgElement

TBool iIsSvgElement[private]

const RPointerArray< MSvgLoadingListener > * iLoadingListeners

const RPointerArray< MSvgLoadingListener > *iLoadingListeners[private]

TBool iRemoveFalseSwitchElements

TBool iRemoveFalseSwitchElements[private]

RPointerArray< CSvgElementImpl > * iReqFetAttSysArray

RPointerArray< CSvgElementImpl > *iReqFetAttSysArray[private]

CSvgElementImpl * iRootElement

CSvgElementImpl *iRootElement[private]

TPtrC iSplines

TPtrC iSplines[private]

CSvgErrorImpl * iSvgError

CSvgErrorImpl *iSvgError[private]

RPointerArray< CSvgElementImpl > * iSwitchElementArray

RPointerArray< CSvgElementImpl > *iSwitchElementArray[private]

HBufC * iSystemLanguage

HBufC *iSystemLanguage[private]

TPtrC iTimes

TPtrC iTimes[private]

TPtrC iToVal

TPtrC iToVal[private]

RPointerArray< CSvgElementImpl > * iUseElementArray

RPointerArray< CSvgElementImpl > *iUseElementArray[private]

TPtrC iValues

TPtrC iValues[private]