X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fupdate%2Fcommon%2Fproperty-owner.h;h=2e6c7da6f1dc42d117808bafde18f1cf9dc745b3;hb=0b1a36885914bce024aec63a236058f83809e1db;hp=e5ab8bf5842c7738f1e6da428ae7d3c8b7e20187;hpb=ba99c2fc92c63f4a7a513813dfc5e76cc502b831;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/update/common/property-owner.h b/dali/internal/update/common/property-owner.h index e5ab8bf..2e6c7da 100644 --- a/dali/internal/update/common/property-owner.h +++ b/dali/internal/update/common/property-owner.h @@ -1,8 +1,8 @@ -#ifndef __DALI_INTERNAL_SCENE_GRAPH_PROPERTY_OWNER_H__ -#define __DALI_INTERNAL_SCENE_GRAPH_PROPERTY_OWNER_H__ +#ifndef DALI_INTERNAL_SCENE_GRAPH_PROPERTY_OWNER_H +#define DALI_INTERNAL_SCENE_GRAPH_PROPERTY_OWNER_H /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -26,6 +26,7 @@ #include #include #include +#include namespace Dali @@ -39,8 +40,8 @@ namespace SceneGraph class PropertyOwner; -typedef OwnerContainer< PropertyBase* > OwnedPropertyContainer; -typedef OwnedPropertyContainer::Iterator OwnedPropertyIter; +using OwnedPropertyContainer = OwnerContainer; +using OwnedPropertyIter = OwnedPropertyContainer::Iterator; /** * An update-thread object which own properties. @@ -80,8 +81,7 @@ public: /** * Virtual destructor, no deletion through this interface */ - virtual ~Observer() {} - + virtual ~Observer() = default; }; /** @@ -160,6 +160,23 @@ public: return mCustomProperties; } + /** + * Mark an property owner with the updated flag. + * @param[in] updated The updated flag + */ + virtual void SetUpdated(bool updated) + { + mUpdated = updated; + } + + /** + * Retrieve if the property owner is updated due to the property is being animating. + * @return An updated flag + */ + bool Updated() const + { + return mUpdated; + } // Constraints @@ -184,12 +201,12 @@ public: /** * @copydoc UniformMap::Add */ - virtual void AddUniformMapping( OwnerPointer< UniformPropertyMapping >& map ); + virtual void AddUniformMapping(const UniformPropertyMapping& map); /** * @copydoc UniformMap::Remove */ - virtual void RemoveUniformMapping( const std::string& uniformName ); + virtual void RemoveUniformMapping( const ConstString& uniformName ); /** * Get the mappings table @@ -206,6 +223,14 @@ public: */ void RemoveUniformMapObserver( UniformMap::Observer& observer ); + /** + * Query whether playing an animation is possible or not. + * @return true if playing an animation is possible. + */ + virtual bool IsAnimationPossible() const + { + return true; + } protected: @@ -226,12 +251,13 @@ protected: OwnedPropertyContainer mCustomProperties; ///< Properties provided with InstallCustomProperty() UniformMap mUniformMaps; ///< Container of owned uniform maps + bool mUpdated; + bool mIsConnectedToSceneGraph; private: - - typedef Dali::Vector ObserverContainer; - typedef ObserverContainer::Iterator ObserverIter; - typedef ObserverContainer::ConstIterator ConstObserverIter; + using ObserverContainer = Dali::Vector; + using ObserverIter = ObserverContainer::Iterator; + using ConstObserverIter = ObserverContainer::ConstIterator; ObserverContainer mObservers; ///< Container of observer raw-pointers (not owned) @@ -244,4 +270,4 @@ private: } // namespace Dali -#endif // __DALI_INTERNAL_SCENE_GRAPH_PROPERTY_OWNER_H__ +#endif // DALI_INTERNAL_SCENE_GRAPH_PROPERTY_OWNER_H