Merge "Clean up the code to build successfully on macOS" into devel/master
[platform/core/uifw/dali-core.git] / dali / internal / event / animation / property-input-indexer.h
index 9c3f5c6..ed1ea0b 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_PROPERTY_INPUT_INDEXER_H__
-#define __DALI_PROPERTY_INPUT_INDEXER_H__
+#ifndef DALI_PROPERTY_INPUT_INDEXER_H
+#define DALI_PROPERTY_INPUT_INDEXER_H
 
 /*
- * Copyright (c) 2014 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.
@@ -19,7 +19,6 @@
  */
 
 // INTERNAL INCLUDES
-#include <dali/public-api/object/property-types.h>
 #include <dali/internal/event/common/property-input-impl.h>
 
 namespace Dali
@@ -49,9 +48,37 @@ public:
   }
 
   /**
+   * Copy constructor
+   */
+  PropertyInputIndexer( const PropertyInputIndexer& other )
+  : mBufferIndex( other.mBufferIndex ),
+    mInput( other.mInput )
+  {
+  }
+
+  /**
+   * Assignment operator
+   */
+  PropertyInputIndexer& operator=( const PropertyInputIndexer& other )
+  {
+    if( this != &other )
+    {
+      mBufferIndex = other.mBufferIndex;
+      mInput = other.mInput;
+    }
+
+    return *this;
+  }
+
+  /**
+   * Virtual Destructor
+   */
+  ~PropertyInputIndexer() override = default;
+
+  /**
    * @copydoc Dali::Internal::PropertyInput::GetType()
    */
-  virtual Property::Type GetType() const
+  Property::Type GetType() const override
   {
     return mInput->GetType();
   }
@@ -59,15 +86,23 @@ public:
   /**
    * @copydoc Dali::Internal::PropertyInput::GetBoolean()
    */
-  virtual const bool& GetBoolean() const
+  const bool& GetBoolean() const override
   {
     return mInput->GetConstraintInputBoolean( mBufferIndex );
   }
 
   /**
+   * @copydoc Dali::Internal::PropertyInput::GetInteger()
+   */
+  const int& GetInteger() const override
+  {
+    return mInput->GetConstraintInputInteger( mBufferIndex );
+  }
+
+  /**
    * @copydoc Dali::Internal::PropertyInput::GetFloat()
    */
-  virtual const float& GetFloat() const
+  const float& GetFloat() const override
   {
     return mInput->GetConstraintInputFloat( mBufferIndex );
   }
@@ -75,7 +110,7 @@ public:
   /**
    * @copydoc Dali::Internal::PropertyInput::GetVector2()
    */
-  virtual const Vector2& GetVector2() const
+  const Vector2& GetVector2() const override
   {
     return mInput->GetConstraintInputVector2( mBufferIndex );
   }
@@ -83,7 +118,7 @@ public:
   /**
    * @copydoc Dali::Internal::PropertyInput::GetVector3()
    */
-  virtual const Vector3& GetVector3() const
+  const Vector3& GetVector3() const override
   {
     return mInput->GetConstraintInputVector3( mBufferIndex );
   }
@@ -91,7 +126,7 @@ public:
   /**
    * @copydoc Dali::Internal::PropertyInput::GetVector4()
    */
-  virtual const Vector4& GetVector4() const
+  const Vector4& GetVector4() const override
   {
     return mInput->GetConstraintInputVector4( mBufferIndex );
   }
@@ -99,7 +134,7 @@ public:
   /**
    * @copydoc Dali::Internal::PropertyInput::GetMatrix3()
    */
-  virtual const Matrix3& GetMatrix3() const
+  const Matrix3& GetMatrix3() const override
   {
     return mInput->GetConstraintInputMatrix3( mBufferIndex );
   }
@@ -107,7 +142,7 @@ public:
   /**
    * @copydoc Dali::Internal::PropertyInput::GetMatrix()
    */
-  virtual const Matrix& GetMatrix() const
+  const Matrix& GetMatrix() const override
   {
     return mInput->GetConstraintInputMatrix( mBufferIndex );
   }
@@ -115,14 +150,14 @@ public:
   /**
    * @copydoc Dali::Internal::PropertyInput::Quaternion()
    */
-  virtual const Quaternion& GetQuaternion() const
+  const Quaternion& GetQuaternion() const override
   {
     return mInput->GetConstraintInputQuaternion( mBufferIndex );
   }
 
-private:
+public:
 
-  unsigned int mBufferIndex;
+  BufferIndex mBufferIndex;
   const AccessorType* mInput;
 };
 
@@ -130,4 +165,4 @@ private:
 
 } // namespace Dali
 
-#endif // __DALI_PROPERTY_INPUT_INDEXER_H__
+#endif // DALI_PROPERTY_INPUT_INDEXER_H