Add IPC sync result for SerialPort::Write()
[platform/framework/native/appfw.git] / inc / FBaseColIBidirectionalEnumeratorT.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file                FBaseColIBidirectionalEnumeratorT.h
19  * @brief               This is the header file for the %IBidirectionalEnumeratorT interface.
20  *
21  * This header file contains the declarations of the %IBidirectionalEnumeratorT interface.
22  *
23  */
24 #ifndef _FBASE_COL_IBIDIRECTIONAL_ENUMERATOR_T_H_
25 #define _FBASE_COL_IBIDIRECTIONAL_ENUMERATOR_T_H_
26
27 #include <FBaseColIEnumeratorT.h>
28
29
30 namespace Tizen { namespace Base { namespace Collection
31 {
32
33 /**
34  * @interface   IBidirectionalEnumeratorT
35  * @brief               This interface supports a bidirectional iteration over a collection.
36  *
37  * @since 2.0
38  *
39  * @remarks     An enumerator remains valid as long as the collection remains unchanged.@n
40  *                              If changes are made to the collection, such as adding, modifying, or
41  *                              deleting elements, the enumerator is irrecoverably invalidated. @n
42  *                              The next call to GetCurrent(), MoveNext(), MovePrevious(), Reset(), or ResetLast() fails (@c E_INVALID_OPERATION).
43  *
44  * The %IBidirectionalEnumeratorT interface supports a bidirectional iteration over a collection.
45  * One can only access the elements in a collection through %IBidirectionalEnumeratorT. The elements cannot be modified through this interface.
46  *
47  */
48 template< class Type >
49 class IBidirectionalEnumeratorT
50         : public virtual IEnumeratorT< Type >
51 {
52 public:
53         /**
54          * This polymorphic destructor should be overridden if required. @n
55          * This way, the destructors of the derived classes are called when the destructor of this interface is called.
56          *
57          * @since 2.0
58          */
59         virtual ~IBidirectionalEnumeratorT(void) {}
60
61         /**
62          * Moves %IBidirectionalEnumeratorT to the previous element of the collection. @n
63          * A call to the %MovePrevious() method after the ResetLast() method positions the enumerator to the last element in the collection.
64          *
65          * @since 2.0
66          *
67          * @return              An error code
68          * @exception   E_SUCCESS                       The method is successful.
69          * @exception   E_OUT_OF_RANGE          The enumerator has passed the front of the collection.
70          * @exception   E_INVALID_OPERATION     Either of the following conditions has occurred:
71          *                                                                      - The current state of the instance prohibits the execution of the specified operation, or
72          *                                                                      - The collection is modified after the enumerator is created.
73          * @see                 Tizen::Base::Collection::IEnumeratorT< Type >::MoveNext()
74          */
75         virtual result MovePrevious(void) = 0;
76
77         /**
78          * Positions the enumerator after the last element in the collection.
79          *
80          * @since 2.0
81          *
82          * @return              An error code
83          * @exception   E_SUCCESS                       The method is successful.
84          * @exception   E_INVALID_OPERATION     Either of the following conditions has occurred:
85          *                                                                      - The current state of the instance prohibits the execution of the specified operation.
86          *                                                                      - The collection is modified after the enumerator is created.
87          * @see                 Tizen::Base::Collection::IEnumeratorT< Type >::Reset()
88          * @see                 MovePrevious()
89          */
90         virtual result ResetLast(void) = 0;
91
92 }; // IBidirectionalEnumeratorT
93
94 }}} // Tizen::Base::Collection
95
96 #endif // _FBASE_COL_I_BIDIRECTIONAL_ENUMERATOR_T_H_