use modern construct 'override' in the derive class.
[platform/core/uifw/dali-core.git] / dali / internal / event / animation / animation-impl.h
index c605ec2..a23223e 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_ANIMATION_H__
-#define __DALI_INTERNAL_ANIMATION_H__
+#ifndef DALI_INTERNAL_ANIMATION_H
+#define DALI_INTERNAL_ANIMATION_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -47,11 +47,11 @@ class AnimatorConnectorBase;
 class Object;
 class Path;
 
-typedef IntrusivePtr<Animation> AnimationPtr;
-typedef std::vector<AnimationPtr> AnimationContainer;
+using AnimationPtr       = IntrusivePtr<Animation>;
+using AnimationContainer = std::vector<AnimationPtr>;
 
-typedef AnimationContainer::iterator AnimationIter;
-typedef AnimationContainer::const_iterator AnimationConstIter;
+using AnimationIter      = AnimationContainer::iterator;
+using AnimationConstIter = AnimationContainer::const_iterator;
 
 /**
  * Animation is a proxy for a SceneGraph::Animation object.
@@ -69,8 +69,8 @@ public:
     BETWEEN  ///< Animating BETWEEN key-frames
   };
 
-  typedef Dali::Animation::EndAction EndAction;
-  typedef Dali::Animation::Interpolation Interpolation;
+  using EndAction     = Dali::Animation::EndAction;
+  using Interpolation = Dali::Animation::Interpolation;
 
   /**
    * Create a new Animation object.
@@ -456,7 +456,7 @@ protected:
   /**
    * A reference counted object may only be deleted by calling Unreference()
    */
-  virtual ~Animation();
+  ~Animation() override;
 
 private:
 
@@ -490,6 +490,13 @@ private:
     Animation::Type animatorType;
   };
 
+  enum class Notify
+  {
+    USE_CURRENT_VALUE,   ///< Set the current value for the property
+    USE_TARGET_VALUE,    ///< Set the animator's target value for the property
+    FORCE_CURRENT_VALUE, ///< Set the current value for the property even if the end action is to discard
+  };
+
 private:
 
   /**
@@ -502,8 +509,9 @@ private:
 
   /**
    * Notifies all the objects whose properties are being animated.
+   * @param[in] notifyValueType Whether we should set the current or target value
    */
-  void NotifyObjects();
+  void NotifyObjects( Notify notifyValueType );
 
   /**
    * Sends message to SceneGraph with final progress value
@@ -521,10 +529,10 @@ private:
 
   Dali::Animation::AnimationSignalType mProgressReachedSignal;
 
-  typedef OwnerContainer< AnimatorConnectorBase* > AnimatorConnectorContainer;
+  using AnimatorConnectorContainer = OwnerContainer<AnimatorConnectorBase*>;
   AnimatorConnectorContainer mConnectors; ///< Owned by the Animation
 
-  typedef std::vector< ConnectorTargetValues > ConnectorTargetValuesContainer;
+  using ConnectorTargetValuesContainer = std::vector<ConnectorTargetValues>;
   ConnectorTargetValuesContainer mConnectorTargetValues; //< Used to store animating property target value information
 
   Vector2 mPlayRange;
@@ -567,4 +575,4 @@ inline const Internal::Animation& GetImplementation(const Dali::Animation& anima
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_ANIMATION_H__
+#endif // DALI_INTERNAL_ANIMATION_H