-#ifndef __DALI_INTERNAL_CONSTRAINER_H__
-#define __DALI_INTERNAL_CONSTRAINER_H__
+#ifndef DALI_INTERNAL_CONSTRAINER_H
+#define DALI_INTERNAL_CONSTRAINER_H
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
namespace Dali
{
-
namespace Internal
{
-
-typedef Dali::Vector<Object*> ObjectContainer;
-typedef ObjectContainer::Iterator ObjectIter;
+typedef Dali::Vector<Object*> ObjectContainer;
+using ObjectIter = ObjectContainer::Iterator;
/**
* An abstract base class for constrainers.
class Constrainer : public Object, public Object::Observer
{
public:
-
/**
* Constructor.
*/
/**
* Virtual destructor.
*/
- virtual ~Constrainer();
-
-public: // Object methods
-
- /**
- * @copydoc Dali::Internal::Object::SetDefaultProperty()
- */
- virtual void SetDefaultProperty( Property::Index index, const Property::Value& propertyValue ){}
-
- /**
- * @copydoc Dali::Internal::Object::GetDefaultProperty()
- */
- virtual Property::Value GetDefaultProperty( Property::Index index ) const{return Property::Value();}
-
- /**
- * @copydoc Dali::Internal::Object::GetDefaultPropertyCurrentValue()
- */
- virtual Property::Value GetDefaultPropertyCurrentValue( Property::Index index ) const{return Property::Value();}
-
- /**
- * @copydoc Dali::Internal::Object::GetSceneObject()
- */
- virtual const SceneGraph::PropertyOwner* GetSceneObject() const{return 0;}
-
- /**
- * @copydoc Dali::Internal::Object::GetSceneObjectAnimatableProperty()
- */
- virtual const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const{return 0;}
-
- /**
- * @copydoc Dali::Internal::Object::GetSceneObjectInputProperty()
- */
- virtual const PropertyInputImpl* GetSceneObjectInputProperty( Property::Index index ) const{return 0;}
+ ~Constrainer() override;
public: // Object::Observer methods
-
/**
* @copydoc Object::Observer::SceneObjectAdded()
*/
- virtual void SceneObjectAdded( Object& object ){}
+ void SceneObjectAdded(Object& object) override
+ {
+ }
/**
* @copydoc Object::Observer::SceneObjectRemoved()
*/
- virtual void SceneObjectRemoved( Object& object ){}
+ void SceneObjectRemoved(Object& object) override
+ {
+ }
/**
* @copydoc Object::Observer::ObjectDestroyed()
*/
- virtual void ObjectDestroyed( Object& object );
+ void ObjectDestroyed(Object& object) override;
public:
-
/**
* @brief Applies the constraint to the target property
* @param[in] range The range of values in the source property which will be mapped to [0,1]
* @param[in] wrap Wrapping domain. Source property will be wrapped in the domain [wrap.x,wrap.y] before mapping to [0,1]
*/
- virtual void Apply( Property target, Property source, const Vector2& range, const Vector2& wrap) = 0;
+ virtual void Apply(Property target, Property source, const Vector2& range, const Vector2& wrap) = 0;
/**
* @brief Removes the constraint in the target object
*
* @param[in] target A handle to an object constrained by the Constrainer
*/
- void Remove( Dali::Handle& target );
+ void Remove(Dali::Handle& target);
protected:
-
/**
* @brief Adds an object to the list of observed objects
*
* @param[in] handle A handle to the object to be observed
*/
- void Observe( Dali::Handle& handle );
+ void Observe(Dali::Handle& handle);
private:
-
- ObjectContainer mObservedObjects; ///< The list of object which have been constrained by the Constrainer
+ ObjectContainer mObservedObjects; ///< The list of object which have been constrained by the Constrainer
};
} // namespace Internal
} // namespace Dali
-#endif // __DALI_INTERNAL_CONSTRAINER_H__
+#endif // DALI_INTERNAL_CONSTRAINER_H