Merge "Clean up the code to build successfully on macOS" into devel/master
[platform/core/uifw/dali-core.git] / dali / internal / update / common / property-owner.h
index d9523e8..d8f3330 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_SCENE_GRAPH_PROPERTY_OWNER_H
 
 /*
- * Copyright (c) 2019 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.
@@ -39,8 +39,8 @@ namespace SceneGraph
 
 class PropertyOwner;
 
-typedef OwnerContainer< PropertyBase* > OwnedPropertyContainer;
-typedef OwnedPropertyContainer::Iterator  OwnedPropertyIter;
+using OwnedPropertyContainer = OwnerContainer<PropertyBase*>;
+using OwnedPropertyIter      = OwnedPropertyContainer::Iterator;
 
 /**
  * An update-thread object which own properties.
@@ -80,8 +80,7 @@ public:
     /**
      * Virtual destructor, no deletion through this interface
      */
-    virtual ~Observer() {}
-
+    virtual ~Observer() = default;
   };
 
   /**
@@ -173,7 +172,7 @@ public:
    * Retrieve if the property owner is updated due to the property is being animating.
    * @return An updated flag
    */
-  bool Updated()
+  bool Updated() const
   {
     return mUpdated;
   }
@@ -223,6 +222,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:
 
@@ -244,12 +251,12 @@ protected:
   OwnedPropertyContainer mCustomProperties; ///< Properties provided with InstallCustomProperty()
   UniformMap mUniformMaps; ///< Container of owned uniform maps
   bool mUpdated;
+  bool                   mIsConnectedToSceneGraph;
 
 private:
-
-  typedef Dali::Vector<PropertyOwner::Observer*> ObserverContainer;
-  typedef ObserverContainer::Iterator ObserverIter;
-  typedef ObserverContainer::ConstIterator ConstObserverIter;
+  using ObserverContainer = Dali::Vector<PropertyOwner::Observer*>;
+  using ObserverIter      = ObserverContainer::Iterator;
+  using ConstObserverIter = ObserverContainer::ConstIterator;
 
   ObserverContainer mObservers; ///< Container of observer raw-pointers (not owned)