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.
Protected Member Functions | |
---|---|
CTypedNode(TNodeType, CNode *) |
Inherited Attributes | |
---|---|
CNode::iChildList | |
CNode::iDataValue | |
CNode::iParent | |
CNode::iType | |
CNode::iTypes | |
CNode::iTypesBasePtr | |
CNode::iValues |
CTypedNode | ( | TNodeType | aType, |
CNode * | aParent | ||
) | [protected, inline] |
TNodeType aType | |
CNode * aParent |
void | AddAttributeL | ( | TAttributeType | aAttributeType, |
CBase * | aAttributeValue | |||
) | [inline] |
Adds an attribute.
The node takes ownership of aAttributeValue.
TAttributeType aAttributeType | Attribute type |
CBase * aAttributeValue | Attribute value |
void | AddDataAndAttributeL | ( | HBufC16 * | aData, |
TAttributeType | aAttributeType, | |||
CBase * | aAttributeValue | |||
) | [inline] |
Sets node data and adds an attribute.
The node takes ownership of aDataand aAttributeValue. Existing node data owned by the node is deleted.
CTypedNode< TNodeType, TAttributeType > & | AppendNodeL | ( | TNodeType | aType | ) | [inline] |
Creates a new child node.
The new child node
TNodeType aType | Node type |
void | AppendNodeToThisNodeL | ( | CNode * | aNode | ) | [inline] |
Adds an existing node as a child.
CNode * aNode | Node to make a child |
CBase * | Attribute | ( | TAttributeType | aAttributeType | ) | const [inline] |
Gets an attribute value for a specified attribute type.
Attribute value
TAttributeType aAttributeType | Attribute type |
CBase * | AttributeByIndex | ( | TInt | aIndex | ) | const [inline] |
Gets the attribute value of an attribute at a specified index
Attribute value
TInt aIndex | Attribute index |
CBase * | AttributeByIndex | ( | TInt | aIndex, |
TAttributeType & | aType | |||
) | const [inline] |
Gets the attribute value and type of an attribute at a specified index..
Attribute value
TInt aIndex | Attribute index |
TAttributeType & aType | On return, the attribute type |
TInt | AttributeCount | ( | ) | const [inline] |
Gets the number of attributes of this node.
Number of attributes of this node
TBool | AttributeExists | ( | TAttributeType | aAttributeType | ) | const [inline] |
Tests if an attribute of a specified type exists.
True if the attribute exists, otherwise false
TAttributeType aAttributeType | Attribute type |
TAttributeType | AttributeTypeByIndex | ( | TInt | aIndex | ) | const [inline] |
Gets the attribute value of an attribute at a specified index
Attribute value
TInt aIndex | Attribute index |
CTypedNode * | Child | ( | TInt | aByIndex | ) | const [inline] |
Gets a child node by index.
Child node
TInt aByIndex | Index of the child node |
void | ClearSetDataNoDeleteL | ( | ) | [inline] |
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.
void | DeleteAllAttributes | ( | ) | [inline] |
Delete all node attributes.
Note that attribute values will be deleted.
void | DeleteAttribute | ( | TAttributeType | aAttributeType | ) | [inline] |
Deletes an attribute of a specified type.
Note that the attribute value will be deleted.
TAttributeType aAttributeType | Attribute type |
void | DeleteChildNode | ( | CNode * | aNode | ) | [inline] |
Deletes a specified child node.
CNode * aNode | Node to delete |
CTypedNode * | NewL | ( | TNodeType | aType, |
CNode * | aParent | |||
) | [static, inline] |
Allocates and constructs a new node.
New node
TNodeType aType | The type of the node |
CNode * aParent | The parent of this node |
CTypedNode * | NextChild | ( | const CNode * | aNode = NULL | ) | const [inline] |
Gets the first child or the next child after a specified child.
First or next child node
const CNode * aNode = NULL | Child node or NULL to get the first child |
CTypedNode * | NextSibling | ( | ) | const [inline] |
Gets the next sibling node.
This asks for the next child of its parent.
Next sibling node
TInt | NumberImmediateChildren | ( | ) | const [inline] |
Gets the number of children of this node.
Number of children of this node
CTypedNode * | PrevChild | ( | const CNode & | aNode | ) | const [inline] |
Gets the previous child before a specified child.
Previous child node
const CNode & aNode | Child node |
CTypedNode * | PrevSibling | ( | ) | const [inline] |
Gets the previous sibling node.
This asks for the previous child of its parent.
Previous sibling node
void | RemoveAttributeNoDelete | ( | TAttributeType | aAttributeType | ) | [inline] |
Removes an attribute of a specified type, but does not delete it.
The caller is now responsible for the destruction of the attribute value.
TAttributeType aAttributeType | Attribute type |
void | ReparentL | ( | CNode * | aParent | ) | [inline] |
Changes the parent of the node.
The node is removed from the childlist of its current parent.
CNode * aParent | New parent |
void | ResetDataPointer | ( | HBufC16 * | aData | ) | [inline] |
Resets the node data to a specified pointer.
Existing data owned by the node is deleted.
HBufC16 * aData | Root node |
void | SetDataL | ( | HBufC16 * | aDataNowNodeOwns | ) | [inline] |
Sets the node data.
The object will delete the data in its destructor.
HBufC16 * aDataNowNodeOwns | Node data |
void | SetDataNoDeleteL | ( | ) | [inline] |
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.
void | SetFileDataL | ( | HBufC16 * | aFileDataLocationNowNodeOwns | ) | [inline] |
Sets the node data to be taken from a specified file.
If the data is deleted, the referenced file is also deleted.
HBufC16 * aFileDataLocationNowNodeOwns | Name of the file containing the data |