CSvgContentHandler Class Reference
class CSvgContentHandler : public CBase
|
Class description goes here.
Public Member Functions
|
|
~CSvgContentHandler
()
|
void
|
CancelParsing
()
|
TInt
|
Charecters
(
TDesC
&,
TInt
,
TInt
)
|
TInt
|
Comment
(
TDesC
&)
|
void
|
ConstructL
(
TBool
)
|
void
|
DataBuffer
(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
&)
|
void
|
ReaderIndex
(NW_Uint32)
|
TInt
|
SkippedEntity
(
TDesC
&)
|
TInt
|
StartCDATA
()
|
TInt
|
StartDocument
()
|
TInt
|
StartElement
(
TDesC
&,
TDesC
&,
TDesC
&,
MXMLAttributes
*)
|
TInt
|
StartEntity
(
TDesC
&)
|
Protected Member Functions
|
|
CSvgContentHandler
()
|
void
|
Append
(
TDes
&, const
TDesC
&,
TInt
,
TInt
)
|
void
|
AppendToCData
(const
TDesC
&)
|
TBool
|
ConvertDecimalStringToChar
(
TChar
&, const
TDesC
&)
|
void
|
ConvertEntitiesToCharsL
(
CDesCArrayFlat
&)
|
HBufC
*
|
ConvertEntitiesToCharsL
(const
TDesC
&)
|
TBool
|
ConvertEntityToChar
(
TChar
&, const
TDesC
&)
|
TBool
|
ConvertHexStringToChar
(
TChar
&, const
TDesC
&)
|
TBool
|
ExtractStyleValuePair
(const
TDesC
&,
TPtrC
&,
TPtrC
&)
|
void
|
FilterCharactersL
(
TDesC
&)
|
TInt
|
Find
(const
TDesC
&,
TInt
,
TChar
)
|
void
|
LoadImages
()
|
TGfxColor
|
ParseColor
(const
TDesC
&,
TBool
&)
|
TBool
|
ParseEntity
(const
TDesC
&)
|
void
|
PostParseProcessing
()
|
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
&)
|
void
|
RemoveFalseElementsOrMakeInvisible
()
|
void
|
RemoveFalseSwitchCasesOrMakeInvisible
()
|
void
|
RemoveInternalReferences
(
CSvgElementImpl
*)
|
void
|
SetForwardReferences
(
CSvgErrorImpl
&)
|
TInt
|
StartElementL
(
TDesC
&,
TDesC
&,
TDesC
&,
MXMLAttributes
*)
|
HBufC
*
|
SubstringL
(const
TDesC
&,
TInt
,
TInt
)
|
void
|
SystemLanguage
(
TPtr
)
|
TBool
|
VerifyReqExReqFtrSysL
(
CSvgElementImpl
*)
|
Constructor & Destructor Documentation
CSvgContentHandler()
CSvgContentHandler
|
(
|
)
|
[protected]
|
~CSvgContentHandler()
~CSvgContentHandler
|
(
|
)
|
[virtual]
|
Member Functions Documentation
Append(TDes &, const TDesC &, TInt, TInt)
void
|
Append
|
(
|
TDes
&
|
aDest,
|
|
const
TDesC
&
|
aSource,
|
|
TInt
|
aStartIndex,
|
|
TInt
|
aEndIndex
|
|
)
|
[protected]
|
Append a substring to the given string at given indices.
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 &)
void
|
AppendToCData
|
(
|
const
TDesC
&
|
aText
|
)
|
[protected]
|
CancelParsing()
Request to cancel parsing.
Charecters(TDesC &, TInt, TInt)
Callback that signals characters inside an XML document
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 &)
A callback that signals a XML comment
Parameters
TDesC
& aComment
|
- A string buffer that cintains the comment
|
ConstructL(TBool)
void
|
ConstructL
|
(
|
TBool
|
aRemoveFalseSwitchElements = ETrue
|
)
|
[virtual]
|
Part of two phase construction
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.
Parameters
TChar
& aChar
|
: character object to store unicode character.
|
const
TDesC
& aString
|
: xml decimal entity character string.
|
ConvertEntitiesToCharsL(CDesCArrayFlat &)
Convert any xml entity characters in the given string list to unicode characters.
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.
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.
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.
Parameters
TChar
& aChar
|
: character object to store unicode character.
|
const
TDesC
& aString
|
: xml hexadecimal entity character string.
|
DataBuffer(const TDesC16 &)
void
|
DataBuffer
|
(
|
const
TDesC16
&
|
aBuf
|
)
|
|
EndCDATA()
A callback that signals end of a CDATA section
EndDocument()
A callback that signals end of a document
EndElement(TDesC &, TDesC &, TDesC &)
A callback that signals end of an element
EndEntity(TDesC &)
A callback that signals end of an entity element
Parameters
TDesC
& aName
|
- A string buffer that will contain the entity name
|
ExtractStyleValuePair(const TDesC &, TPtrC &, TPtrC &)
FilterCharactersL(TDesC &)
void
|
FilterCharactersL
|
(
|
TDesC
&
|
aString
|
)
|
[protected]
|
Find(const TDesC &, TInt, TChar)
Find the given character in the given string at the starting index.
Parameters
const
TDesC
& aString
|
: string to find character.
|
TInt
aStartIndex
|
: starting index.
|
TChar
aChar
|
: character to search.
|
IgnoreWhiteSpace(TDesC &)
LoadImages()
void
|
LoadImages
|
(
|
)
|
[protected]
|
NewL(TBool)
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
Parameters
TBool
aRemoveFalseSwitchElements = ETrue
|
|
Parse16BitData(CSvgDocumentImpl *, const TDesC16 &, CSvgErrorImpl &)
ParseByteData(CSvgDocumentImpl *, const TDesC8 &, CSvgErrorImpl &)
Parses the given encrypted SVG source, constructing the presentation objects. This is a variant of ParseL and processes encrypted SVG sources.
ParseColor(const TDesC &, TBool &)
Parse for a color from the given string.
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.
ParseFile(CSvgDocumentImpl *, const TDesC &, CSvgErrorImpl &)
PostParseProcessing()
void
|
PostParseProcessing
|
(
|
)
|
[protected]
|
Post parsing processing, such as removing false switch elements.
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.
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
ProcessStyleL(const TDesC &)
TBool
|
ProcessStyleL
|
(
|
const
TDesC
&
|
aValue
|
)
|
[protected]
|
Process a for style info.
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.
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]
|
Parameters
const
TDesC
& aName
|
: attribute name
|
const
TDesC
& aValue
|
: attribute value
|
ProcessingInstructions(TDesC &, TDesC &)
ReaderIndex(NW_Uint32)
void
|
ReaderIndex
|
(
|
NW_Uint32
|
aIndex
|
)
|
|
Returns reader index
-
Since
-
Series60 3.1
Parameters
NW_Uint32 aIndex
|
- reader index
|
RemoveFalseElementsOrMakeInvisible()
void
|
RemoveFalseElementsOrMakeInvisible
|
(
|
)
|
[protected]
|
RemoveFalseSwitchCasesOrMakeInvisible()
void
|
RemoveFalseSwitchCasesOrMakeInvisible
|
(
|
)
|
[protected]
|
RemoveInternalReferences(CSvgElementImpl *)
Removes references of element. Usually called before the element is deleted.
SetForwardReferences(CSvgErrorImpl &)
StartCDATA()
A callback that signals beginning of a CDATA section
StartDocument()
A callback that signals start of a document
StartElement(TDesC &, TDesC &, TDesC &, MXMLAttributes *)
A callback that signals beginning of an element
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 *)
StartEntity(TDesC &)
A callback that signals beginning of an entity element
Parameters
TDesC
& aName
|
- A string buffer that will contain the entity name
|
SubstringL(const TDesC &, TInt, TInt)
HBufC
*
|
SubstringL
|
(
|
const
TDesC
&
|
aString,
|
|
TInt
|
aStartIndex,
|
|
TInt
|
aEndIndex
|
|
)
|
[protected]
|
Create a substring from the given string.
Parameters
const
TDesC
& aString
|
: string to create a substring.
|
TInt
aStartIndex
|
: starting index.
|
TInt
aEndIndex
|
: endind index.
|
SystemLanguage(TPtr)
void
|
SystemLanguage
|
(
|
TPtr
|
aValue
|
)
|
[protected]
|
Find out the system language for the client environment based on SVG source hint
Parameters
TPtr
aValue
|
- A string buffer that contains the System Language hint
|
VerifyReqExReqFtrSysL(CSvgElementImpl *)
Member Data Documentation
RPointerArray< CSvgElementImpl > * iAnimRefElementArray
RPointerArray< CSvgElementImpl > * iAnimationElementArray
TBool
iBeginEndAtr
TBool
|
iBeginEndAtr
|
[private]
|
TBool
iCancelRequested
TBool
|
iCancelRequested
|
[private]
|
CSvgElementImpl * iCurrentElement
CSvgElementImpl * iCurrentParentElement
CSvgDocumentImpl * iDocument
TInt
iIgnoreDepth
TInt
|
iIgnoreDepth
|
[private]
|
RPointerArray< CSvgImageElementImpl > iImageElements
TBool
iIsColorAnim
TBool
|
iIsColorAnim
|
[private]
|
TBool
iIsSvgElement
TBool
|
iIsSvgElement
|
[private]
|
const RPointerArray< MSvgLoadingListener > * iLoadingListeners
TBool
iRemoveFalseSwitchElements
TBool
|
iRemoveFalseSwitchElements
|
[private]
|
RPointerArray< CSvgElementImpl > * iReqFetAttSysArray
CSvgElementImpl * iRootElement
CSvgErrorImpl * iSvgError
RPointerArray< CSvgElementImpl > * iSwitchElementArray
HBufC * iSystemLanguage
HBufC
*
|
iSystemLanguage
|
[private]
|
RPointerArray< CSvgElementImpl > * iUseElementArray
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.