-#ifndef __DALI_INTERNAL_SCENE_GRAPH_ANIMATABLE_PROPERTY_H__
-#define __DALI_INTERNAL_SCENE_GRAPH_ANIMATABLE_PROPERTY_H__
+#ifndef DALI_INTERNAL_SCENE_GRAPH_ANIMATABLE_PROPERTY_H
+#define DALI_INTERNAL_SCENE_GRAPH_ANIMATABLE_PROPERTY_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.
/**
* Virtual destructor.
*/
- virtual ~AnimatablePropertyBase()
+ ~AnimatablePropertyBase() override
{}
protected: // for derived classes
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::IsClean()
*/
- virtual bool IsClean() const
+ bool IsClean() const override
{
return ( CLEAN_FLAG == mDirtyFlags );
}
/**
* @copydoc Dali::Internal::PropertyInputImpl::InputInitialized()
*/
- virtual bool InputInitialized() const
+ bool InputInitialized() const override
{
return true; // Animatable properties are always valid
}
/**
* Virtual destructor.
*/
- virtual ~AnimatableProperty()
+ ~AnimatableProperty() override
{
}
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
*/
- virtual Dali::Property::Type GetType() const
+ Dali::Property::Type GetType() const override
{
return Dali::PropertyTypes::Get<bool>();
}
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::ResetToBaseValue()
*/
- virtual void ResetToBaseValue(BufferIndex updateBufferIndex)
+ void ResetToBaseValue(BufferIndex updateBufferIndex) override
{
if (CLEAN_FLAG != mDirtyFlags)
{
/**
* @copydoc Dali::Internal::PropertyInputImpl::GetBoolean()
*/
- virtual const bool& GetBoolean( BufferIndex bufferIndex ) const
+ const bool& GetBoolean( BufferIndex bufferIndex ) const override
{
return mValue[ bufferIndex ];
}
// false + false does not change value, true + false does not either
if( delta && !mValue[bufferIndex] )
{
- mValue[bufferIndex] += delta;
+ mValue[bufferIndex] = delta;
OnSet();
}
*/
void BakeRelative(BufferIndex bufferIndex, bool delta)
{
- mValue[bufferIndex] += delta;
+ mValue[bufferIndex] = mValue[bufferIndex] || delta;
mBaseValue = mValue[bufferIndex];
OnBake();
/**
* Virtual destructor.
*/
- virtual ~AnimatableProperty()
+ ~AnimatableProperty() override
{
}
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
*/
- virtual Dali::Property::Type GetType() const
+ Dali::Property::Type GetType() const override
{
return Dali::PropertyTypes::Get<int>();
}
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::ResetToBaseValue()
*/
- virtual void ResetToBaseValue(BufferIndex updateBufferIndex)
+ void ResetToBaseValue(BufferIndex updateBufferIndex) override
{
if (CLEAN_FLAG != mDirtyFlags)
{
/**
* @copydoc Dali::Internal::PropertyInputImpl::GetInteger()
*/
- virtual const int& GetInteger( BufferIndex bufferIndex ) const
+ const int& GetInteger( BufferIndex bufferIndex ) const override
{
return mValue[ bufferIndex ];
}
/**
* Virtual destructor.
*/
- virtual ~AnimatableProperty()
+ ~AnimatableProperty() override
{
}
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
*/
- virtual Dali::Property::Type GetType() const
+ Dali::Property::Type GetType() const override
{
return Dali::PropertyTypes::Get<float>();
}
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::ResetToBaseValue()
*/
- virtual void ResetToBaseValue(BufferIndex updateBufferIndex)
+ void ResetToBaseValue(BufferIndex updateBufferIndex) override
{
if (CLEAN_FLAG != mDirtyFlags)
{
/**
* @copydoc Dali::Internal::PropertyInputImpl::GetFloat()
*/
- virtual const float& GetFloat( BufferIndex bufferIndex ) const
+ const float& GetFloat( BufferIndex bufferIndex ) const override
{
return mValue[ bufferIndex ];
}
/**
* Virtual destructor.
*/
- virtual ~AnimatableProperty()
+ ~AnimatableProperty() override
{
}
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
*/
- virtual Dali::Property::Type GetType() const
+ Dali::Property::Type GetType() const override
{
return Dali::PropertyTypes::Get<Vector2>();
}
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::ResetToBaseValue()
*/
- virtual void ResetToBaseValue(BufferIndex updateBufferIndex)
+ void ResetToBaseValue(BufferIndex updateBufferIndex) override
{
if (CLEAN_FLAG != mDirtyFlags)
{
/**
* @copydoc Dali::PropertyInput::GetVector2()
*/
- virtual const Vector2& GetVector2( BufferIndex bufferIndex ) const
+ const Vector2& GetVector2( BufferIndex bufferIndex ) const override
{
return mValue[ bufferIndex ];
}
/**
* Virtual destructor.
*/
- virtual ~AnimatableProperty()
+ ~AnimatableProperty() override
{
}
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
*/
- virtual Dali::Property::Type GetType() const
+ Dali::Property::Type GetType() const override
{
return Dali::PropertyTypes::Get<Vector3>();
}
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::ResetToBaseValue()
*/
- virtual void ResetToBaseValue(BufferIndex updateBufferIndex)
+ void ResetToBaseValue(BufferIndex updateBufferIndex) override
{
if (CLEAN_FLAG != mDirtyFlags)
{
/**
* @copydoc Dali::PropertyInput::GetVector3()
*/
- virtual const Vector3& GetVector3( BufferIndex bufferIndex ) const
+ const Vector3& GetVector3( BufferIndex bufferIndex ) const override
{
return mValue[ bufferIndex ];
}
/**
* Virtual destructor.
*/
- virtual ~AnimatableProperty()
+ ~AnimatableProperty() override
{
}
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
*/
- virtual Dali::Property::Type GetType() const
+ Dali::Property::Type GetType() const override
{
return Dali::PropertyTypes::Get<Vector4>();
}
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::ResetToBaseValue()
*/
- virtual void ResetToBaseValue(BufferIndex updateBufferIndex)
+ void ResetToBaseValue(BufferIndex updateBufferIndex) override
{
if (CLEAN_FLAG != mDirtyFlags)
{
/**
* @copydoc Dali::PropertyInput::GetVector4()
*/
- virtual const Vector4& GetVector4( BufferIndex bufferIndex ) const
+ const Vector4& GetVector4( BufferIndex bufferIndex ) const override
{
return mValue[ bufferIndex ];
}
/**
* Virtual destructor.
*/
- virtual ~AnimatableProperty()
+ ~AnimatableProperty() override
{
}
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
*/
- virtual Dali::Property::Type GetType() const
+ Dali::Property::Type GetType() const override
{
return Dali::PropertyTypes::Get<Quaternion>();
}
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::ResetToBaseValue()
*/
- virtual void ResetToBaseValue(BufferIndex updateBufferIndex)
+ void ResetToBaseValue(BufferIndex updateBufferIndex) override
{
if (CLEAN_FLAG != mDirtyFlags)
{
/**
* @copydoc Dali::PropertyInput::GetQuaternion()
*/
- virtual const Quaternion& GetQuaternion( BufferIndex bufferIndex ) const
+ const Quaternion& GetQuaternion( BufferIndex bufferIndex ) const override
{
return mValue[ bufferIndex ];
}
/**
* Virtual destructor.
*/
- virtual ~AnimatableProperty()
+ ~AnimatableProperty() override
{
}
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
*/
- virtual Dali::Property::Type GetType() const
+ Dali::Property::Type GetType() const override
{
return Dali::PropertyTypes::Get<Matrix>();
}
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::ResetToBaseValue()
*/
- virtual void ResetToBaseValue(BufferIndex updateBufferIndex)
+ void ResetToBaseValue(BufferIndex updateBufferIndex) override
{
if (CLEAN_FLAG != mDirtyFlags)
{
/**
* @copydoc Dali::Internal::PropertyInputImpl::GetMatrix()
*/
- virtual const Matrix& GetMatrix( BufferIndex bufferIndex ) const
+ const Matrix& GetMatrix( BufferIndex bufferIndex ) const override
{
return mValue[ bufferIndex ];
}
/**
* Virtual destructor.
*/
- virtual ~AnimatableProperty()
+ ~AnimatableProperty() override
{
}
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
*/
- virtual Dali::Property::Type GetType() const
+ Dali::Property::Type GetType() const override
{
return Dali::PropertyTypes::Get<Matrix3>();
}
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::ResetToBaseValue()
*/
- virtual void ResetToBaseValue(BufferIndex updateBufferIndex)
+ void ResetToBaseValue(BufferIndex updateBufferIndex) override
{
if (CLEAN_FLAG != mDirtyFlags)
{
/**
* @copydoc Dali::Internal::PropertyInputImpl::GetMatrix3()
*/
- virtual const Matrix3& GetMatrix3( BufferIndex bufferIndex ) const
+ const Matrix3& GetMatrix3( BufferIndex bufferIndex ) const override
{
return mValue[ bufferIndex ];
}
const SceneGraph::AnimatableProperty<T>& property,
typename ParameterType< T >::PassingType newValue )
{
- typedef MessageDoubleBuffered1< SceneGraph::AnimatableProperty<T>, T > LocalType;
+ using LocalType = MessageDoubleBuffered1<SceneGraph::AnimatableProperty<T>, T>;
// Reserve some memory inside the message queue
uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
const SceneGraph::AnimatableProperty<T>& property,
const T& delta )
{
- typedef MessageDoubleBuffered1< SceneGraph::AnimatableProperty<T>, const T& > LocalType;
+ using LocalType = MessageDoubleBuffered1<SceneGraph::AnimatableProperty<T>, const T&>;
// Reserve some memory inside the message queue
uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
const SceneGraph::AnimatableProperty<T>& property,
typename ParameterType< float >::PassingType newValue )
{
- typedef MessageDoubleBuffered1< SceneGraph::AnimatableProperty<T>, float > LocalType;
+ using LocalType = MessageDoubleBuffered1<SceneGraph::AnimatableProperty<T>, float>;
// Reserve some memory inside the message queue
uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
const SceneGraph::AnimatableProperty<T>& property,
typename ParameterType< float >::PassingType newValue )
{
- typedef MessageDoubleBuffered1< SceneGraph::AnimatableProperty<T>, float > LocalType;
+ using LocalType = MessageDoubleBuffered1<SceneGraph::AnimatableProperty<T>, float>;
// Reserve some memory inside the message queue
uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
const SceneGraph::AnimatableProperty<T>& property,
typename ParameterType< float >::PassingType newValue )
{
- typedef MessageDoubleBuffered1< SceneGraph::AnimatableProperty<T>, float > LocalType;
+ using LocalType = MessageDoubleBuffered1<SceneGraph::AnimatableProperty<T>, float>;
// Reserve some memory inside the message queue
uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
const SceneGraph::AnimatableProperty<T>& property,
typename ParameterType< float >::PassingType newValue )
{
- typedef MessageDoubleBuffered1< SceneGraph::AnimatableProperty<T>, float > LocalType;
+ using LocalType = MessageDoubleBuffered1<SceneGraph::AnimatableProperty<T>, float>;
// Reserve some memory inside the message queue
uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
} // namespace Dali
-#endif // __DALI_INTERNAL_SCENE_GRAPH_ANIMATABLE_PROPERTY_H__
+#endif // DALI_INTERNAL_SCENE_GRAPH_ANIMATABLE_PROPERTY_H