Merge "Clean up the code to build successfully on macOS" into devel/master
[platform/core/uifw/dali-core.git] / dali / internal / update / common / scene-graph-connection-change-propagator.h
index 37c1c9c..3621541 100644 (file)
@@ -48,6 +48,18 @@ public:
      * changed it's uniform map in some way.
      */
     virtual void ConnectedUniformMapChanged() = 0;
+
+    /**
+     * Inform the observer of the object that the object is about to be destroyed
+     */
+    virtual void ObservedObjectDestroyed(PropertyOwner& object){}
+
+  protected:
+
+    /**
+     * Virtual destructor, no deletion through this interface
+     */
+    virtual ~Observer() = default;
   };
 
   /**
@@ -82,9 +94,15 @@ public:
    */
   void ConnectedUniformMapChanged();
 
+  /**
+   * Inform the observers that the object is about to be destroyed
+   * @param[in] object The connection owner
+   */
+  void Destroy( PropertyOwner& object );
+
 private:
-  typedef Dali::Vector<Observer*> Observers;
-  typedef Observers::Iterator ObserversIterator;
+  using Observers         = Dali::Vector<Observer*>;
+  using ObserversIterator = Observers::Iterator;
 
   Observers mObservers;
 };