Fix the logic for getting DeviceUniqueKey
[platform/framework/native/appfw.git] / inc / FBaseColICollectionT.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file                FBaseColICollectionT.h
20  * @brief               This is the header file for the %ICollectionT interface.
21  *
22  * This header file contains the declarations of the %ICollectionT interface.
23  *
24  */
25 #ifndef _FBASE_COL_BASE_ICOLLECTION_T_H_
26 #define _FBASE_COL_BASE_ICOLLECTION_T_H_
27
28 #include <FBaseTypes.h>
29 #include <FBaseColIEnumeratorT.h>
30 #include <FBaseRtMutex.h>
31
32
33 namespace Tizen { namespace Base { namespace Collection
34 {
35
36 /**
37  * @interface ICollectionT
38  * @brief       This interface represents a template-based collection of objects.
39  *                      It defines the size, and enumerators.
40  *
41  * @since 2.0
42  *
43  * The %ICollectionT interface represents a template-based collection of objects.
44  *                      It defines the size, and enumerators.
45  */
46 template< class Type >
47 class ICollectionT
48 {
49 public:
50         /**
51          * This polymorphic destructor should be overridden if required. @n
52          * This way, the destructors of the derived classes are called when the destructor of this interface is called.
53          *
54          * @since 2.0
55          */
56         virtual ~ICollectionT(void) {}
57
58         /**
59          * Gets the number of objects currently stored in the collection.
60          *
61          * @since 2.0
62          *
63          * @return              The number of objects currently stored in the collection
64          */
65         virtual int GetCount(void) const = 0;
66
67         /**
68          * Gets the enumerator of the %ICollectionT derived class,
69          * or returns @c null if an exception occurs.
70          *
71          * @since 2.0
72          *
73          * @return              A pointer to an enumerator interface of the %ICollectionT derived class, @n
74          *                              else @c null if an exception occurs
75          * @exception   E_SUCCESS                       The method is successful.
76          * @exception   E_OUT_OF_MEMORY   The memory is insufficient.
77          * @remarks             Use this method to obtain an enumerator (an instance of the IEnumeratorT derived class)
78          *                              to iterate over a collection (an instance of the %ICollectionT derived class).
79          * @remarks             The specific error code can be accessed using the GetLastResult() method.
80          * @see                 Tizen::Base::Collection::IEnumerator
81          */
82         virtual IEnumeratorT< Type >* GetEnumeratorN(void) const = 0;
83
84 }; // ICollectionT
85
86 }}} // Tizen::Base::Collection
87
88 #endif // _FBASE_COL_ICOLLECTION_T_H_