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