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 void AddChildL ( ChspsDomNode *)
IMPORT_C void AddChildL ( ChspsDomNode *, TInt )
IMPORT_C void AppendPCDataL (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 void DeleteAttributeList ()
IMPORT_C void DeleteChild ( ChspsDomNode *)
IMPORT_C TInt DescendantCount ()
void ExternalizeL ( RWriteStream &)
void InternalizeL ( RReadStream &)
IMPORT_C TBool IsRefNode ()
IMPORT_C TInt ItemIndex (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 TInt NodeId ()
IMPORT_C const TDesC8 & PCData ()
IMPORT_C ChspsDomNode * Parent ()
IMPORT_C void ReplaceChildL ( ChspsDomNode *, ChspsDomNode *)
IMPORT_C void SetContentType (const TContentType &)
IMPORT_C void SetLayoutNode (ChspsNode *)
IMPORT_C void SetNodeId (const TInt )
IMPORT_C void SetPCDataL (const TDesC8 &)
IMPORT_C void SetParent ( ChspsDomNode *)
IMPORT_C void SetRefNode ( TBool )
TInt Size ()
IMPORT_C ChspsDomStringPool & StringPool ()
Private Member Functions
ChspsDomNode ( ChspsDomStringPool &)
void Construct2L ()
void ConstructL (const TDesC8 &, const TDesC8 &)
void ConstructL (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 void AddChildL ( ChspsDomNode * aNode )

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

Since
S60 5.0

Parameters

ChspsDomNode * aNode Node owns it's childs.

AddChildL(ChspsDomNode *, TInt)

IMPORT_C void AddChildL ( ChspsDomNode * aNode,
TInt aIndex
)

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

Since
S60 5.0

Parameters

ChspsDomNode * aNode Node owns it's childs.
TInt aIndex Index in list where the node is added.

AppendPCDataL(const TDesC8 &)

IMPORT_C void AppendPCDataL ( 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 & aPCData UTF-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 & aAttribute Name 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 TBool aFastClone = EFalse
)

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

Since
S60 5.0

Parameters

ChspsDomStringPool & aStringPool A new string pool.
const TBool aFastClone = EFalse If 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 & aStringPool A new string pool.

Construct2L()

void Construct2L ( ) [private]

Construct members

ConstructL(const TDesC8 &, const TDesC8 &)

void ConstructL ( 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)

void ConstructL ( const TInt aName,
const TInt aNS
) [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 void DeleteAttributeList ( )

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 void DeleteChild ( 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 * aNode Node to be released.

DescendantCount()

IMPORT_C TInt DescendantCount ( ) const

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

Since
S60 5.0

ExternalizeL(RWriteStream &)

void ExternalizeL ( RWriteStream & aStream ) const

Documented in ChspsDomListItem::ExternalizeL

Parameters

RWriteStream & aStream

InternalizeL(RReadStream &)

void InternalizeL ( RReadStream & aStream )

Documented in ChspsDomListItem::InternalizeL

Parameters

RReadStream & aStream

IsRefNode()

IMPORT_C TBool IsRefNode ( ) const

Check if this node is referring to some global node.

Since
S60 5.0

ItemIndex(const MhspsDomListItem &)

IMPORT_C TInt ItemIndex ( 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 & aName Name of node.
const TDesC8 & aNS Namespace.
ChspsDomStringPool & aStringPool Attached string pool.

NewL(const TInt, const TInt, ChspsDomStringPool &)

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

Two-phased constructor.

Since
S60 5.0

Parameters

const TInt aName Name of node (string pool index).
const TInt aNS Namespace (string pool index).
ChspsDomStringPool & aStringPool Attached string pool.

NewL(RReadStream &, ChspsDomStringPool &)

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

Two-phased stream constructor.

Since
S60 5.0

Parameters

RReadStream & aStream Source stream.
ChspsDomStringPool & aStringPool Attached string pool.

NodeId()

IMPORT_C TInt NodeId ( ) 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 void ReplaceChildL ( 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 * aNode Node to be replaced.
ChspsDomNode * aNewNode New node.

SetContentType(const TContentType &)

IMPORT_C void SetContentType ( const TContentType & aContentType )

Get content type.

Since
S60 5.0

Parameters

const TContentType & aContentType content type.

SetLayoutNode(ChspsNode *)

IMPORT_C void SetLayoutNode ( ChspsNode * aNode )

Sets pointer to associated layout node.

Since
S60 5.0

Parameters

ChspsNode * aNode Pointer to associated layout node.

SetNodeId(const TInt)

IMPORT_C void SetNodeId ( const TInt aNodeId )

Node id is for a uiengine use.

Since
S60 5.0

Parameters

const TInt aNodeId Unique identifier.

SetPCDataL(const TDesC8 &)

IMPORT_C void SetPCDataL ( const TDesC8 & aPCData )

Set parsed character data.

Since
S60 5.0

Parameters

const TDesC8 & aPCData UTF-8 encoded parsed character data.

SetParent(ChspsDomNode *)

IMPORT_C void SetParent ( ChspsDomNode * aParent )

Node need to know it's parent.

Since
S60 5.0

Parameters

ChspsDomNode * aParent Pointer to this node parent.

SetRefNode(TBool)

IMPORT_C void SetRefNode ( TBool aRefNode = ETrue )

Mark this node as a reference node.

Since
S60 5.0

Parameters

TBool aRefNode = ETrue ETrue 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]