ChspsDomNode Class Reference

class ChspsDomNode : public CBase

Class represents a single node in the document tree.

hspsdomdocument.lib
Since
S60 5.0

Inherits from

Public Member Functions
~ChspsDomNode()
IMPORT_C voidAddChildL(ChspsDomNode *)
IMPORT_C voidAddChildL(ChspsDomNode *, TInt)
IMPORT_C voidAppendPCDataL(const TDesC8 &)
IMPORT_C ChspsDomList &AttributeList()
IMPORT_C const TDesC8 &AttributeValue(const TDesC8 &)
IMPORT_C ChspsDomList &ChildNodes()
IMPORT_C ChspsDomNode *CloneL(ChspsDomStringPool &, const TBool)
IMPORT_C ChspsDomNode *CloneWithoutKidsL(ChspsDomStringPool &)
IMPORT_C const TContentType &ContentType()
IMPORT_C ChspsDomNode *CreateRefNodeL()
IMPORT_C voidDeleteAttributeList()
IMPORT_C voidDeleteChild(ChspsDomNode *)
IMPORT_C TIntDescendantCount()
voidExternalizeL(RWriteStream &)
voidInternalizeL(RReadStream &)
IMPORT_C TBoolIsRefNode()
IMPORT_C TIntItemIndex(const MhspsDomListItem &)
IMPORT_C ChspsNode *LayoutNode()
IMPORT_C const TDesC8 &Name()
IMPORT_C const TDesC8 &Namespace()
ChspsDomNode *NewL(const TDesC8 &, const TDesC8 &, ChspsDomStringPool &)
ChspsDomNode *NewL(const TInt, const TInt, ChspsDomStringPool &)
ChspsDomNode *NewL(RReadStream &, ChspsDomStringPool &)
IMPORT_C TIntNodeId()
IMPORT_C const TDesC8 &PCData()
IMPORT_C ChspsDomNode *Parent()
IMPORT_C voidReplaceChildL(ChspsDomNode *, ChspsDomNode *)
IMPORT_C voidSetContentType(const TContentType &)
IMPORT_C voidSetLayoutNode(ChspsNode *)
IMPORT_C voidSetNodeId(const TInt)
IMPORT_C voidSetPCDataL(const TDesC8 &)
IMPORT_C voidSetParent(ChspsDomNode *)
IMPORT_C voidSetRefNode(TBool)
TInt Size()
IMPORT_C ChspsDomStringPool &StringPool()
Private Member Functions
ChspsDomNode(ChspsDomStringPool &)
voidConstruct2L()
voidConstructL(const TDesC8 &, const TDesC8 &)
voidConstructL(const TInt, const TInt)
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
ChspsDomList *iAttributeList
ChspsDomList *iChildList
TContentType iContentType
ChspsNode *iLayoutNode
TInt iNSRef
TInt iNameRef
TInt iNodeId
HBufC8 *iPCData
ChspsDomNode *iParentNode
TBool iRefNode
ChspsDomStringPool &iStringPool

Constructor & Destructor Documentation

ChspsDomNode(ChspsDomStringPool &)

ChspsDomNode(ChspsDomStringPool &aStringPool)[private]

C++ default constructor.

Parameters

ChspsDomStringPool & aStringPool

~ChspsDomNode()

~ChspsDomNode()[virtual]

Destructor.

Member Functions Documentation

AddChildL(ChspsDomNode *)

IMPORT_C voidAddChildL(ChspsDomNode *aNode)

Child nodes of this node are needed to be able to traverse the document.

Since
S60 5.0

Parameters

ChspsDomNode * aNodeNode owns it's childs.

AddChildL(ChspsDomNode *, TInt)

IMPORT_C voidAddChildL(ChspsDomNode *aNode,
TIntaIndex
)

Child nodes of this node are needed to be able to traverse the document.

Since
S60 5.0

Parameters

ChspsDomNode * aNodeNode owns it's childs.
TInt aIndexIndex in list where the node is added.

AppendPCDataL(const TDesC8 &)

IMPORT_C voidAppendPCDataL(const TDesC8 &aPCData)

Append PCData into node. Thus it is possible to have "<root>a <first/> c <second/> e </root>" PCData.

Since
S60 5.0

Parameters

const TDesC8 & aPCDataUTF-8 encoded parsed character data.

AttributeList()

IMPORT_C ChspsDomList &AttributeList()const

Node's attributes exist in a list.

Since
S60 5.0

AttributeValue(const TDesC8 &)

IMPORT_C const TDesC8 &AttributeValue(const TDesC8 &aAttribute)const

Returns value of given attribute.

Since
S60 5.0

Parameters

const TDesC8 & aAttributeName of the attribute.

ChildNodes()

IMPORT_C ChspsDomList &ChildNodes()

Access to child nodes.

Since
S60 5.0

CloneL(ChspsDomStringPool &, const TBool)

IMPORT_C ChspsDomNode *CloneL(ChspsDomStringPool &aStringPool,
const TBoolaFastClone = EFalse
)

Makes a clone from this node and it's child nodes.

Since
S60 5.0

Parameters

ChspsDomStringPool & aStringPoolA new string pool.
const TBool aFastClone = EFalseIf ETrue, then fast mode cloning is used.

CloneWithoutKidsL(ChspsDomStringPool &)

IMPORT_C ChspsDomNode *CloneWithoutKidsL(ChspsDomStringPool &aStringPool)

Makes a clone only from this node.

Since
S60 5.0

Parameters

ChspsDomStringPool & aStringPoolA new string pool.

Construct2L()

voidConstruct2L()[private]

Construct members

ConstructL(const TDesC8 &, const TDesC8 &)

voidConstructL(const TDesC8 &aName,
const TDesC8 &aNS
)[private]

By default Symbian 2nd phase constructor is private.

Parameters

const TDesC8 & aName
const TDesC8 & aNS

ConstructL(const TInt, const TInt)

voidConstructL(const TIntaName,
const TIntaNS
)[private]

By default Symbian 2nd phase constructor is private.

Parameters

const TInt aName
const TInt aNS

ContentType()

IMPORT_C const TContentType &ContentType()

Set content type.

Since
S60 5.0

CreateRefNodeL()

IMPORT_C ChspsDomNode *CreateRefNodeL()

Contructs a ref node from this node and its child's.

Since
S60 5.0

DeleteAttributeList()

IMPORT_C voidDeleteAttributeList()

Deletes attributes when they are not needed anymore. I.e. UIEngine has copied them into property list.

Since
S60 5.0

DeleteChild(ChspsDomNode *)

IMPORT_C voidDeleteChild(ChspsDomNode *aNode)

Removes node from the child list and frees memory allocated for a child node and it descendants.

Since
S60 5.0

Parameters

ChspsDomNode * aNodeNode to be released.

DescendantCount()

IMPORT_C TIntDescendantCount()const

Recursive function to count all child nodes belonging to this node.

Since
S60 5.0

ExternalizeL(RWriteStream &)

voidExternalizeL(RWriteStream &aStream)const

Parameters

RWriteStream & aStream

InternalizeL(RReadStream &)

voidInternalizeL(RReadStream &aStream)

Parameters

RReadStream & aStream

IsRefNode()

IMPORT_C TBoolIsRefNode()const

Check if this node is referring to some global node.

Since
S60 5.0

ItemIndex(const MhspsDomListItem &)

IMPORT_C TIntItemIndex(const MhspsDomListItem &aItem)const

Get the node unique identifier.

Since
S60 5.0

Parameters

const MhspsDomListItem & aItem

LayoutNode()

IMPORT_C ChspsNode *LayoutNode()

Returns pointer to associated layout node.

Since
S60 5.0

Name()

IMPORT_C const TDesC8 &Name()

Documented in ChspsDomListItem::Name

Namespace()

IMPORT_C const TDesC8 &Namespace()

Get the namespace of this node.

Since
S60 5.0

NewL(const TDesC8 &, const TDesC8 &, ChspsDomStringPool &)

ChspsDomNode *NewL(const TDesC8 &aName,
const TDesC8 &aNS,
ChspsDomStringPool &aStringPool
)[static]

Two-phased constructor.

Since
S60 5.0

Parameters

const TDesC8 & aNameName of node.
const TDesC8 & aNSNamespace.
ChspsDomStringPool & aStringPoolAttached string pool.

NewL(const TInt, const TInt, ChspsDomStringPool &)

ChspsDomNode *NewL(const TIntaName,
const TIntaNS,
ChspsDomStringPool &aStringPool
)[static]

Two-phased constructor.

Since
S60 5.0

Parameters

const TInt aNameName of node (string pool index).
const TInt aNSNamespace (string pool index).
ChspsDomStringPool & aStringPoolAttached string pool.

NewL(RReadStream &, ChspsDomStringPool &)

ChspsDomNode *NewL(RReadStream &aStream,
ChspsDomStringPool &aStringPool
)[static]

Two-phased stream constructor.

Since
S60 5.0

Parameters

RReadStream & aStreamSource stream.
ChspsDomStringPool & aStringPoolAttached string pool.

NodeId()

IMPORT_C TIntNodeId()const

Get the node unique identifier.

Since
S60 5.0

PCData()

IMPORT_C const TDesC8 &PCData()

Get the character data.

Since
S60 5.0

Parent()

IMPORT_C ChspsDomNode *Parent()const

Node's parent is enquered e.g to traverse the document.

Since
S60 5.0

ReplaceChildL(ChspsDomNode *, ChspsDomNode *)

IMPORT_C voidReplaceChildL(ChspsDomNode *aNode,
ChspsDomNode *aNewNode
)

Replaces a child node with the other node. Memory allocated for the node is freed.

Since
S60 5.0

Parameters

ChspsDomNode * aNodeNode to be replaced.
ChspsDomNode * aNewNodeNew node.

SetContentType(const TContentType &)

IMPORT_C voidSetContentType(const TContentType &aContentType)

Get content type.

Since
S60 5.0

Parameters

const TContentType & aContentTypecontent type.

SetLayoutNode(ChspsNode *)

IMPORT_C voidSetLayoutNode(ChspsNode *aNode)

Sets pointer to associated layout node.

Since
S60 5.0

Parameters

ChspsNode * aNodePointer to associated layout node.

SetNodeId(const TInt)

IMPORT_C voidSetNodeId(const TIntaNodeId)

Node id is for a uiengine use.

Since
S60 5.0

Parameters

const TInt aNodeIdUnique identifier.

SetPCDataL(const TDesC8 &)

IMPORT_C voidSetPCDataL(const TDesC8 &aPCData)

Set parsed character data.

Since
S60 5.0

Parameters

const TDesC8 & aPCDataUTF-8 encoded parsed character data.

SetParent(ChspsDomNode *)

IMPORT_C voidSetParent(ChspsDomNode *aParent)

Node need to know it's parent.

Since
S60 5.0

Parameters

ChspsDomNode * aParentPointer to this node parent.

SetRefNode(TBool)

IMPORT_C voidSetRefNode(TBoolaRefNode = ETrue)

Mark this node as a reference node.

Since
S60 5.0

Parameters

TBool aRefNode = ETrueETrue if node is a reference node.

Size()

TInt Size()const

Documented in ChspsDomListItem::Size

StringPool()

IMPORT_C ChspsDomStringPool &StringPool()const

Get reference to the dom's string pool.

Since
S60 5.0

Member Data Documentation

ChspsDomList * iAttributeList

ChspsDomList *iAttributeList[private]

ChspsDomList * iChildList

ChspsDomList *iChildList[private]

TContentType iContentType

TContentType iContentType[private]

ChspsNode * iLayoutNode

ChspsNode *iLayoutNode[private]

TInt iNSRef

TInt iNSRef[private]

TInt iNameRef

TInt iNameRef[private]

TInt iNodeId

TInt iNodeId[private]

HBufC8 * iPCData

HBufC8 *iPCData[private]

ChspsDomNode * iParentNode

ChspsDomNode *iParentNode[private]

TBool iRefNode

TBool iRefNode[private]

ChspsDomStringPool & iStringPool

ChspsDomStringPool &iStringPool[private]