Merge "use modern construct '= default' for special functions." into devel/master
[platform/core/uifw/dali-core.git] / dali / internal / update / manager / transform-manager-property.h
index 800a65a..e2874d3 100644 (file)
@@ -35,14 +35,14 @@ struct TransformManagerPropertyHandler : public AnimatablePropertyBase
    * Constructor
    */
   TransformManagerPropertyHandler()
-  :mTxManager(0),
+  :mTxManager(nullptr),
    mId( INVALID_TRANSFORM_ID )
   {}
 
   /**
    * @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
    */
-  virtual Dali::Property::Type GetType() const = 0;
+  Dali::Property::Type GetType() const override = 0;
 
   /**
    * @copydoc Dali::SceneGraph::AnimatableProperty::Get()
@@ -57,7 +57,7 @@ struct TransformManagerPropertyHandler : public AnimatablePropertyBase
   /**
    * @copydoc Dali::PropertyInput::GetVector3()
    */
-  virtual const Vector3& GetVector3( BufferIndex bufferIndex ) const{ return Vector3::ZERO; }
+  const Vector3& GetVector3( BufferIndex bufferIndex ) const override{ return Vector3::ZERO; }
 
   /**
    * Retrieve a component of property
@@ -120,12 +120,12 @@ struct TransformManagerPropertyHandler : public AnimatablePropertyBase
   /**
    * @copydoc Dali::AnimatableProperty::ResetToBaseValue()
    */
-  virtual void ResetToBaseValue(BufferIndex updateBufferIndex){}
+  void ResetToBaseValue(BufferIndex updateBufferIndex) override{}
 
   /**
    * @copydoc Dali::AnimatableProperty::IsClean()
    */
-  virtual bool IsClean() const{ return false; }
+  bool IsClean() const override{ return false; }
 
   /**
    * Initializes the property
@@ -141,7 +141,7 @@ struct TransformManagerPropertyHandler : public AnimatablePropertyBase
   /**
    * @copydoc Dali::Internal::PropertyInputImpl::IsTransformManagerProperty()
    */
-  virtual bool IsTransformManagerProperty() const
+  bool IsTransformManagerProperty() const override
   {
     return true;
   }
@@ -158,32 +158,32 @@ struct TransformManagerPropertyVector3 : public TransformManagerPropertyHandler<
    mProperty( property )
   {}
 
-  Dali::Property::Type GetType() const
+  Dali::Property::Type GetType() const override
   {
     return Dali::PropertyTypes::Get<Vector3>();
   }
 
-  Vector3& Get( BufferIndex bufferIndex )
+  Vector3& Get( BufferIndex bufferIndex ) override
   {
     return mTxManager->GetVector3PropertyValue( mId, mProperty );
   }
 
-  const Vector3& Get( BufferIndex bufferIndex ) const
+  const Vector3& Get( BufferIndex bufferIndex ) const override
   {
     return mTxManager->GetVector3PropertyValue( mId, mProperty );
   }
 
-  virtual const Vector3& GetVector3( BufferIndex bufferIndex ) const
+  const Vector3& GetVector3( BufferIndex bufferIndex ) const override
   {
     return Get(bufferIndex);
   }
 
-  const float& GetFloatComponent( uint32_t component )
+  const float& GetFloatComponent( uint32_t component ) override
   {
     return mTxManager->GetVector3PropertyComponentValue( mId, mProperty, component );
   }
 
-  void Set(BufferIndex bufferIndex, const Vector3& value)
+  void Set(BufferIndex bufferIndex, const Vector3& value) override
   {
     mTxManager->SetVector3PropertyValue( mId, mProperty, value );
   }
@@ -198,42 +198,42 @@ struct TransformManagerPropertyVector3 : public TransformManagerPropertyHandler<
     mTxManager->BakeVector3PropertyComponentValue( mId, mProperty, value, component);
   }
 
-  void Bake(BufferIndex bufferIndex, const Vector3& value)
+  void Bake(BufferIndex bufferIndex, const Vector3& value) override
   {
     mTxManager->BakeVector3PropertyValue(mId, mProperty, value );
   }
 
-  void BakeX(BufferIndex bufferIndex, float value)
+  void BakeX(BufferIndex bufferIndex, float value) override
   {
     mTxManager->BakeXVector3PropertyValue(mId, mProperty, value );
   }
 
-  void BakeY(BufferIndex bufferIndex, float value)
+  void BakeY(BufferIndex bufferIndex, float value) override
   {
     mTxManager->BakeYVector3PropertyValue(mId, mProperty, value );
   }
 
-  void BakeZ(BufferIndex bufferIndex, float value)
+  void BakeZ(BufferIndex bufferIndex, float value) override
   {
     mTxManager->BakeZVector3PropertyValue(mId, mProperty, value );
   }
 
-  void SetFloatComponent( float value, uint32_t component)
+  void SetFloatComponent( float value, uint32_t component) override
   {
     mTxManager->SetVector3PropertyComponentValue( mId, mProperty, value, component);
   }
 
-  void BakeFloatComponent( float value, uint32_t component )
+  void BakeFloatComponent( float value, uint32_t component ) override
   {
     mTxManager->BakeVector3PropertyComponentValue( mId, mProperty, value, component);
   }
 
-  void BakeRelative(BufferIndex bufferIndex, const Vector3& value)
+  void BakeRelative(BufferIndex bufferIndex, const Vector3& value) override
   {
     mTxManager->BakeRelativeVector3PropertyValue(mId, mProperty, value );
   }
 
-  void BakeRelativeMultiply(BufferIndex bufferIndex, const Vector3& value)
+  void BakeRelativeMultiply(BufferIndex bufferIndex, const Vector3& value) override
   {
     mTxManager->BakeMultiplyVector3PropertyValue(mId, mProperty, value );
   }
@@ -249,42 +249,42 @@ public:
   :TransformManagerPropertyHandler()
   {}
 
-  virtual Dali::Property::Type GetType() const
+  Dali::Property::Type GetType() const override
   {
     return Dali::PropertyTypes::Get<Quaternion>();
   }
 
-  Quaternion& Get( BufferIndex bufferIndex )
+  Quaternion& Get( BufferIndex bufferIndex ) override
   {
     return mTxManager->GetQuaternionPropertyValue( mId );
   }
 
-  const Quaternion& Get( BufferIndex bufferIndex ) const
+  const Quaternion& Get( BufferIndex bufferIndex ) const override
   {
     return mTxManager->GetQuaternionPropertyValue( mId );
   }
 
-  const float& GetFloatComponent( uint32_t component)
+  const float& GetFloatComponent( uint32_t component) override
   {
     return mTxManager->GetQuaternionPropertyValue( mId ).mVector[component];
   }
 
-  void Set(BufferIndex bufferIndex, const Quaternion& value)
+  void Set(BufferIndex bufferIndex, const Quaternion& value) override
   {
     return mTxManager->SetQuaternionPropertyValue( mId, value );
   }
 
-  void Bake(BufferIndex bufferIndex, const Quaternion& value)
+  void Bake(BufferIndex bufferIndex, const Quaternion& value) override
   {
     return mTxManager->BakeQuaternionPropertyValue( mId, value );
   }
 
-  void BakeRelative(BufferIndex bufferIndex, const Quaternion& value)
+  void BakeRelative(BufferIndex bufferIndex, const Quaternion& value) override
   {
     return mTxManager->BakeRelativeQuaternionPropertyValue( mId, value );
   }
 
-  virtual const Quaternion& GetQuaternion( BufferIndex bufferIndex ) const
+  const Quaternion& GetQuaternion( BufferIndex bufferIndex ) const override
   {
     return Get(bufferIndex);
   }
@@ -302,7 +302,7 @@ public:
    * Create an TransformManagerVector3Input
    */
   TransformManagerVector3Input( TransformManagerProperty property, const Vector3& initialValue )
-  :mTxManager(0),
+  :mTxManager(nullptr),
    mId(INVALID_TRANSFORM_ID),
    mProperty(property),
    mValue(initialValue)
@@ -311,14 +311,12 @@ public:
   /**
    * Virtual destructor.
    */
-  virtual ~TransformManagerVector3Input()
-  {
-  }
+  ~TransformManagerVector3Input() override = default;
 
   /**
    * @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
    */
-  virtual Dali::Property::Type GetType() const
+  Dali::Property::Type GetType() const override
   {
     return Dali::PropertyTypes::Get<Vector3>();
   }
@@ -334,7 +332,7 @@ public:
   /**
    * @copydoc Dali::Internal::PropertyInputImpl::InputInitialized()
    */
-  virtual bool InputInitialized() const
+  bool InputInitialized() const override
   {
     return true;
   }
@@ -343,7 +341,7 @@ public:
    * @copydoc Dali::Internal::PropertyInputImpl::InputChanged()
    * @note A constraint can only receive the inherited property from the previous frame.
    */
-  virtual bool InputChanged() const
+  bool InputChanged() const override
   {
     return true;
   }
@@ -374,7 +372,7 @@ public:
   /**
    * @copydoc Dali::PropertyInput::GetVector3()
    */
-  virtual const Vector3& GetVector3( BufferIndex bufferIndex ) const
+  const Vector3& GetVector3( BufferIndex bufferIndex ) const override
   {
     ComputeTransformComponent();
     return mValue;
@@ -383,7 +381,7 @@ public:
   /**
    * @copydoc Dali::PropertyInput::GetConstraintInputVector3()
    */
-  virtual const Vector3& GetConstraintInputVector3( BufferIndex bufferIndex ) const
+  const Vector3& GetConstraintInputVector3( BufferIndex bufferIndex ) const override
   {
     ComputeTransformComponent();
     return mValue;
@@ -432,7 +430,7 @@ public:
   /**
    * @copydoc Dali::Internal::PropertyInputImpl::IsTransformManagerProperty()
    */
-  virtual bool IsTransformManagerProperty() const
+  bool IsTransformManagerProperty() const override
   {
     return true;
   }
@@ -464,7 +462,7 @@ public:
    * Constructor
    */
   TransformManagerQuaternionInput()
-  :mTxManager(0),
+  :mTxManager(nullptr),
    mId(INVALID_TRANSFORM_ID),
    mValue(1.0f,0.0f,0.0f,0.0f)
   {
@@ -473,14 +471,12 @@ public:
   /**
    * Virtual destructor.
    */
-  virtual ~TransformManagerQuaternionInput()
-  {
-  }
+  ~TransformManagerQuaternionInput() override = default;
 
   /**
    * @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
    */
-  virtual Dali::Property::Type GetType() const
+  Dali::Property::Type GetType() const override
   {
     return Dali::PropertyTypes::Get<Quaternion>();
   }
@@ -496,7 +492,7 @@ public:
   /**
    * @copydoc Dali::Internal::PropertyInputImpl::InputInitialized()
    */
-  virtual bool InputInitialized() const
+  bool InputInitialized() const override
   {
     return true;
   }
@@ -505,7 +501,7 @@ public:
    * @copydoc Dali::Internal::PropertyInputImpl::InputChanged()
    * @note A constraint can only receive the inherited property from the previous frame.
    */
-  virtual bool InputChanged() const
+  bool InputChanged() const override
   {
     return true;
   }
@@ -527,7 +523,7 @@ public:
   /**
    * @copydoc Dali::PropertyInput::GetQuaternion()
    */
-  virtual const Quaternion& GetQuaternion( BufferIndex bufferIndex ) const
+  const Quaternion& GetQuaternion( BufferIndex bufferIndex ) const override
   {
     ComputeTransformComponent();
     return mValue;
@@ -536,7 +532,7 @@ public:
   /**
    * @copydoc Dali::PropertyInput::GetConstraintInputQuaternion()
    */
-  virtual const Quaternion& GetConstraintInputQuaternion( BufferIndex bufferIndex ) const
+  const Quaternion& GetConstraintInputQuaternion( BufferIndex bufferIndex ) const override
   {
     ComputeTransformComponent();
     return mValue;
@@ -585,7 +581,7 @@ public:
   /**
    * @copydoc Dali::Internal::PropertyInputImpl::IsTransformManagerProperty()
    */
-  virtual bool IsTransformManagerProperty() const
+  bool IsTransformManagerProperty() const override
   {
     return true;
   }
@@ -616,7 +612,7 @@ public:
    * Constructor
    */
   TransformManagerMatrixInput()
-  :mTxManager(0),
+  :mTxManager(nullptr),
    mId(INVALID_TRANSFORM_ID)
   {
   }
@@ -624,14 +620,12 @@ public:
   /**
    * Virtual destructor.
    */
-  virtual ~TransformManagerMatrixInput()
-  {
-  }
+  ~TransformManagerMatrixInput() override = default;
 
   /**
    * @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
    */
-  virtual Dali::Property::Type GetType() const
+  Dali::Property::Type GetType() const override
   {
     return Dali::PropertyTypes::Get<Matrix>();
   }
@@ -647,7 +641,7 @@ public:
   /**
    * @copydoc Dali::Internal::PropertyInputImpl::InputInitialized()
    */
-  virtual bool InputInitialized() const
+  bool InputInitialized() const override
   {
     return true;
   }
@@ -656,7 +650,7 @@ public:
    * @copydoc Dali::Internal::PropertyInputImpl::InputChanged()
    * @note A constraint can only receive the inherited property from the previous frame.
    */
-  virtual bool InputChanged() const
+  bool InputChanged() const override
   {
     return true;
   }
@@ -664,7 +658,7 @@ public:
   /**
    * @copydoc Dali::PropertyInput::GetMatrix()
    */
-  virtual const Matrix& GetMatrix( BufferIndex bufferIndex ) const
+  const Matrix& GetMatrix( BufferIndex bufferIndex ) const override
   {
     if( mTxManager )
     {
@@ -677,7 +671,7 @@ public:
   /**
    * @copydoc Dali::PropertyInput::GetConstraintInputMatrix()
    */
-  virtual const Matrix& GetConstraintInputMatrix( BufferIndex bufferIndex ) const
+  const Matrix& GetConstraintInputMatrix( BufferIndex bufferIndex ) const override
   {
     if( mTxManager )
     {
@@ -692,7 +686,7 @@ public:
    */
   Matrix& Get( BufferIndex bufferIndex )
   {
-    DALI_ASSERT_ALWAYS( mTxManager != 0 );
+    DALI_ASSERT_ALWAYS( mTxManager != nullptr );
     return mTxManager->GetWorldMatrix(mId);
   }
 
@@ -723,7 +717,7 @@ public:
   /**
    * @copydoc Dali::Internal::PropertyInputImpl::IsTransformManagerProperty()
    */
-  virtual bool IsTransformManagerProperty() const
+  bool IsTransformManagerProperty() const override
   {
     return true;
   }