|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // 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 |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** ClearAllFields */ |
|
17 inline void RDataBuilderBase::ClearAllFields() |
|
18 {DataBuilderFuncs::ClearAllFields(*this);} |
|
19 |
|
20 /** |
|
21 Returns if Data Builder Element Exists |
|
22 @param aIndex id of element we are interested in |
|
23 @return ETrue if element exists, EFalse otherwise |
|
24 */ |
|
25 inline TBool RDataBuilderArrayBase::ElementExists(const TInt& aIndex) const |
|
26 {return DataBuilderFuncs::FieldExists(*this, aIndex);} |
|
27 |
|
28 /** |
|
29 Clears builder array element |
|
30 @param aIndex id of element we wish to clear |
|
31 */ |
|
32 inline void RDataBuilderArrayBase::ClearElement(const TInt& aIndex) |
|
33 {DataBuilderFuncs::ClearField(*this, aIndex);} |
|
34 |
|
35 |
|
36 template<typename T, typename Base> |
|
37 /** |
|
38 RDataBuilder field exists implementation |
|
39 @param aFieldId id of field we are interested in |
|
40 @return TBool if exists |
|
41 */ |
|
42 inline TBool RDataBuilder<T, Base>::FieldExists(const typename T::TFieldId& aFieldId) const |
|
43 {return DataBuilderFuncs::FieldExists(*this, static_cast<TInt>(aFieldId));} |
|
44 |
|
45 |
|
46 template<typename T, typename Base> |
|
47 /** |
|
48 RDataBuilder field exists implementation |
|
49 @param aFieldId id of field we are interested in |
|
50 @return TBool if exists |
|
51 */ |
|
52 inline TBool RDataBuilder<T, Base>::IsDataAvailable() const |
|
53 {return DataBuilderFuncs::AnyFieldExists(*this);} |
|
54 |
|
55 |
|
56 |
|
57 template<typename T, typename Base> |
|
58 /** |
|
59 RDataBuilder clear field exists |
|
60 @param aFieldId id of field we are interested in |
|
61 */ |
|
62 inline void RDataBuilder<T, Base>::ClearField(const typename T::TFieldId& aFieldId) |
|
63 {DataBuilderFuncs::ClearField(*this, static_cast<TInt>(aFieldId));} |
|
64 |
|
65 template<typename T, typename Base> |
|
66 /** |
|
67 RDataBuilder array builder implementation |
|
68 @param aFieldId id of field we are interested in |
|
69 @param aArrayBuilder array we are interested in |
|
70 */ |
|
71 inline void RDataBuilder<T, Base>::GetArrayBuilder(const typename T::TFieldId& aFieldId, RDataBuilderArrayBase& aArrayBuilder) |
|
72 {DataBuilderFuncs::GetFieldBuilder(*this, static_cast<TInt>(aFieldId), static_cast<RDataBuilderBase&>(aArrayBuilder));} |
|
73 |
|
74 template<typename T, typename BuilderBase> |
|
75 template<typename S> |
|
76 /** |
|
77 RDataBuilder field exists implementation |
|
78 @param aFieldId id of field we are interested in |
|
79 @param aDataBuilder field we are interested in |
|
80 */ |
|
81 inline void RDataBuilder<T, BuilderBase>::GetFieldBuilder(const typename T::TFieldId& aFieldId, RDataBuilder<S, RDataBuilderBase>& aDataBuilder) |
|
82 {DataBuilderFuncs::GetFieldBuilder(*this, static_cast<TInt>(aFieldId), static_cast<RDataBuilderBase&>(aDataBuilder));} |
|
83 |
|
84 template<typename T> |
|
85 /** |
|
86 Set array element |
|
87 @param aIndex id of element we are interested in |
|
88 @param aData data to set in field we are interested in |
|
89 */ |
|
90 inline void RDataBuilderArray<T>::SetElement(const TInt& aIndex, const T& aData) |
|
91 {DataBuilderFuncs::SetField(*this, aIndex, aData);} |
|
92 |
|
93 template<typename T> |
|
94 /** |
|
95 GetFieldBuilder field |
|
96 @param aIndex index of field we are interested in |
|
97 @param aDataBuilder data builder field we are interested in |
|
98 */ |
|
99 inline void RDataBuilderArray<T>::GetFieldBuilder(const TInt& aIndex, RDataBuilder<T, RDataBuilderBase>& aDataBuilder) |
|
100 {DataBuilderFuncs::GetFieldBuilder(*this, aIndex, aDataBuilder);} |
|
101 |
|
102 template<typename T, typename BuilderBase> |
|
103 template<typename S> |
|
104 /** |
|
105 Sets field in DataBuilder |
|
106 @param aFieldId index of field we are interested in |
|
107 @param aData data to set in field we are interested in |
|
108 */ |
|
109 inline void RDataBuilder<T, BuilderBase>::SetField(const typename T::TFieldId& aFieldId, const S& aData) |
|
110 {DataBuilderFuncs::SetField(*this, aFieldId, aData);} |
|
111 |
|
112 /** |
|
113 Returns maximum entries |
|
114 @return Count within array |
|
115 */ |
|
116 inline TInt RDataBuilderArrayBase::MaxCount() const |
|
117 {return DataBuilderFuncs::MaxCount(*this);} |
|
118 |
|
119 ///////////////////////////////// |
|
120 |
|
121 template<typename T, typename Base> |
|
122 |
|
123 /** |
|
124 Returns true if Data Builder Field Exists |
|
125 @param aFieldId id of field we are interested in |
|
126 @return ETrue if field exists, EFalse otherwise |
|
127 */ |
|
128 inline TBool RDataReader<T, Base>::FieldExists(const typename T::TFieldId& aFieldId) const |
|
129 {return DataReaderFuncs::FieldExists(*this, static_cast<TInt>(aFieldId));} |
|
130 |
|
131 |
|
132 template<typename T, typename Base> |
|
133 /** |
|
134 Returns true if any field exists in the Reader |
|
135 @param aFieldId id of field we are interested in |
|
136 @return TBool if exists |
|
137 */ |
|
138 inline TBool RDataReader<T, Base>::IsDataAvailable() const |
|
139 {return DataReaderFuncs::AnyFieldExists(*this);} |
|
140 |
|
141 |
|
142 template<typename T> |
|
143 /** |
|
144 Get array element |
|
145 @param aIndex index of element we are interested in |
|
146 @param aData data to read in field we are interested in |
|
147 @return Standard Symbian Error code |
|
148 */ |
|
149 inline TInt RDataReaderArray<T>::GetElement(const TInt& aIndex, T& aData) const |
|
150 {return DataReaderFuncs::GetField(*this, aIndex, aData);} |
|
151 |
|
152 template<typename T> |
|
153 /** |
|
154 GetFieldReader field exists implementation |
|
155 @param aIndexid index of field we are interested in |
|
156 @param aDataReader data reader we are interested in |
|
157 @return Standard Symbian Error code |
|
158 */ |
|
159 inline TInt RDataReaderArray<T>::GetFieldReader(const TInt& aIndex, RDataReader<T, RDataReaderBase>& aDataReader) const |
|
160 {return DataReaderFuncs::GetFieldReader(*this, aIndex, aDataReader);} |
|
161 |
|
162 template<typename T, typename BuilderBase> |
|
163 template<typename S> |
|
164 /** |
|
165 GetField field exists implementation |
|
166 @param aFieldId index of field we are interested in |
|
167 @param aData data from reader we are interested in |
|
168 @return field Id |
|
169 */ |
|
170 inline TInt RDataReader<T, BuilderBase>::GetField(const typename T::TFieldId& aFieldId, S& aData) const |
|
171 {return DataReaderFuncs::GetField(*this, aFieldId, aData);} |
|
172 |
|
173 /** |
|
174 Returns if element exists |
|
175 @param aIndex index of exists we are interested in |
|
176 @return ETrue if element exists, EFalse otherwise |
|
177 */ |
|
178 inline TBool RDataReaderArrayBase::ElementExists(const TInt& aIndex) const |
|
179 {return DataReaderFuncs::FieldExists(*this, aIndex);} |
|
180 |
|
181 template<typename T, typename ReaderBase> |
|
182 |
|
183 /** |
|
184 ArrayReader array reader implementation |
|
185 @param aFieldId id of field we are interested in |
|
186 @param aArrayBuilder array we are interested in |
|
187 @return returns id |
|
188 */ |
|
189 inline TInt RDataReader<T, ReaderBase>::GetArrayReader(const typename T::TFieldId& aFieldId, RDataReaderArrayBase& aArrayReader) const |
|
190 {return DataReaderFuncs::GetFieldReader(*this, static_cast<TInt>(aFieldId), static_cast<RDataReaderBase&>(aArrayReader));} |
|
191 |
|
192 template<typename T, typename ReaderBase> |
|
193 template<typename S> |
|
194 /** |
|
195 FieldReader implementation |
|
196 @param aFieldId id of field we are interested in |
|
197 @param aDataReader we are interested in |
|
198 @return returns id |
|
199 */ |
|
200 inline TInt RDataReader<T, ReaderBase>::GetFieldReader(const typename T::TFieldId& aFieldId, RDataReader<S, RDataReaderBase>& aDataReader) const |
|
201 {return DataReaderFuncs::GetFieldReader(*this, static_cast<TInt>(aFieldId), static_cast<RDataReaderBase&>(aDataReader));} |
|
202 |
|
203 /** |
|
204 Returns maximum entries |
|
205 @return Count within reader array |
|
206 */ |
|
207 inline TInt RDataReaderArrayBase::MaxCount() const |
|
208 {return DataReaderFuncs::MaxCount(*this);} |
|
209 |