Merge "[2.2.1] Modify doxygen example of Encode/DecodeBase64StringN" into tizen_2.2
[platform/framework/native/appfw.git] / src / io / FIo_DataSetEnumeratorImpl.cpp
old mode 100755 (executable)
new mode 100644 (file)
index 40320e5..ff0f4a2
@@ -1,5 +1,4 @@
 //
-// Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Apache License, Version 2.0 (the License);
@@ -52,20 +51,20 @@ namespace Tizen { namespace Io
 {
 
 _DataSetEnumeratorImpl::_DataSetEnumeratorImpl(void)
-       : __pDataSet(null),
-       __pColumnList(null),
-       __pCurrentRow(null),
-       __columnCount(0),
-       __rowCount(0),
-       __currentRowIndex(-1),
-       __dataSetDeleted(0)
+       : __pDataSet(null)
+       , __pColumnList(null)
+       , __pCurrentRow(null)
+       , __columnCount(0)
+       , __rowCount(0)
+       , __currentRowIndex(-1)
+       , __dataSetDeleted(false)
 {
 
 }
 
 _DataSetEnumeratorImpl::~_DataSetEnumeratorImpl(void)
 {
-       if (__dataSetDeleted == 0)
+       if (!__dataSetDeleted)
        {
                __pEnumImplList->Remove(*this);
        }
@@ -76,7 +75,7 @@ _DataSetEnumeratorImpl::MoveNext(void)
 {
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
                                "The Object is not constructed.");
-       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+       SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
                                "The dataset is already been deleted.");
 
        if (__currentRowIndex +1  == __rowCount)
@@ -96,7 +95,7 @@ _DataSetEnumeratorImpl::MovePrevious(void)
 {
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
                                "The Object is not constructed.");
-       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+       SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
                                "The dataset is already been deleted.");
 
        if (__currentRowIndex == 0)
@@ -116,7 +115,7 @@ _DataSetEnumeratorImpl::MoveFirst(void)
 {
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
                                "The Object is not constructed.");
-       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+       SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
                                "The dataset is already been deleted.");
 
        __currentRowIndex = 0;
@@ -133,7 +132,7 @@ _DataSetEnumeratorImpl::MoveLast(void)
 {
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
                                "The Object is not constructed.");
-       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+       SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
                                "The dataset is already been deleted.");
 
        __currentRowIndex = __rowCount -1;
@@ -150,7 +149,7 @@ _DataSetEnumeratorImpl::Reset(void)
 {
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
                                "The Object is not constructed.");
-       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+       SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
                                "The dataset is already been deleted.");
 
        __currentRowIndex = -1;
@@ -166,7 +165,7 @@ _DataSetEnumeratorImpl::GetIntAt(int columnIndex, int& value) const
 
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
                                "The Object is not constructed.");
-       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+       SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
                                "The dataset is already been deleted.");
        SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
                                "Given column index is out of range.");
@@ -198,7 +197,7 @@ _DataSetEnumeratorImpl::GetInt64At(int columnIndex, long long& value) const
 
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
                                "The Object is not constructed.");
-       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+       SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
                                "The dataset is already been deleted.");
        SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
                                "Given column index is out of range.");
@@ -230,7 +229,7 @@ _DataSetEnumeratorImpl::GetDoubleAt(int columnIndex, double& value) const
 
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
                                "The Object is not constructed.");
-       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+       SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
                                "The dataset is already been deleted.");
        SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
                                "Given column index is out of range.");
@@ -262,7 +261,7 @@ _DataSetEnumeratorImpl::GetStringAt(int columnIndex, String& value) const
 
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
                                "The Object is not constructed.");
-       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+       SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
                                "The dataset is already been deleted.");
        SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
                                "Given column index is out of range.");
@@ -294,7 +293,7 @@ _DataSetEnumeratorImpl::GetBlobAt(int columnIndex, ByteBuffer& value) const
 
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
                                "The Object is not constructed.");
-       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+       SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
                                "The dataset is already been deleted.");
        SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
                                "Given column index is out of range.");
@@ -330,7 +329,7 @@ _DataSetEnumeratorImpl::GetBlobAt(int columnIndex, void* buffer, int size) const
 
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
                                "The Object is not constructed.");
-       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+       SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
                                "The dataset is already been deleted.");
        SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
                                "Given column index is out of range.");
@@ -371,7 +370,7 @@ _DataSetEnumeratorImpl::GetDateTimeAt(int columnIndex, DateTime& value) const
 
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
                                "The Object is not constructed.");
-       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+       SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
                                "The dataset is already been deleted.");
        SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
                                "Given column index is out of range.");
@@ -402,7 +401,7 @@ _DataSetEnumeratorImpl::GetColumnCount(void) const
 {
        SysTryReturn(NID_IO, __pDataSet != null, -1, E_INVALID_STATE,
                                "[E_INVALID_STATE] The Object is not constructed.");
-       SysTryReturn(NID_IO, __dataSetDeleted != 1, -1, E_INVALID_STATE,
+       SysTryReturn(NID_IO, __dataSetDeleted != true, -1, E_INVALID_STATE,
                                "[E_INVALID_STATE] The dataset is already been deleted.");
 
        return __columnCount;
@@ -415,7 +414,7 @@ _DataSetEnumeratorImpl::GetColumnType(int columnIndex) const
 
        SysTryReturn(NID_IO, __pDataSet != null, DB_COLUMNTYPE_UNDEFINED, E_INVALID_STATE,
                                "[E_INVALID_STATE] The instance is not constructed.");
-       SysTryReturn(NID_IO, __dataSetDeleted != 1, DB_COLUMNTYPE_UNDEFINED, E_INVALID_STATE,
+       SysTryReturn(NID_IO, __dataSetDeleted != true, DB_COLUMNTYPE_UNDEFINED, E_INVALID_STATE,
                                "[E_INVALID_STATE] The dataset is already been deleted.");
        SysTryReturn(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, DB_COLUMNTYPE_UNDEFINED, E_INVALID_ARG,
                                "[E_INVALID_ARG] Given column index is out of range.");
@@ -454,7 +453,7 @@ _DataSetEnumeratorImpl::GetColumnName(int columnIndex) const
 {
        SysTryReturn(NID_IO, __pDataSet != null, null, E_INVALID_STATE,
                                "[E_INVALID_STATE] The instance is not constructed.");
-       SysTryReturn(NID_IO, __dataSetDeleted != 1, null, E_INVALID_STATE,
+       SysTryReturn(NID_IO, __dataSetDeleted != true, null, E_INVALID_STATE,
                                "[E_INVALID_STATE] The dataset is already been deleted.");
        SysTryReturn(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, null, E_INVALID_ARG,
                                "[E_INVALID_ARG] Given column index is out of range.");
@@ -478,7 +477,7 @@ _DataSetEnumeratorImpl::GetColumnSize(int columnIndex) const
 
        SysTryReturn(NID_IO, __pDataSet != null, -1, E_INVALID_STATE,
                "[E_INVALID_STATE] The instance is not constructed.");
-       SysTryReturn(NID_IO, __dataSetDeleted != 1, -1, E_INVALID_STATE,
+       SysTryReturn(NID_IO, __dataSetDeleted != true, -1, E_INVALID_STATE,
                                "[E_INVALID_STATE] The dataset is already been deleted.");
        SysTryReturn(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, -1, E_INVALID_ARG,
                                "[E_INVALID_ARG] Given column index is out of range.");