Merge "Unchecked GetCharacter func when index is over string length" into tizen_2.2
[platform/framework/native/uifw.git] / inc / FUiAnimParallelAnimationGroup.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 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        FUiAnimParallelAnimationGroup.h
20  * @brief       This is the header file for the %ParallelAnimationGroup class.
21  *
22  * This header file contains the declarations of the %ParallelAnimationGroup class.
23  */
24
25 #ifndef _FUI_ANIM_PARALLEL_ANIMATION_GROUP_H_
26 #define _FUI_ANIM_PARALLEL_ANIMATION_GROUP_H_
27
28 #include <FBaseTypes.h>
29 #include <FBaseObject.h>
30
31 #include <FUiAnimAnimationBase.h>
32 #include <FUiAnimAnimationGroup.h>
33
34
35 namespace Tizen { namespace Ui { namespace Animations
36 {
37
38
39 /**
40  * @class       ParallelAnimationGroup
41  * @brief       This class is used to group a set of animations together.
42  *
43  * @since       2.0
44  *
45  * @final   This class is not intended for extension.
46  *
47  * The %ParallelAnimationGroup class is used to group a set of animations together in parallel.
48  */
49 class _OSP_EXPORT_ ParallelAnimationGroup
50         : public AnimationGroup
51 {
52 public:
53
54         /**
55          * This is the default constructor for this class.
56          *
57          * @since       2.0
58          * @exception   E_SUCCESS               The method is successful.
59          * @exception   E_OUT_OF_MEMORY The memory is insufficient.
60          * @remarks             The specific error code can be accessed using the GetLastResult() method.
61          */
62         ParallelAnimationGroup(void);
63
64
65         /**
66          * This is the destructor for this class.
67          *
68          * @since       2.0
69          */
70         virtual ~ParallelAnimationGroup(void);
71
72
73         /**
74          * This is the copy constructor for the %ParallelAnimationGroup class.
75          *
76          * @since       2.0
77          *
78          * @param[in]   animationGroup  An instance of %ParallelAnimationGroup
79          * @exception   E_SUCCESS               The method is successful.
80          * @exception   E_OUT_OF_MEMORY The memory is insufficient.
81          * @remarks             The specific error code can be accessed using the GetLastResult() method.
82          */
83         ParallelAnimationGroup(const ParallelAnimationGroup& animationGroup);
84
85
86         /**
87          * Assigns the value of the specified instance to the current instance of %ParallelAnimationGroup.
88          *
89          * @since       2.0
90          *
91          * @param[in]   rhs             An instance of %ParallelAnimationGroup
92          * @exception   E_SUCCESS               The method is successful.
93          * @exception   E_OUT_OF_MEMORY The memory is insufficient.
94          * @remarks             The specific error code can be accessed using the GetLastResult() method.
95          */
96         ParallelAnimationGroup& operator =(const ParallelAnimationGroup& rhs);
97
98
99         /**
100          * Checks whether the specified instance and the current instance of %ParallelAnimationGroup have equal animation values.
101          *
102          * @since       2.0
103          *
104          * @return              @c true if the animation of the two instances of %ParallelAnimationGroup have equal values, @n
105          *                              else @c false
106          * @param[in]   rhs             An instance of %ParallelAnimationGroup
107          */
108         bool operator ==(const ParallelAnimationGroup& rhs) const;
109
110
111         /**
112          * Checks whether the specified instance and the current instance of %ParallelAnimationGroup have different animation values.
113          *
114          * @since       2.0
115          *
116          * @return              @c true if the values of the animations of the two instances of %ParallelAnimationGroup are not equal, @n
117          *                              else @c false
118          * @param[in]   rhs             An instance of %ParallelAnimationGroup
119          */
120         bool operator !=(const ParallelAnimationGroup& rhs) const;
121
122
123         /**
124          * Checks whether the value of the current instance of %ParallelAnimationGroup equals the value of the specified instance.
125          *
126          * @since       2.0
127          *
128          * @return              @c true if the value of the current instance is equal to the value of the specified instance, @n
129          *                              else @c false
130          * @param[in]   obj             An instance of %ParallelAnimationGroup
131          * @remarks     The %ParallelAnimationGroup class has a semantic value. @n
132          *                              This means that this method checks whether the two instances have the same animation.
133          */
134         virtual bool Equals(const Tizen::Base::Object& obj) const;
135
136
137         /**
138          * Gets the hash value of the current instance.
139          *
140          * @since       2.0
141          *
142          * @return              The hash value of the current instance
143          * @remarks     The two equal instances must return the same hash value. For better performance, the used hash function must generate a random
144          *                              distribution for all inputs.
145          */
146         virtual int GetHashCode(void) const;
147
148
149         /**
150          * Removes all the animations from the animation group.
151          *
152          * @since       2.0
153          */
154         virtual void RemoveAllAnimations(void);
155
156
157         /**
158          * Gets the total number of animations currently stored in a group.
159          *
160          * @since       2.0
161          *
162          * @return      The total number of animations stored in a group
163          */
164         virtual int GetAnimationCount(void) const;
165
166
167         /**
168          * Adds an animation to the animation group. @n
169          * Each animation target can have only one animation.
170          *
171          * @since       2.0
172          *
173          * @return              An error code
174          * @param[in]   animTarget                      The animation target type @n
175          *                                  The animation is applied to the specified animation target type.
176          * @param[in]   animation                       An object of type AnimationBase
177          * @exception   E_SUCCESS                       The method is successful.
178          * @exception   E_INVALID_ARG       A specified input parameter is invalid.
179          * @exception   E_SYSTEM                        A system error has occurred.
180          * @remarks If an animation is added to a target type that already has an animation associated with it, the old animation is overwritten with the new animation.
181          */
182         result AddAnimation(AnimationTargetType animTarget, const AnimationBase& animation);
183
184
185         /**
186          * Removes an animation from the animation group with the specified animation target.
187          *
188          * @since       2.0
189          *
190          * @return              An error code
191          * @param[in]   animTarget              The animation target
192          * @exception   E_SUCCESS               The method is successful.
193          * @exception   E_INVALID_ARG   The specified input parameter is invalid.
194          * @exception   E_OBJ_NOT_FOUND The animation with the specified animation target does not exist in the animation group.
195          * @exception   E_SYSTEM                A system error has occurred.
196          */
197         result RemoveAnimation(AnimationTargetType animTarget);
198
199
200         /**
201          * Gets the animation object for the specified animation target.
202          *
203          * @since               2.0
204          *
205          * @return      An animation for the specified animation target in the animation group, @n
206          *                              else @c null if the animation target is empty
207          * @param[in]   animTarget              The animation target type to get an animation object
208          */
209         AnimationBase* GetAnimationN(AnimationTargetType animTarget) const;
210
211
212         /**
213          * Checks whether an animation is added for the specified target type.
214          *
215          * @since       2.0
216          *
217          * @return      @c true if an animation is associated with the specified target type, @n
218          *              else @c false
219          * @param[in]   animTarget              The animation target type
220          */
221         bool IsAnimationAdded(AnimationTargetType animTarget);
222
223
224         /**
225          * Gets the type information of this instance.
226          *
227          * @since      2.0
228          *
229          * @return     The type information of this instance
230          */
231         virtual AnimationGroupType GetType(void) const;
232
233
234 protected:
235
236         friend class _ParallelAnimationGroupImpl;
237
238
239         //
240         // This variable is for internal use only. Using this variable can cause behavioral, security-related,
241         // and consistency-related issues in the application.
242         //
243         // This variable is for internal usage.
244         //
245         // @since       2.0
246         //
247         class _ParallelAnimationGroupImpl* _pParallelAnimationGroupImpl;
248 };              // ParallelAnimationGroup
249
250
251 }}}             // Tizen::Ui::Animations
252
253 #endif  // _FUI_ANIM_PARALLEL_ANIMATION_GROUP_H_