Ensure BaseHandle class move noexcept (core public-api)
[platform/core/uifw/dali-core.git] / dali / public-api / actors / layer.cpp
index ca32115..2f19079 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
 
 // INTERNAL INCLUDES
 #include <dali/internal/event/actors/layer-impl.h>
-#include <dali/internal/event/images/frame-buffer-image-impl.h>
 
 namespace Dali
 {
-
-using Dali::Layer;
-
-const char* const Layer::ACTION_RAISE = "raise";
-const char* const Layer::ACTION_LOWER = "lower";
-const char* const Layer::ACTION_RAISE_TO_TOP = "raise-to-top";
-const char* const Layer::ACTION_LOWER_TO_BOTTOM = "lower-to-bottom";
-
-
-Layer::Layer()
-{
-}
+Layer::Layer() = default;
 
 Layer Layer::New()
 {
@@ -44,30 +32,20 @@ Layer Layer::New()
   return Layer(internal.Get());
 }
 
-Layer Layer::DownCast( BaseHandle handle )
+Layer Layer::DownCast(BaseHandle handle)
 {
-  return Layer( dynamic_cast<Dali::Internal::Layer*>(handle.GetObjectPtr()) );
+  return Layer(dynamic_cast<Dali::Internal::Layer*>(handle.GetObjectPtr()));
 }
 
-Layer::~Layer()
-{
-}
+Layer::~Layer() = default;
 
-Layer::Layer(const Layer& copy)
-: Actor(copy)
-{
-}
+Layer::Layer(const Layer& copy) = default;
 
-Layer& Layer::operator=(const Layer& rhs)
-{
-  BaseHandle::operator=(rhs);
-  return *this;
-}
+Layer& Layer::operator=(const Layer& rhs) = default;
 
-unsigned int Layer::GetDepth() const
-{
-  return GetImplementation(*this).GetDepth();
-}
+Layer::Layer(Layer&& rhs) noexcept = default;
+
+Layer& Layer::operator=(Layer&& rhs) noexcept = default;
 
 void Layer::Raise()
 {
@@ -79,14 +57,14 @@ void Layer::Lower()
   GetImplementation(*this).Lower();
 }
 
-void Layer::RaiseAbove( Layer target )
+void Layer::RaiseAbove(Layer target)
 {
-  GetImplementation(*this).RaiseAbove( GetImplementation( target ) );
+  GetImplementation(*this).RaiseAbove(GetImplementation(target));
 }
 
-void Layer::LowerBelow( Layer target )
+void Layer::LowerBelow(Layer target)
 {
-  GetImplementation(*this).LowerBelow( GetImplementation( target ) );
+  GetImplementation(*this).LowerBelow(GetImplementation(target));
 }
 
 void Layer::RaiseToTop()
@@ -99,54 +77,14 @@ void Layer::LowerToBottom()
   GetImplementation(*this).LowerToBottom();
 }
 
-void Layer::MoveAbove( Layer target )
-{
-  GetImplementation(*this).MoveAbove( GetImplementation( target ) );
-}
-
-void Layer::MoveBelow( Layer target )
-{
-  GetImplementation(*this).MoveBelow( GetImplementation( target ) );
-}
-
-void Layer::SetClipping(bool enabled)
-{
-  GetImplementation(*this).SetClipping(enabled);
-}
-
-bool Layer::IsClipping() const
-{
-  return GetImplementation(*this).IsClipping();
-}
-
-void Layer::SetClippingBox(int x, int y, int width, int height)
-{
-  GetImplementation(*this).SetClippingBox(x, y, width, height);
-}
-
-void Layer::SetClippingBox(ClippingBox box)
-{
-  GetImplementation(*this).SetClippingBox(box.x, box.y, box.width, box.height);
-}
-
-ClippingBox Layer::GetClippingBox() const
-{
-  return GetImplementation(*this).GetClippingBox();
-}
-
-void Layer::SetDepthTestDisabled( bool disable )
-{
-  GetImplementation(*this).SetDepthTestDisabled( disable );
-}
-
-bool Layer::IsDepthTestDisabled() const
+void Layer::MoveAbove(Layer target)
 {
-  return GetImplementation(*this).IsDepthTestDisabled();
+  GetImplementation(*this).MoveAbove(GetImplementation(target));
 }
 
-float Layer::ZValue(const Vector3& position, float sortModifier)
+void Layer::MoveBelow(Layer target)
 {
-  return Internal::Layer::ZValue( position, sortModifier );
+  GetImplementation(*this).MoveBelow(GetImplementation(target));
 }
 
 void Layer::SetSortFunction(SortFunctionType function)
@@ -154,30 +92,9 @@ void Layer::SetSortFunction(SortFunctionType function)
   GetImplementation(*this).SetSortFunction(function);
 }
 
-void Layer::SetTouchConsumed( bool consume )
-{
-  GetImplementation( *this ).SetTouchConsumed( consume );
-}
-
-bool Layer::IsTouchConsumed() const
-{
-  return GetImplementation( *this ).IsTouchConsumed();
-}
-
-void Layer::SetHoverConsumed( bool consume )
-{
-  GetImplementation( *this ).SetHoverConsumed( consume );
-}
-
-bool Layer::IsHoverConsumed() const
-{
-  return GetImplementation( *this ).IsHoverConsumed();
-}
-
 Layer::Layer(Internal::Layer* internal)
 : Actor(internal)
 {
 }
 
 } // namespace Dali
-