#include <mw/cnode.h>
class CNode : public CBase |
Protected Attributes | |
---|---|
CArrayPtr< CNode > * | iChildList |
CDataNoDelete * | iDataValue |
CNode * | iParent |
TAny * | iType |
CArrayPtrFlat< TAny > | iTypes |
TInt32 * | iTypesBasePtr |
CArrayPtrFlat< CBase > | iValues |
Protected Member Functions | |
---|---|
CNode(TAny *, CNode *) | |
void | AdjustBasePointers() |
TInt | FindChild(const CNode *) |
HBufC16 * | SetupDeletableOrNonDeleteableDataLC() |
IMPORT_C | ~CNode | ( | ) |
Destructor.
Data (if owned by the object), child nodes and attributes are deleted.
Sets node data and adds an attribute.
The node takes ownership of aDataand aAttributeValue. Existing node data owned by the node is deleted.
Parameter | Description |
---|---|
aData | Node data |
AttributeType | Attribute type |
aAttributeValue | Attribute value |
IMPORT_C void | AppendNodeToThisNodeL | ( | CNode * | aNode | ) |
Adds an existing node as a child.
Parameter | Description |
---|---|
aNode | Node to make a child |
IMPORT_C TInt | AttributeCount | ( | ) | const |
Gets the number of attributes of this node.
Returns: Number of attributes of this node
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 | DeleteAllAttributes | ( | ) |
Delete all node attributes.
Note that attribute values will be deleted.
IMPORT_C void | DeleteAllChildNodes | ( | ) |
Deletes all the child nodes of this node.
IMPORT_C void | DeleteAttribute | ( | TAny * | aAttributeType | ) |
Deletes an attribute of a specified type.
Note that the attribute value will be deleted.
Parameter | Description |
---|---|
aAttributeType | Attribute type |
IMPORT_C void | DeleteChildNode | ( | CNode * | aNode | ) |
Deletes a specified child node.
Parameter | Description |
---|---|
aNode | Node to delete |
IMPORT_C CNode * | NextSibling | ( | ) | const |
Gets the next sibling node.
This asks for the next child of its parent.
Returns: Next sibling node
IMPORT_C TInt | NumberImmediateChildren | ( | ) | const |
Gets the number of children of this node.
Returns: Number of children of this node
IMPORT_C CNode * | PrevSibling | ( | ) | const |
Gets the previous sibling node.
This asks for the previous child of its parent.
Returns: Previous sibling node
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.
Parameter | Description |
---|---|
aAttributeType | Attribute type |
IMPORT_C void | ReparentL | ( | CNode * | aParent | ) |
Changes the parent of the node.
The node is removed from the childlist of its current parent.
Parameter | Description |
---|---|
aParent | New parent |
IMPORT_C void | ResetDataPointer | ( | HBufC16 * | aData | ) |
Resets the node data to a specified pointer.
Existing data owned by the node is deleted.
Parameter | Description |
---|---|
aData | Root node |
IMPORT_C void | SetDataL | ( | HBufC16 * | aDataNowNodeOwns | ) |
Sets the node data.
The object will delete the data in its destructor.
Parameter | Description |
---|---|
aDataNowNodeOwns | 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 | 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.
Parameter | Description |
---|---|
aFileDataLocationNowNodeOwns | Name of the file containing the data |