![Symbian Developer Library](../../../../a_stock/images/mainheading.gif)
![]() |
![]() |
|
class CNode : public CBase;
CBase
-
Base class for all classes to be instantiated on the heap.
CNode
- (No abstract)
Defined in CNode
:
AddAttributeL(TAny *,CBase *)
Adds an attribute.AddDataAndAttributeL(HBufC16 *,TAny *,CBase *)
Sets node data and adds an attribute.AppendNodeL(TAny *)
Creates a new child node.AppendNodeToThisNodeL(CNode *)
Adds an existing node as a child.Attribute(TAny *)const
Gets an attribute value for a specified attribute type.AttributeByIndex(TInt)const
Gets the attribute value of an attribute at a specified index.AttributeByIndex(TInt,TAny *&)const
Gets the attribute value and type of an attribute at a specified index..AttributeCount()const
Gets the number of attributes of this node.AttributeExists(TAny *)const
Tests if an attribute of a specified type exists.AttributeTypeByIndex(TInt)const
Gets the attribute value of an attribute at a specified indexChild(TInt)const
Gets a child node by index.ClearSetDataNoDeleteL()
Sets the object to delete the node data in its destructor.Data()const
Gets the node data.DeleteAllAttributes()
Delete all node attributes.DeleteAllChildNodes()
Deletes all the child nodes of this node. DeleteAttribute(TAny *)
Deletes an attribute of a specified type.DeleteChildNode(CNode *)
Deletes a specified child node.NewL(TAny *,CNode *)
Allocates and constructs a new node.NextChild(const CNode *)const
Gets the first child or the next child after a specified child.NextSibling()const
Gets the next sibling node.NumberImmediateChildren()const
Gets the number of children of this node.Parent()const
Gets the parent of this node.PrevChild(const CNode &)const
Gets the previous child before a specified child.PrevSibling()const
Gets the previous sibling node.RemoveAttributeNoDelete(TAny *)
Removes an attribute of a specified type, but does not delete it.ReparentL(CNode *)
Changes the parent of the node.Reserved1()
Reserved1()const
ResetDataPointer(HBufC16 *)
Resets the node data to a specified pointer.Root()const
Gets the absolute root node of the tree.SetDataL(HBufC16 *)
Sets the node data.SetDataNoDeleteL()
Sets the object not to delete the node data in its destructor.SetFileDataL(HBufC16 *)
Sets the node data to be taken from a specified file.SetType(TAny *)
Sets the node type.Type()const
Gets the node type.iChildList
iDataValue
iParent
iType
iTypes
iTypesBasePtr
iValues
~CNode()
Destructor.Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...IMPORT_C ~CNode();
Destructor.
Data (if owned by the object), child nodes and attributes are deleted.
IMPORT_C static CNode* NewL(TAny *aType, CNode *aParent);
Allocates and constructs a new node.
|
|
IMPORT_C void DeleteChildNode(CNode *aNode);
Deletes a specified child node.
|
IMPORT_C CNode& AppendNodeL(TAny *aType=0);
Creates a new child node.
|
|
IMPORT_C void AppendNodeToThisNodeL(CNode *aNode);
Adds an existing node as a child.
|
IMPORT_C void SetDataL(HBufC16 *aDataNowNodeOwns);
Sets the node data.
The object will delete the data in its destructor.
|
IMPORT_C HBufC16* Data() const;
Gets the node data.
|
IMPORT_C 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.
IMPORT_C 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.
IMPORT_C 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.
|
IMPORT_C void ResetDataPointer(HBufC16 *aData);
Resets the node data to a specified pointer.
Existing data owned by the node is deleted.
|
IMPORT_C const CNode& Root() const;
Gets the absolute root node of the tree.
|
IMPORT_C CNode* Child(TInt aByIndex) const;
Gets a child node by index.
|
|
IMPORT_C CNode* NextChild(const CNode *aNode=0) const;
Gets the first child or the next child after a specified child.
|
|
IMPORT_C CNode* PrevChild(const CNode &aNode) const;
Gets the previous child before a specified child.
|
|
IMPORT_C CNode* Parent() const;
Gets the parent of this node.
|
IMPORT_C void ReparentL(CNode *aParent);
Changes the parent of the node.
The node is removed from the childlist of its current parent.
|
IMPORT_C CNode* NextSibling() const;
Gets the next sibling node.
This asks for the next child of its parent.
|
IMPORT_C CNode* PrevSibling() const;
Gets the previous sibling node.
This asks for the previous child of its parent.
|
IMPORT_C TInt NumberImmediateChildren() const;
Gets the number of children of this node.
|
IMPORT_C void DeleteAttribute(TAny *aAttributeType);
Deletes an attribute of a specified type.
Note that the attribute value will be deleted.
|
IMPORT_C void DeleteAllAttributes();
Delete all node attributes.
Note that attribute values will be deleted.
IMPORT_C void RemoveAttributeNoDelete(TAny *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.
|
IMPORT_C TInt AttributeCount() const;
Gets the number of attributes of this node.
|
IMPORT_C TAny* AttributeTypeByIndex(TInt aIndex) const;
Gets the attribute value of an attribute at a specified index
|
|
IMPORT_C CBase* AttributeByIndex(TInt aIndex) const;
Gets the attribute value of an attribute at a specified index.
|
|
IMPORT_C CBase* AttributeByIndex(TInt aIndex, TAny *&aType) const;
Gets the attribute value and type of an attribute at a specified index..
|
|
IMPORT_C void AddAttributeL(TAny *AttributeType, CBase *aAttributeValue);
Adds an attribute.
The node takes ownership of aAttributeValue.
|
IMPORT_C void AddDataAndAttributeL(HBufC16 *aData, TAny *AttributeType, 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.
|
IMPORT_C CBase* Attribute(TAny *AttributeType) const;
Gets an attribute value for a specified attribute type.
|
|
IMPORT_C TBool AttributeExists(TAny *aAttributeType) const;
Tests if an attribute of a specified type exists.
|
|
IMPORT_C void SetType(TAny *aType);
Sets the node type.
|
protected: CArrayPtr< CNode > * iChildList;