|
1 /* |
|
2 * Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Class definition of XCFW tree node |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CXCFWNODE_H |
|
21 #define CXCFWNODE_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <s32std.h> |
|
25 #include "xcfwnodeinterface.h" |
|
26 #include "gecoobjectbase.h" |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 |
|
30 /** |
|
31 * Node interface for setting data and relative nodes |
|
32 * This interface is not exported, CXCFWTree is the only user. |
|
33 * |
|
34 * @lib XCFW.lib |
|
35 * @since Series 60 3.1 |
|
36 */ |
|
37 class CXCFWNode : public CBase, public MXCFWNode |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Two-phased constructor. |
|
43 * @param aData Node data object |
|
44 */ |
|
45 static CXCFWNode* NewL( CGECOObjectBase* aData ); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 virtual ~CXCFWNode(); |
|
51 |
|
52 public: // New functions |
|
53 |
|
54 /** |
|
55 * Sets parent for this node |
|
56 * @since Series 60 3.1 |
|
57 * @param aNode New parent for this node |
|
58 */ |
|
59 void SetParent( MXCFWNode* aNode ); |
|
60 |
|
61 /** |
|
62 * Sets first child node for this node |
|
63 * @since Series 60 3.1 |
|
64 * @param aNode New first child for this node |
|
65 */ |
|
66 void SetFirstChild( MXCFWNode* aNode ); |
|
67 |
|
68 /** |
|
69 * Sets last child for this node |
|
70 * @since Series 60 3.1 |
|
71 * @param aNode New last child for this node |
|
72 */ |
|
73 void SetLastChild( MXCFWNode* aNode ); |
|
74 |
|
75 /** |
|
76 * Sets next sibling for this node |
|
77 * @since Series 60 3.1 |
|
78 * @param aNode New next sibling for this node |
|
79 */ |
|
80 void SetNextSibling( MXCFWNode* aNode ); |
|
81 |
|
82 /** |
|
83 * Sets previous sibling for this node |
|
84 * @since Series 60 3.1 |
|
85 * @param aNode New previous sibling for this node |
|
86 */ |
|
87 void SetPrevSibling( MXCFWNode* aNode ); |
|
88 |
|
89 /** |
|
90 * Sets content to this node |
|
91 * @since Series 60 3.1 |
|
92 * @param aData New content object to be stored in this node. |
|
93 * Note: Old data pointer should be deleted first. |
|
94 */ |
|
95 void SetData( CGECOObjectBase* aData ); |
|
96 |
|
97 public: // Functions from base classes |
|
98 |
|
99 /** |
|
100 * From MXCFWNode. Returns parent node for this node |
|
101 */ |
|
102 IMPORT_C MXCFWNode* Parent(); |
|
103 |
|
104 /** |
|
105 * From MXCFWNode. Returns first child node for this node |
|
106 */ |
|
107 IMPORT_C MXCFWNode* FirstChild(); |
|
108 |
|
109 /** |
|
110 * From MXCFWNode. Returns last child node for this node |
|
111 */ |
|
112 IMPORT_C MXCFWNode* LastChild(); |
|
113 |
|
114 /** |
|
115 * From MXCFWNode. Returns next sibling node for this node |
|
116 */ |
|
117 IMPORT_C MXCFWNode* NextSibling(); |
|
118 |
|
119 /** |
|
120 * From MXCFWNode. Returns previous sibling node for this node |
|
121 */ |
|
122 IMPORT_C MXCFWNode* PrevSibling(); |
|
123 |
|
124 /** |
|
125 * From MXCFWNode. Returns Data object for this node |
|
126 */ |
|
127 IMPORT_C CGECOObjectBase* Data(); |
|
128 |
|
129 private: |
|
130 |
|
131 /** |
|
132 * C++ default constructor. |
|
133 */ |
|
134 CXCFWNode(); |
|
135 |
|
136 /** |
|
137 * By default Symbian 2nd phase constructor is private. |
|
138 */ |
|
139 void ConstructL( CGECOObjectBase* aData ); |
|
140 |
|
141 private: // Data |
|
142 //Content object parser. Owned |
|
143 CGECOObjectBase* iData; |
|
144 |
|
145 //reference to parent node. Not owned |
|
146 MXCFWNode* iParent; |
|
147 |
|
148 //reference to first child node. Not owned |
|
149 MXCFWNode* iFirstChild; |
|
150 |
|
151 //reference to last child node. Not owned |
|
152 MXCFWNode* iLastChild; |
|
153 |
|
154 //reference to previous sibling node. Not owned |
|
155 MXCFWNode* iPrevSibling; |
|
156 |
|
157 //reference to next sibling node. Not owned |
|
158 MXCFWNode* iNextSibling; |
|
159 |
|
160 }; |
|
161 |
|
162 #endif // CXCFWNODE_H |
|
163 |
|
164 // End of File |