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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
17 inline void RDataBuilderBase::ClearAllFields()
18 {DataBuilderFuncs::ClearAllFields(*this);}
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
25 inline TBool RDataBuilderArrayBase::ElementExists(const TInt& aIndex) const
26 {return DataBuilderFuncs::FieldExists(*this, aIndex);}
29 Clears builder array element
30 @param aIndex id of element we wish to clear
32 inline void RDataBuilderArrayBase::ClearElement(const TInt& aIndex)
33 {DataBuilderFuncs::ClearField(*this, aIndex);}
36 template<typename T, typename Base>
38 RDataBuilder field exists implementation
39 @param aFieldId id of field we are interested in
40 @return TBool if exists
42 inline TBool RDataBuilder<T, Base>::FieldExists(const typename T::TFieldId& aFieldId) const
43 {return DataBuilderFuncs::FieldExists(*this, static_cast<TInt>(aFieldId));}
46 template<typename T, typename Base>
48 RDataBuilder field exists implementation
49 @param aFieldId id of field we are interested in
50 @return TBool if exists
52 inline TBool RDataBuilder<T, Base>::IsDataAvailable() const
53 {return DataBuilderFuncs::AnyFieldExists(*this);}
57 template<typename T, typename Base>
59 RDataBuilder clear field exists
60 @param aFieldId id of field we are interested in
62 inline void RDataBuilder<T, Base>::ClearField(const typename T::TFieldId& aFieldId)
63 {DataBuilderFuncs::ClearField(*this, static_cast<TInt>(aFieldId));}
65 template<typename T, typename Base>
67 RDataBuilder array builder implementation
68 @param aFieldId id of field we are interested in
69 @param aArrayBuilder array we are interested in
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));}
74 template<typename T, typename BuilderBase>
77 RDataBuilder field exists implementation
78 @param aFieldId id of field we are interested in
79 @param aDataBuilder field we are interested in
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));}
87 @param aIndex id of element we are interested in
88 @param aData data to set in field we are interested in
90 inline void RDataBuilderArray<T>::SetElement(const TInt& aIndex, const T& aData)
91 {DataBuilderFuncs::SetField(*this, aIndex, aData);}
96 @param aIndex index of field we are interested in
97 @param aDataBuilder data builder field we are interested in
99 inline void RDataBuilderArray<T>::GetFieldBuilder(const TInt& aIndex, RDataBuilder<T, RDataBuilderBase>& aDataBuilder)
100 {DataBuilderFuncs::GetFieldBuilder(*this, aIndex, aDataBuilder);}
102 template<typename T, typename BuilderBase>
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
109 inline void RDataBuilder<T, BuilderBase>::SetField(const typename T::TFieldId& aFieldId, const S& aData)
110 {DataBuilderFuncs::SetField(*this, aFieldId, aData);}
113 Returns maximum entries
114 @return Count within array
116 inline TInt RDataBuilderArrayBase::MaxCount() const
117 {return DataBuilderFuncs::MaxCount(*this);}
119 /////////////////////////////////
121 template<typename T, typename Base>
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
128 inline TBool RDataReader<T, Base>::FieldExists(const typename T::TFieldId& aFieldId) const
129 {return DataReaderFuncs::FieldExists(*this, static_cast<TInt>(aFieldId));}
132 template<typename T, typename Base>
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
138 inline TBool RDataReader<T, Base>::IsDataAvailable() const
139 {return DataReaderFuncs::AnyFieldExists(*this);}
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
149 inline TInt RDataReaderArray<T>::GetElement(const TInt& aIndex, T& aData) const
150 {return DataReaderFuncs::GetField(*this, aIndex, aData);}
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
159 inline TInt RDataReaderArray<T>::GetFieldReader(const TInt& aIndex, RDataReader<T, RDataReaderBase>& aDataReader) const
160 {return DataReaderFuncs::GetFieldReader(*this, aIndex, aDataReader);}
162 template<typename T, typename BuilderBase>
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
170 inline TInt RDataReader<T, BuilderBase>::GetField(const typename T::TFieldId& aFieldId, S& aData) const
171 {return DataReaderFuncs::GetField(*this, aFieldId, aData);}
174 Returns if element exists
175 @param aIndex index of exists we are interested in
176 @return ETrue if element exists, EFalse otherwise
178 inline TBool RDataReaderArrayBase::ElementExists(const TInt& aIndex) const
179 {return DataReaderFuncs::FieldExists(*this, aIndex);}
181 template<typename T, typename ReaderBase>
184 ArrayReader array reader implementation
185 @param aFieldId id of field we are interested in
186 @param aArrayBuilder array we are interested in
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));}
192 template<typename T, typename ReaderBase>
195 FieldReader implementation
196 @param aFieldId id of field we are interested in
197 @param aDataReader we are interested in
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));}
204 Returns maximum entries
205 @return Count within reader array
207 inline TInt RDataReaderArrayBase::MaxCount() const
208 {return DataReaderFuncs::MaxCount(*this);}