Location:
cnode.h
class CTypedNode : public CNode;
Template class for a node in a node tree.
The node type is set to the template parameter TNodeType and the attribute type to TAttributeType. These parameters should be pointers to the type required to store the type value: e.g. for a string, a const TDesC*.
The class is thin template over CNode
.
CBase
- Base class for all classes to be instantiated on the heap
CNode
- (No abstract)
CTypedNode
- Template class for a node in a node tree
Defined in CTypedNode
:
AddAttributeL()
, AddDataAndAttributeL()
, AppendNodeL()
, AppendNodeToThisNodeL()
, Attribute()
, AttributeByIndex()
, AttributeByIndex()
, AttributeCount()
, AttributeExists()
, AttributeTypeByIndex()
, CTypedNode()
, Child()
, ClearSetDataNoDeleteL()
, Data()
, DeleteAllAttributes()
, DeleteAllChildNodes()
, DeleteAttribute()
, DeleteChildNode()
, NewL()
, NextChild()
, NextSibling()
, NumberImmediateChildren()
, Parent()
, PrevChild()
, PrevSibling()
, RemoveAttributeNoDelete()
, ReparentL()
, ResetDataPointer()
, Root()
, SetDataL()
, SetDataNoDeleteL()
, SetFileDataL()
, SetType()
, Type()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
Inherited from CNode
:
Reserved1()
,
iChildList
,
iDataValue
,
iParent
,
iType
,
iTypes
,
iTypesBasePtr
,
iValues
static inline CTypedNode *NewL(TNodeType aType, CNode *aParent);
Allocates and constructs a new node.
|
|
protected: inline CTypedNode(TNodeType aType, CNode *aParent);
|
inline void DeleteChildNode(CNode *aNode);
Deletes a specified child node.
|
inline CTypedNode< TNodeType, TAttributeType > &AppendNodeL(TNodeType aType);
Creates a new child node.
|
|
inline void AppendNodeToThisNodeL(CNode *aNode);
Adds an existing node as a child.
|
inline void SetDataL(HBufC16 *aDataNowNodeOwns);
Sets the node data.
The object will delete the data in its destructor.
|
inline void SetDataNoDeleteL();
Sets the object not to delete the node data in its destructor.
Note that the function internally reallocates memory. If it leaves, the data is lost.
inline void ClearSetDataNoDeleteL();
Sets the object to delete the node data in its destructor.
Note that the function internally reallocates memory. If it leaves, the data is lost.
inline void SetFileDataL(HBufC16 *aFileDataLocationNowNodeOwns);
Sets the node data to be taken from a specified file.
If the data is deleted, the referenced file is also deleted.
|
inline void ResetDataPointer(HBufC16 *aData);
Resets the node data to a specified pointer.
Existing data owned by the node is deleted.
|
inline HBufC16 *Data() const;
Gets the node data.
|
inline const CTypedNode &Root() const;
Gets the absolute root node of the tree.
|
inline CTypedNode *Child(TInt aByIndex) const;
Gets a child node by index.
|
|
inline CTypedNode *NextChild(const CNode *aNode=0) const;
Gets the first child or the next child after a specified child.
|
|
inline CTypedNode *PrevChild(const CNode &aNode) const;
Gets the previous child before a specified child.
|
|
inline CTypedNode *Parent() const;
Gets the parent of this node.
|
inline void ReparentL(CNode *aParent);
Changes the parent of the node.
The node is removed from the childlist of its current parent.
|
inline CTypedNode *NextSibling() const;
Gets the next sibling node.
This asks for the next child of its parent.
|
inline CTypedNode *PrevSibling() const;
Gets the previous sibling node.
This asks for the previous child of its parent.
|
inline TInt NumberImmediateChildren() const;
Gets the number of children of this node.
|
inline void DeleteAttribute(TAttributeType aAttributeType);
Deletes an attribute of a specified type.
Note that the attribute value will be deleted.
|
inline void DeleteAllAttributes();
Delete all node attributes.
Note that attribute values will be deleted.
inline void RemoveAttributeNoDelete(TAttributeType aAttributeType);
Removes an attribute of a specified type, but does not delete it.
The caller is now responsible for the destruction of the attribute value.
|
inline TInt AttributeCount() const;
Gets the number of attributes of this node.
|
inline TAttributeType AttributeTypeByIndex(TInt aIndex) const;
Gets the attribute value of an attribute at a specified index
|
|
inline CBase *AttributeByIndex(TInt aIndex) const;
Gets the attribute value of an attribute at a specified index
|
|
inline CBase *AttributeByIndex(TInt aIndex, TAttributeType &aType) const;
Gets the attribute value and type of an attribute at a specified index..
|
|
inline void AddAttributeL(TAttributeType aAttributeType, CBase *aAttributeValue);
Adds an attribute.
The node takes ownership of aAttributeValue.
|
inline void AddDataAndAttributeL(HBufC16 *aData, TAttributeType aAttributeType, CBase *aAttributeValue);
Sets node data and adds an attribute.
The node takes ownership of aDataand aAttributeValue. Existing node data owned by the node is deleted.
|
inline CBase *Attribute(TAttributeType aAttributeType) const;
Gets an attribute value for a specified attribute type.
|
|
inline TBool AttributeExists(TAttributeType aAttributeType) const;
Tests if an attribute of a specified type exists.
|
|
inline void SetType(TNodeType aType);
Sets the node type.
|