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.
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.
TAttributeType aAttributeType | Attribute type |
CBase * | AttributeByIndex | ( | TInt | aIndex | ) | const [inline] |
Gets the attribute value of an attribute at a specified index
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..
TInt aIndex | Attribute index |
TAttributeType & aType | On return, the attribute type |
TBool | AttributeExists | ( | TAttributeType | aAttributeType | ) | const [inline] |
Tests if an attribute of a specified type exists.
TAttributeType aAttributeType | Attribute type |
TAttributeType | AttributeTypeByIndex | ( | TInt | aIndex | ) | const [inline] |
Gets the attribute value of an attribute at a specified index
TInt aIndex | Attribute index |
CTypedNode * | Child | ( | TInt | aByIndex | ) | const [inline] |
Gets a child node by index.
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 | DeleteAllChildNodes | ( | ) | [inline] |
Deletes all the child nodes of this node.
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.
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.
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.
TInt | NumberImmediateChildren | ( | ) | const [inline] |
Gets the number of children of this node.
CTypedNode * | PrevChild | ( | const CNode & | aNode | ) | const [inline] |
Gets the previous child before a specified child.
const CNode & aNode | Child node |
CTypedNode * | PrevSibling | ( | ) | const [inline] |
Gets the previous sibling node.
This asks for the previous child of its parent.
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 |
void | SetType | ( | TNodeType | aType | ) | [inline] |
Sets the node type.
TNodeType aType | Node type |
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.