Removal of unnecessary use of std::set, part I
[platform/core/uifw/dali-core.git] / dali / internal / event / animation / animation-playlist.h
index 569bcb0..504bc5f 100644 (file)
@@ -1,29 +1,28 @@
 #ifndef __DALI_INTERNAL_ANIMATION_PLAYLIST_H__
 #define __DALI_INTERNAL_ANIMATION_PLAYLIST_H__
 
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-// EXTERNAL INCLUDES
-#include <set>
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 
 // INTERNAL INCLUDES
-#include <dali/internal/common/message.h>
-#include <dali/internal/event/animation/animation-finished-notifier.h>
 #include <dali/public-api/animation/animation.h>
+#include <dali/public-api/common/dali-vector.h>
+#include <dali/public-api/common/vector-wrapper.h>
+#include <dali/internal/event/common/complete-notification-interface.h>
 
 namespace Dali
 {
@@ -37,7 +36,7 @@ class Animation;
  * AnimationPlaylist provides notifications to applications when animations are finished.
  * It reference-counts playing animations, to allow "fire and forget" behaviour.
  */
-class AnimationPlaylist : public AnimationFinishedNotifier
+class AnimationPlaylist : public CompleteNotificationInterface
 {
 public:
 
@@ -74,13 +73,6 @@ public:
    */
   void OnClear( Animation& animation );
 
-  /**
-   * From AnimationFinishedNotifier; emit "Finished" signal on any animations that have finished.
-   * This method should be called in the event-thread; the update-thread must use AnimationFinishedMessage.
-   * @post The "Finished" animations will no longer be referenced by AnimationPlaylist.
-   */
-  void NotifyFinishedAnimations();
-
 private:
 
   /**
@@ -94,11 +86,18 @@ private:
   // Undefined
   AnimationPlaylist& operator=(const AnimationPlaylist& rhs);
 
+private: // from CompleteNotificationInterface
+
+  /**
+   * @copydoc CompleteNotificationInterface::NotifyCompleted()
+   */
+  virtual void NotifyCompleted();
+
 private:
 
-  std::set< Animation* > mAnimations; ///< All existing animations (not referenced)
+  Dali::Vector< Animation* > mAnimations; ///< All existing animations (not owned)
+  std::vector< Dali::Animation > mPlaylist; ///< The currently playing animations (owned through handle)
 
-  std::set< Dali::Animation > mPlaylist; ///< The currently playing animations (reference counted)
 };
 
 } // namespace Internal