use modern construct 'override' in the derive class.
[platform/core/uifw/dali-core.git] / dali / internal / event / actors / layer-impl.h
index c1f3b32..0ada991 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_LAYER_H
 
 /*
- * Copyright (c) 2017 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.
@@ -37,7 +37,7 @@ class UpdateManager;
 class Layer;
 }
 
-typedef Dali::ClippingBox ClippingBox;
+using ClippingBox = Dali::ClippingBox;
 
 class Layer : public Actor
 {
@@ -69,16 +69,14 @@ public:
   /**
    * Create a new root layer; this is typically owned by the stage.
    * @param[in] layerList The layer will be added to this ordered list.
-   * @param[in] manager The update manager to install a root node with.
-   * @param[in] systemLevel True if using the SystemOverlay API; see Integration::GetSystemOverlay() for more details.
    * @return A smart-pointer to the newly allocated Actor.
    */
-  static LayerPtr NewRoot( LayerList& layerList, SceneGraph::UpdateManager& manager, bool systemLevel );
+  static LayerPtr NewRoot( LayerList& layerList );
 
   /**
    * @copydoc Dali::Internal::Actor::OnInitialize
    */
-  void OnInitialize();
+  void OnInitialize() override;
 
   /**
    * Query the current depth of the layer
@@ -201,10 +199,10 @@ public:
 
   /**
    * Helper function to get the scene object.
-   * This should only be called by Stage
+   *
    * @return the scene object for the layer.
    */
-  const SceneGraph::Layer& GetSceneLayerOnStage() const;
+  const SceneGraph::Layer& GetSceneGraphLayer() const;
 
   /**
    * @copydoc Dali::Internal::Actor::DoAction()
@@ -212,95 +210,51 @@ public:
   static bool DoAction(BaseObject* object, const std::string& actionName, const Property::Map& attributes);
 
 public: // Default property extensions from Object
-  /**
-   * @copydoc Dali::Internal::Object::GetDefaultPropertyCount()
-   */
-  virtual unsigned int GetDefaultPropertyCount() const;
-
-  /**
-   * @copydoc Dali::Internal::Object::GetDefaultPropertyIndices()
-   */
-  virtual void GetDefaultPropertyIndices( Property::IndexContainer& indices ) const;
-
-  /**
-   * @copydoc Dali::Internal::Object::GetDefaultPropertyName()
-   */
-  virtual const char* GetDefaultPropertyName(Property::Index index) const;
-
-  /**
-   * @copydoc Dali::Internal::Object::GetDefaultPropertyIndex()
-   */
-  virtual Property::Index GetDefaultPropertyIndex(const std::string& name) const;
-
-  /**
-   * @copydoc Dali::Internal::Object::IsDefaultPropertyWritable()
-   */
-  virtual bool IsDefaultPropertyWritable(Property::Index index) const;
-
-  /**
-   * @copydoc Dali::Internal::Object::IsDefaultPropertyAnimatable()
-   */
-  virtual bool IsDefaultPropertyAnimatable(Property::Index index) const;
-
-  /**
-   * @copydoc Dali::Internal::Object::IsDefaultPropertyAConstraintInput()
-   */
-  virtual bool IsDefaultPropertyAConstraintInput( Property::Index index ) const;
-
-  /**
-   * @copydoc Dali::Internal::Object::GetDefaultPropertyType()
-   */
-  virtual Property::Type GetDefaultPropertyType(Property::Index index) const;
 
   /**
    * @copydoc Dali::Internal::Object::SetDefaultProperty()
    */
-  virtual void SetDefaultProperty(Property::Index index, const Property::Value& propertyValue);
+  void SetDefaultProperty(Property::Index index, const Property::Value& propertyValue) override;
 
   /**
    * @copydoc Dali::Internal::Object::GetDefaultProperty()
    */
-  virtual Property::Value GetDefaultProperty( Property::Index index ) const;
+  Property::Value GetDefaultProperty( Property::Index index ) const override;
 
   /**
    * @copydoc Dali::Internal::Object::GetDefaultProperty()
    */
-  virtual Property::Value GetDefaultPropertyCurrentValue( Property::Index index ) const;
+  Property::Value GetDefaultPropertyCurrentValue( Property::Index index ) const override;
 
 protected:
 
   /**
    * Construct a new layer.
    * @param[in] type Either Actor::LAYER or Actor::ROOT_LAYER if this is the root actor.
+   * @param[in] layer the scene graph layer
    */
-  Layer( Actor::DerivedType type );
+  Layer( Actor::DerivedType type, const SceneGraph::Layer& layer );
 
   /**
    * A reference counted object may only be deleted by calling Unreference()
    */
-  virtual ~Layer();
+  ~Layer() override;
 
 private: // From Actor
 
   /**
-   * From Actor; create a node to represent the layer in the scene-graph.
-   * @return A newly allocated layer node.
-   */
-  virtual SceneGraph::Node* CreateNode() const;
-
-  /**
    * From Actor.
    */
-  virtual void OnStageConnectionInternal();
+  void OnSceneConnectionInternal() override;
 
   /**
    * From Actor.
    */
-  virtual void OnStageDisconnectionInternal();
+  void OnSceneDisconnectionInternal() override;
 
 private:
 
-  LayerList* mLayerList; ///< Only valid when layer is on-stage
+  LayerList* mLayerList; ///< Only valid when layer is on-scene
 
   // These properties not animatable; the actor side has the most up-to-date values
   ClippingBox mClippingBox;                     ///< The clipping box, in window coordinates