2 // Copyright (c) 2013 Samsung Electronics Co., Ltd.
\r
4 // Licensed under the Apache License, Version 2.0 (the License);
\r
5 // you may not use this file except in compliance with the License.
\r
6 // You may obtain a copy of the License at
\r
8 // http://www.apache.org/licenses/LICENSE-2.0
\r
10 // Unless required by applicable law or agreed to in writing, software
\r
11 // distributed under the License is distributed on an "AS IS" BASIS,
\r
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 // See the License for the specific language governing permissions and
\r
14 // limitations under the License.
\r
18 * @file FIoDataSetEnumerator.cpp
\r
19 * @brief This is the implementation file for DataSetEnumerator class.
\r
24 #include <FBaseInteger.h>
\r
25 #include <FBaseDouble.h>
\r
26 #include <FBaseString.h>
\r
27 #include <FBaseByteBuffer.h>
\r
28 #include <FBaseDateTime.h>
\r
29 #include <FBaseUtilStringUtil.h>
\r
30 #include <FBaseSysLog.h>
\r
31 #include <FIoDataSetEnumerator.h>
\r
33 #include <FBase_NativeError.h>
\r
34 #include <FIo_DataSetEnumeratorImpl.h>
\r
36 using namespace Tizen::Base;
\r
37 using namespace Tizen::Base::Utility;
\r
38 using namespace Tizen::Base::Runtime;
\r
40 namespace Tizen { namespace Io
\r
42 DataSetEnumerator::DataSetEnumerator(void)
\r
43 : __pDataSetEnumeratorImpl(null)
\r
46 __pDataSetEnumeratorImpl = new (std::nothrow)_DataSetEnumeratorImpl;
\r
48 SysTryReturnVoidResult(NID_IO, __pDataSetEnumeratorImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
\r
51 DataSetEnumerator::~DataSetEnumerator(void)
\r
53 delete __pDataSetEnumeratorImpl;
\r
57 DataSetEnumerator::MoveNext(void)
\r
59 return __pDataSetEnumeratorImpl->MoveNext();
\r
63 DataSetEnumerator::MovePrevious(void)
\r
65 return __pDataSetEnumeratorImpl->MovePrevious();
\r
69 DataSetEnumerator::MoveFirst(void)
\r
71 return __pDataSetEnumeratorImpl->MoveFirst();
\r
75 DataSetEnumerator::MoveLast(void)
\r
77 return __pDataSetEnumeratorImpl->MoveLast();
\r
81 DataSetEnumerator::Reset(void)
\r
83 return __pDataSetEnumeratorImpl->Reset();
\r
87 DataSetEnumerator::GetIntAt(int columnIndex, int& value) const
\r
89 return __pDataSetEnumeratorImpl->GetIntAt(columnIndex, value);
\r
93 DataSetEnumerator::GetInt64At(int columnIndex, long long& value) const
\r
95 return __pDataSetEnumeratorImpl->GetInt64At(columnIndex, value);
\r
99 DataSetEnumerator::GetDoubleAt(int columnIndex, double& value) const
\r
101 return __pDataSetEnumeratorImpl->GetDoubleAt(columnIndex, value);
\r
105 DataSetEnumerator::GetStringAt(int columnIndex, String& value) const
\r
107 return __pDataSetEnumeratorImpl->GetStringAt(columnIndex, value);
\r
111 DataSetEnumerator::GetBlobAt(int columnIndex, ByteBuffer& value) const
\r
113 return __pDataSetEnumeratorImpl->GetBlobAt(columnIndex, value);
\r
117 DataSetEnumerator::GetBlobAt(int columnIndex, void* buffer, int size) const
\r
120 SysTryReturnResult(NID_IO, buffer != null, E_INVALID_ARG, "Null pointer was passed.");
\r
121 SysTryReturnResult(NID_IO, size > 0, E_INVALID_ARG, "Invalid size was passed.");
\r
123 return __pDataSetEnumeratorImpl->GetBlobAt(columnIndex, buffer, size);
\r
127 DataSetEnumerator::GetDateTimeAt(int columnIndex, DateTime& value) const
\r
129 return __pDataSetEnumeratorImpl->GetDateTimeAt(columnIndex, value);
\r
133 DataSetEnumerator::GetColumnCount(void) const
\r
135 return __pDataSetEnumeratorImpl->GetColumnCount();
\r
139 DataSetEnumerator::GetColumnType(int columnIndex) const
\r
141 return __pDataSetEnumeratorImpl->GetColumnType(columnIndex);
\r
145 DataSetEnumerator::GetColumnName(int columnIndex) const
\r
147 return __pDataSetEnumeratorImpl->GetColumnName(columnIndex);
\r
151 DataSetEnumerator::GetColumnSize(int columnIndex) const
\r
153 return __pDataSetEnumeratorImpl->GetColumnSize(columnIndex);
\r