use modern construct 'override' in the derive class.
[platform/core/uifw/dali-core.git] / dali / internal / update / animation / scene-graph-constraint-base.h
index c816bcc..622277f 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_SCENE_GRAPH_CONSTRAINT_BASE_H__
-#define __DALI_INTERNAL_SCENE_GRAPH_CONSTRAINT_BASE_H__
+#ifndef DALI_INTERNAL_SCENE_GRAPH_CONSTRAINT_BASE_H
+#define DALI_INTERNAL_SCENE_GRAPH_CONSTRAINT_BASE_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.
@@ -40,9 +40,8 @@ template <> struct ParameterType< Dali::Constraint::RemoveAction >
 
 namespace SceneGraph
 {
-
-typedef Dali::Vector<PropertyOwner*>     PropertyOwnerContainer;
-typedef PropertyOwnerContainer::Iterator PropertyOwnerIter;
+using PropertyOwnerContainer = Dali::Vector<PropertyOwner*>;
+using PropertyOwnerIter      = PropertyOwnerContainer::Iterator;
 
 /**
  * An abstract base class for Constraints.
@@ -70,8 +69,7 @@ public:
   };
 
 public:
-
-  typedef Dali::Constraint::RemoveAction RemoveAction;
+  using RemoveAction = Dali::Constraint::RemoveAction;
 
   /**
    * Constructor
@@ -83,7 +81,7 @@ public:
   /**
    * Virtual destructor.
    */
-  virtual ~ConstraintBase();
+  ~ConstraintBase() override;
 
   /**
    * Property resetter observes the lifecycle of this object
@@ -138,13 +136,13 @@ public:
    * Helper for internal test cases; only available for debug builds.
    * @return The current number of Constraint instances in existence.
    */
-  static unsigned int GetCurrentInstanceCount();
+  static uint32_t GetCurrentInstanceCount();
 
   /**
    * Helper for internal test cases; only available for debug builds.
    * @return The total number of Constraint instances created during the Dali core lifetime.
    */
-  static unsigned int GetTotalInstanceCount();
+  static uint32_t GetTotalInstanceCount();
 
 private:
 
@@ -177,14 +175,14 @@ private:
   /**
    * @copydoc PropertyOwner::Observer::PropertyOwnerConnected()
    */
-  virtual void PropertyOwnerConnected( PropertyOwner& owner )
+  void PropertyOwnerConnected( PropertyOwner& owner ) override
   {
   }
 
   /**
    * @copydoc PropertyOwner::Observer::PropertyOwnerDisconnected()
    */
-  virtual void PropertyOwnerDisconnected( BufferIndex bufferIndex, PropertyOwner& owner )
+  void PropertyOwnerDisconnected( BufferIndex bufferIndex, PropertyOwner& owner ) override
   {
     if ( !mDisconnected )
     {
@@ -201,7 +199,7 @@ private:
   /**
    * @copydoc PropertyOwner::Observer::PropertyOwnerDestroyed()
    */
-  virtual void PropertyOwnerDestroyed( PropertyOwner& owner )
+  void PropertyOwnerDestroyed( PropertyOwner& owner ) override
   {
     if ( !mDisconnected )
     {
@@ -242,8 +240,8 @@ private:
   LifecycleObserver* mLifecycleObserver; ///< Resetter observers this object
 
 #ifdef DEBUG_ENABLED
-  static unsigned int mCurrentInstanceCount;  ///< The current number of Constraint instances in existence.
-  static unsigned int mTotalInstanceCount;    ///< The total number of Constraint instances created during the Dali core lifetime.
+  static uint32_t mCurrentInstanceCount;  ///< The current number of Constraint instances in existence.
+  static uint32_t mTotalInstanceCount;    ///< The total number of Constraint instances created during the Dali core lifetime.
 #endif
 };
 
@@ -251,10 +249,10 @@ private:
 
 inline void  SetRemoveActionMessage( EventThreadServices& eventThreadServices, const ConstraintBase& constraint, Dali::Constraint::RemoveAction removeAction )
 {
-  typedef MessageValue1< ConstraintBase, Dali::Constraint::RemoveAction > LocalType;
+  using LocalType = MessageValue1<ConstraintBase, Dali::Constraint::RemoveAction>;
 
   // Reserve some memory inside the message queue
-  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
+  uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
   new (slot) LocalType( &constraint, &ConstraintBase::SetRemoveAction, removeAction );
@@ -266,4 +264,4 @@ inline void  SetRemoveActionMessage( EventThreadServices& eventThreadServices, c
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_SCENE_GRAPH_CONSTRAINT_BASE_H__
+#endif // DALI_INTERNAL_SCENE_GRAPH_CONSTRAINT_BASE_H