CTypedNode Class Reference
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.
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() |
| CNode::AddAttributeL(TAny *,CBase *) |
| CNode::AddDataAndAttributeL(HBufC16 *,TAny *,CBase *) |
| CNode::AdjustBasePointers() |
| CNode::AppendNodeL(TAny *) |
| CNode::Attribute(TAny *)const |
| CNode::AttributeByIndex(TInt,TAny *&)const |
| CNode::AttributeExists(TAny *)const |
| CNode::CNode(TAny *,CNode *) |
| CNode::DeleteAttribute(TAny *) |
| CNode::FindChild(const CNode *)const |
| CNode::NewL(TAny *,CNode *) |
| CNode::RemoveAttributeNoDelete(TAny *) |
| CNode::SetType(TAny *) |
| CNode::SetupDeletableOrNonDeleteableDataLC() |
| CNode::~CNode() |
Constructor & Destructor Documentation
CTypedNode(TNodeType, CNode *)
CTypedNode | ( | TNodeType | aType, |
| CNode * | aParent |
| ) | [protected, inline] |
Parameters
TNodeType aType | |
CNode * aParent | |
Member Functions Documentation
AddAttributeL(TAttributeType, CBase *)
void | AddAttributeL | ( | TAttributeType | aAttributeType, |
| CBase * | aAttributeValue |
| ) | [inline] |
Adds an attribute.
The node takes ownership of aAttributeValue.
Parameters
TAttributeType aAttributeType | Attribute type |
CBase * aAttributeValue | Attribute value |
AddDataAndAttributeL(HBufC16 *, TAttributeType, CBase *)
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.
Parameters
HBufC16 * aData | Node data |
TAttributeType aAttributeType | Attribute type |
CBase * aAttributeValue | Attribute value |
AppendNodeL(TNodeType)
CTypedNode< TNodeType, TAttributeType > & | AppendNodeL | ( | TNodeType | aType | ) | [inline] |
Creates a new child node.
AppendNodeToThisNodeL(CNode *)
void | AppendNodeToThisNodeL | ( | CNode * | aNode | ) | [inline] |
Adds an existing node as a child.
Parameters
CNode * aNode | Node to make a child |
Attribute(TAttributeType)
CBase * | Attribute | ( | TAttributeType | aAttributeType | ) | const [inline] |
Gets an attribute value for a specified attribute type.
Parameters
TAttributeType aAttributeType | Attribute type |
AttributeByIndex(TInt)
CBase * | AttributeByIndex | ( | TInt | aIndex | ) | const [inline] |
Gets the attribute value of an attribute at a specified index
Parameters
TInt aIndex | Attribute index |
AttributeByIndex(TInt, TAttributeType &)
CBase * | AttributeByIndex | ( | TInt | aIndex, |
| TAttributeType & | aType |
| ) | const [inline] |
Gets the attribute value and type of an attribute at a specified index..
Parameters
TInt aIndex | Attribute index |
TAttributeType & aType | On return, the attribute type |
AttributeCount()
TInt
| AttributeCount | ( | ) | const [inline] |
Gets the number of attributes of this node.
AttributeExists(TAttributeType)
TBool
| AttributeExists | ( | TAttributeType | aAttributeType | ) | const [inline] |
Tests if an attribute of a specified type exists.
Parameters
TAttributeType aAttributeType | Attribute type |
AttributeTypeByIndex(TInt)
TAttributeType | AttributeTypeByIndex | ( | TInt | aIndex | ) | const [inline] |
Gets the attribute value of an attribute at a specified index
Parameters
TInt aIndex | Attribute index |
Child(TInt)
Gets a child node by index.
Parameters
TInt aByIndex | Index of the child node |
ClearSetDataNoDeleteL()
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.
DeleteAllAttributes()
void | DeleteAllAttributes | ( | ) | [inline] |
Delete all node attributes.
Note that attribute values will be deleted.
DeleteAllChildNodes()
void | DeleteAllChildNodes | ( | ) | [inline] |
Deletes all the child nodes of this node.
DeleteAttribute(TAttributeType)
void | DeleteAttribute | ( | TAttributeType | aAttributeType | ) | [inline] |
Deletes an attribute of a specified type.
Note that the attribute value will be deleted.
Parameters
TAttributeType aAttributeType | Attribute type |
DeleteChildNode(CNode *)
void | DeleteChildNode | ( | CNode * | aNode | ) | [inline] |
Deletes a specified child node.
Parameters
CNode * aNode | Node to delete |
NewL(TNodeType, CNode *)
Allocates and constructs a new node.
Parameters
TNodeType aType | The type of the node |
CNode * aParent | The parent of this node |
NextChild(const CNode *)
Gets the first child or the next child after a specified child.
Parameters
const CNode * aNode = NULL | Child node or NULL to get the first child |
NextSibling()
Gets the next sibling node.
This asks for the next child of its parent.
NumberImmediateChildren()
TInt
| NumberImmediateChildren | ( | ) | const [inline] |
Gets the number of children of this node.
Parent()
Gets the parent of this node.
PrevChild(const CNode &)
Gets the previous child before a specified child.
Parameters
const CNode & aNode | Child node |
PrevSibling()
Gets the previous sibling node.
This asks for the previous child of its parent.
RemoveAttributeNoDelete(TAttributeType)
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.
Parameters
TAttributeType aAttributeType | Attribute type |
ReparentL(CNode *)
void | ReparentL | ( | CNode * | aParent | ) | [inline] |
Changes the parent of the node.
The node is removed from the childlist of its current parent.
Parameters
CNode * aParent | New parent |
ResetDataPointer(HBufC16 *)
void | ResetDataPointer | ( | HBufC16 * | aData | ) | [inline] |
Resets the node data to a specified pointer.
Existing data owned by the node is deleted.
Root()
Gets the absolute root node of the tree.
SetDataL(HBufC16 *)
void | SetDataL | ( | HBufC16 * | aDataNowNodeOwns | ) | [inline] |
Sets the node data.
The object will delete the data in its destructor.
Parameters
HBufC16 * aDataNowNodeOwns | Node data |
SetDataNoDeleteL()
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.
SetFileDataL(HBufC16 *)
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.
Parameters
HBufC16 * aFileDataLocationNowNodeOwns | Name of the file containing the data |
SetType(TNodeType)
void | SetType | ( | TNodeType | aType | ) | [inline] |
Type()
TNodeType | Type | ( | ) | const [inline] |
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.