1.1 --- a/epoc32/include/mw/cnode.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ b/epoc32/include/mw/cnode.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -1,53 +1,44 @@
1.4 -/// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 -/// All rights reserved.
1.6 -/// This component and the accompanying materials are made available
1.7 -/// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.8 -/// which accompanies this distribution, and is available
1.9 -/// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 -///
1.11 -/// Initial Contributors:
1.12 -/// Nokia Corporation - initial contribution.
1.13 -///
1.14 -/// Contributors:
1.15 -///
1.16 -/// Description:
1.17 -/// All rights reserved.
1.18 -/// This component and the accompanying materials are made available
1.19 -/// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.20 -/// which accompanies this distribution, and is available
1.21 -/// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.22 -/// Initial Contributors:
1.23 -/// Nokia Corporation - initial contribution.
1.24 -/// Contributors:
1.25 -/// This contains the definitions of CDataDelete, CDataNoDelete, CIntAttribute, CNode, and CTypedNode.
1.26 -/// CDataNoDelete is a base class to CDataDelete and are essentially a wrapper around an HBufC16.
1.27 -/// The node owns the data that is added to it and therefore is responsible for deleting all its data,
1.28 -/// hence theses two classes allow a user to have non deletable data. Internally to the node it is also
1.29 -/// sometimes necessary to change the data into either deletable or non-deletable data api's are provided
1.30 -/// for this.
1.31 -/// CIntAttribute is wrapper around a TInt, this is provided as the nodes attribute value is a CBase* however
1.32 -/// it might be desirable to store integer's in here. Attribute value is owned by the node therefore the node is
1.33 -/// responsible for deleting it.
1.34 -/// CNode is the basis for constructing a tree. It consists of an array of child nodes, node type, a parent node,
1.35 -/// an array of attributes, and a data member. Internally the data member is defined as CDataNoDelete however
1.36 -/// to the user all the exported api's take an HBufC16*. Data is owned by the node and is destroyed by the node,
1.37 -/// However in certain circumstances this is not desirable hence the api's to make the data non-deletable. The
1.38 -/// node type is defined as a TAny* however normal usage would use the templated node - CTypedNode. The node type
1.39 -/// is used to identify groups of nodes. The attribute array is fairy simple and consists of AttributeType and
1.40 -/// AttributeValue. AttributeType can be defined by using the templated class and should be a 32bit value. AttributeValue
1.41 -/// can be any object derived from CBase and the node takes ownership therefore the node delete's it.
1.42 -/// Basic usage should be to use the templated class in order to make use of the templated types (TNodeType,TAttributeType).
1.43 -/// Create a node for example:
1.44 -/// CTypedNode<CNode*, const TDesC*> *tree = CTypedNode<CNode*, const TDesC*>::NewL(0,0);
1.45 -/// add a new child:
1.46 -/// CNODE *TestChildNode1 = tree->AppendNodeL(aTempNodeForNodeType);
1.47 -/// add some data:
1.48 -/// TestChildNode1->SetDataL(aHBufC16);
1.49 -/// add an attribute:
1.50 -/// TestChildNode1->->AddAttributeL(aTAttributeType,aCBasePointerAttributeValue);
1.51 -/// Explanation of individual api's is documented below.
1.52 -///
1.53 -
1.54 +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
1.55 +// All rights reserved.
1.56 +// This component and the accompanying materials are made available
1.57 +// under the terms of "Eclipse Public License v1.0"
1.58 +// which accompanies this distribution, and is available
1.59 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.60 +//
1.61 +// Initial Contributors:
1.62 +// Nokia Corporation - initial contribution.
1.63 +//
1.64 +// Contributors:
1.65 +//
1.66 +// Description:
1.67 +// This contains the definitions of CDataDelete, CDataNoDelete, CIntAttribute, CNode, and CTypedNode.
1.68 +// CDataNoDelete is a base class to CDataDelete and are essentially a wrapper around an HBufC16.
1.69 +// The node owns the data that is added to it and therefore is responsible for deleting all its data,
1.70 +// hence theses two classes allow a user to have non deletable data. Internally to the node it is also
1.71 +// sometimes necessary to change the data into either deletable or non-deletable data api's are provided
1.72 +// for this.
1.73 +// CIntAttribute is wrapper around a TInt, this is provided as the nodes attribute value is a CBase* however
1.74 +// it might be desirable to store integer's in here. Attribute value is owned by the node therefore the node is
1.75 +// responsible for deleting it.
1.76 +// CNode is the basis for constructing a tree. It consists of an array of child nodes, node type, a parent node,
1.77 +// an array of attributes, and a data member. Internally the data member is defined as CDataNoDelete however
1.78 +// to the user all the exported api's take an HBufC16*. Data is owned by the node and is destroyed by the node,
1.79 +// However in certain circumstances this is not desirable hence the api's to make the data non-deletable. The
1.80 +// node type is defined as a TAny* however normal usage would use the templated node - CTypedNode. The node type
1.81 +// is used to identify groups of nodes. The attribute array is fairy simple and consists of AttributeType and
1.82 +// AttributeValue. AttributeType can be defined by using the templated class and should be a 32bit value. AttributeValue
1.83 +// can be any object derived from CBase and the node takes ownership therefore the node delete's it.
1.84 +// Basic usage should be to use the templated class in order to make use of the templated types (TNodeType,TAttributeType).
1.85 +// Create a node for example:
1.86 +// CTypedNode<CNode*, const TDesC*> *tree = CTypedNode<CNode*, const TDesC*>::NewL(0,0);
1.87 +// add a new child:
1.88 +// CNODE *TestChildNode1 = tree->AppendNodeL(aTempNodeForNodeType);
1.89 +// add some data:
1.90 +// TestChildNode1->SetDataL(aHBufC16);
1.91 +// add an attribute:
1.92 +// TestChildNode1->->AddAttributeL(aTAttributeType,aCBasePointerAttributeValue);
1.93 +// Explanation of individual api's is documented below.
1.94 +//
1.95
1.96
1.97
1.98 @@ -61,7 +52,7 @@
1.99 /**
1.100 @file
1.101 @publishedAll
1.102 - @released
1.103 + @deprecated
1.104 */
1.105
1.106 //Granularity of arrays
1.107 @@ -291,13 +282,13 @@
1.108
1.109 //Adds an attribute, parameters are the type of attribute and its value
1.110 //WARNING node takes ownership of aAttributeValue
1.111 - ////Push aAttributeValue onto the CleanupStack before calling then pop off on return
1.112 + //Push aAttributeValue onto the CleanupStack before calling then pop off on return
1.113 //##ModelId=3B666BCE002B
1.114 IMPORT_C void AddAttributeL(TAny* AttributeType, CBase* aAttributeValue);
1.115
1.116 //Adds data to the node and also adds an attribute, parameters are the Data to be added, the type of attribute and its value
1.117 //WARNING node takes ownership of aData and aAttributeValue
1.118 - ////Push aAttributeValue and aData onto the CleanupStack before calling then pop off on return
1.119 + //Push aAttributeValue and aData onto the CleanupStack before calling then pop off on return
1.120 //##ModelId=3B666BCE000D
1.121 IMPORT_C void AddDataAndAttributeL(HBufC16 *aData, TAny* AttributeType, CBase* aAttributeValue);
1.122