Merge "[2.2] Expand the destCapacity due to U_BUFFER_OVERFLOW_ERROR" into tizen_2.2
[platform/framework/native/appfw.git] / inc / FIoDataSet.h
1 //\r
2 // Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
3 //\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
7 //\r
8 //     http://www.apache.org/licenses/LICENSE-2.0\r
9 //\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
15 //\r
16 \r
17 /**\r
18 * @file            FIoDataSet.h\r
19 * @brief          This is the header file for the %DataSet class.\r
20 *\r
21 * This header file contains the declarations of the %DataSet class.\r
22 */\r
23 \r
24 #ifndef _FIO_DATA_SET_H_\r
25 #define _FIO_DATA_SET_H_\r
26 \r
27 #include <FBaseObject.h>\r
28 #include <FBaseColIList.h>\r
29 #include <FIoDataRow.h>\r
30 #include <FIoDataSetEnumerator.h>\r
31 \r
32 namespace Tizen { namespace Io\r
33 {\r
34 \r
35 /**\r
36 * @class                DataSet\r
37 * @brief                This class provides methods to manipulate in-memory table.\r
38 *\r
39 * @since                2.1\r
40 *\r
41 * @final                This class is not intended for extension.\r
42 *\r
43 * The %DataSet class provides methods to manipulate in-memory table.\r
44 */\r
45 class _OSP_EXPORT_ DataSet\r
46            : public Tizen::Base::Object\r
47 {\r
48 \r
49 public:\r
50         /**\r
51         * The object is not fully constructed after this constructor is called. For full construction,\r
52         * the Construct() method must be called right after calling this constructor.\r
53         *\r
54         * @since                2.1\r
55         */\r
56         DataSet(void);\r
57 \r
58         /**\r
59         * This destructor overrides Tizen::Base::Object::~Object().\r
60         *\r
61         * @since                2.1\r
62         */\r
63         virtual ~DataSet(void);\r
64 \r
65         /**\r
66         * Creates in-memory table.\r
67         *\r
68         * @since                2.1\r
69         *\r
70         * @return               An error code\r
71         * @param[in]            columnNames             The list of column names to create @n\r
72         *                                                               The object type in the specified list should be String.\r
73         * @exception            E_SUCCESS               The method is successful.\r
74         * @exception            E_INVALID_ARG   The specified @c columnNames has no element.\r
75         */\r
76         result Construct(const Tizen::Base::Collection::IList& columnNames);\r
77 \r
78         /**\r
79         * Creates a row in the table.\r
80         *\r
81         * @since                2.1\r
82         *\r
83         * @return       A pointer to the DataRow instance, @n\r
84         *                       else @c null if the memory is insufficient\r
85         * @remarks      The column type is decided by the type of each element inserted in first row.\r
86         *                       If a specific column element on the first row is not inserted, then the column's type is @c DB_COLUMNTYPE_NULL\r
87         *                               In that case, when a new column element is added later,\r
88         *                               then the column's type will be changed according to the new element.\r
89         */\r
90         DataRow* CreateDataRowN(void);\r
91 \r
92         /**\r
93         * Gets a table enumerator.\r
94         *\r
95         * @since                2.1\r
96         *\r
97         * @return       A pointer to the DataSetEnumerator instance, @n\r
98         *                       else @c null if the memory is insufficient\r
99         */\r
100         DataSetEnumerator* GetDataSetEnumeratorN(void);\r
101 \r
102 \r
103         /**\r
104         * Gets a copy of this instance.\r
105         *\r
106         * @since                2.1\r
107         *\r
108         * @return       A pointer to the copy of the %DataSet instance, @n\r
109         *                       else @c null if the memory is insufficient\r
110         */\r
111         DataSet* CloneN(void) const;\r
112 \r
113         /**\r
114         * Checks whether the value of a specified instance of Tizen::Base::Object is equal to the value of a current instance of\r
115         * %DataSet.\r
116         *\r
117         * @since                2.1\r
118         *\r
119         * @return       @c true if the value of the specified instance of Tizen::Base::Object is equal to the value of the current\r
120         *                       instance of %DataSet, @n\r
121         *                       else @c false\r
122         * @param[in]    obj             An instance of Tizen::Base::Object to compare\r
123         * @remarks      This method returns @c false if the specified @c obj is not a %DataSet instance.\r
124         */\r
125         virtual bool Equals(const Tizen::Base::Object& obj) const;\r
126 \r
127         /**\r
128         * Gets the hash value of a current instance.\r
129         *\r
130         * @since                2.1\r
131         *\r
132         * @return       The hash value of the current instance\r
133         */\r
134         virtual int GetHashCode(void) const;\r
135 \r
136 private:\r
137         //\r
138         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.\r
139         //\r
140         // @since       2.1\r
141         //\r
142 \r
143         DataSet(const DataSet& value);\r
144 \r
145         //\r
146         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.\r
147         //\r
148         // @since       2.1\r
149         //\r
150         DataSet& operator =(const DataSet& rhs);\r
151 \r
152         class _DataSetImpl* __pDataSetImpl;\r
153         friend class _DataSetImpl;\r
154 \r
155 }; // DataSet\r
156 \r
157 }} // Tizen::Io\r
158 \r
159 #endif // _FIO_DATA_SET_H_\r