X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fevents%2Factor-observer.h;h=032d8915d460dbd76d842e92c266de6224e6def2;hb=d7775bfee328210d5b7300caf0fccfc2ec3dc2e8;hp=31adc3480593cc5fd2b15fcd5de5bb4fd84397b3;hpb=4a4b7e5be094c645142c9ed1e435eab6c214780c;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/events/actor-observer.h b/dali/internal/event/events/actor-observer.h index 31adc34..032d891 100644 --- a/dali/internal/event/events/actor-observer.h +++ b/dali/internal/event/events/actor-observer.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_ACTOR_OBSERVER_H /* - * Copyright (c) 2019 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. @@ -19,15 +19,13 @@ */ // INTERNAL INCLUDES -#include #include +#include namespace Dali { - namespace Internal { - class Actor; /** @@ -36,7 +34,6 @@ class Actor; struct ActorObserver : public Object::Observer { public: - // Construction & Destruction /** @@ -57,12 +54,12 @@ public: * * @note Ownership of callback is passed onto this class. */ - ActorObserver( CallbackBase* callback ); + ActorObserver(CallbackBase* callback); /** * Non virtual destructor */ - ~ActorObserver(); + ~ActorObserver() override; // Movable @@ -74,7 +71,7 @@ public: * @note The other's actor is appropriately disconnected. * @note Ownership of callback is passed onto this class. */ - ActorObserver( ActorObserver&& other ); + ActorObserver(ActorObserver&& other) noexcept; /** * Move assignment operator. @@ -84,12 +81,12 @@ public: * @note The other's actor is appropriately disconnected. * @note Ownership of callback is passed onto this class. */ - ActorObserver& operator=( ActorObserver&& other ); + ActorObserver& operator=(ActorObserver&& other) noexcept; // Not copyable - ActorObserver( const ActorObserver& ) = delete; ///< Deleted copy constructor. - ActorObserver& operator=( const ActorObserver& ) = delete; ///< Deleted copy assignment operator. + ActorObserver(const ActorObserver&) = delete; ///< Deleted copy constructor. + ActorObserver& operator=(const ActorObserver&) = delete; ///< Deleted copy assignment operator. // Methods @@ -105,7 +102,7 @@ public: * This disconnects the required signals from the currently set actor and connects to the required * signals for the the actor specified (if set). */ - void SetActor( Actor* actor ); + void SetActor(Actor* actor); /** * Resets the set actor and disconnects any connected signals. @@ -113,32 +110,31 @@ public: void ResetActor(); private: - /** * This will be called if an actor is added to the scene. * @param[in] object The object object. * @see Object::Observer::SceneObjectAdded() */ - virtual void SceneObjectAdded( Object& object ); + void SceneObjectAdded(Object& object) override; /** * This will be called when the actor is removed from the scene. * @param[in] object The object object. * @see Object::Observer::SceneObjectRemoved() */ - virtual void SceneObjectRemoved( Object& object ); + void SceneObjectRemoved(Object& object) override; /** * This will be called when the actor is destroyed. We should clear the actor. * No need to stop observing as the object is being destroyed anyway. * @see Object::Observer::ObjectDestroyed() */ - virtual void ObjectDestroyed( Object& object ); + void ObjectDestroyed(Object& object) override; private: - Actor* mActor; ///< Raw pointer to an Actor. - bool mActorDisconnected; ///< Indicates whether the actor has been disconnected from the scene - CallbackBase* mRemoveCallback; ///< Callback to call when the observed actor is removed from the scene + Actor* mActor; ///< Raw pointer to an Actor. + bool mActorDisconnected; ///< Indicates whether the actor has been disconnected from the scene + CallbackBase* mRemoveCallback; ///< Callback to call when the observed actor is removed from the scene }; } // namespace Internal @@ -146,4 +142,3 @@ private: } // namespace Dali #endif // DALI_INTERNAL_ACTOR_OBSERVER_H -