Add move semantics to common and base Toolkit classes
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / buttons / check-box-button.cpp
index e6b2a5e..69dbdd3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 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.
@@ -29,26 +29,18 @@ namespace Dali
 namespace Toolkit
 {
 
-const char* const CheckBoxButton::ACTION_CHECK_BOX_BUTTON_CLICK = "check-box-button-click";
-
 CheckBoxButton::CheckBoxButton()
 : Button()
 {
 }
 
-CheckBoxButton::CheckBoxButton( const CheckBoxButton& checkBox )
-: Button( checkBox )
-{
-}
+CheckBoxButton::CheckBoxButton( const CheckBoxButton& checkBox ) = default;
 
-CheckBoxButton& CheckBoxButton::operator=( const CheckBoxButton& checkBox )
-{
-  if( &checkBox != this )
-  {
-    Button::operator=( checkBox );
-  }
-  return *this;
-}
+CheckBoxButton::CheckBoxButton( CheckBoxButton&& rhs ) = default;
+
+CheckBoxButton& CheckBoxButton::operator=( const CheckBoxButton& checkBox ) = default;
+
+CheckBoxButton& CheckBoxButton::operator=( CheckBoxButton&& rhs ) = default;
 
 CheckBoxButton::~CheckBoxButton()
 {
@@ -64,77 +56,6 @@ CheckBoxButton CheckBoxButton::DownCast( BaseHandle handle )
   return Control::DownCast<CheckBoxButton, Internal::CheckBoxButton>(handle);
 }
 
-void CheckBoxButton::SetChecked( bool checked )
-{
-  Dali::Toolkit::GetImplementation( *this ).SetChecked( checked );
-}
-
-bool CheckBoxButton::IsChecked() const
-{
-  return Dali::Toolkit::GetImplementation( *this ).IsChecked();
-}
-
-void CheckBoxButton::SetBackgroundImage( Image image )
-{
-  Dali::Toolkit::GetImplementation( *this ).SetBackgroundImage( image );
-}
-
-void CheckBoxButton::SetBackgroundImage( Actor image )
-{
-  Dali::Toolkit::GetImplementation( *this ).SetBackgroundImage( image );
-}
-
-Actor CheckBoxButton::GetBackgroundImage() const
-{
-  return Dali::Toolkit::GetImplementation( *this ).GetBackgroundImage();
-}
-
-void CheckBoxButton::SetCheckedImage( Image image )
-{
-  Dali::Toolkit::GetImplementation( *this ).SetCheckedImage( image );
-}
-
-void CheckBoxButton::SetCheckedImage( Actor image )
-{
-  Dali::Toolkit::GetImplementation( *this ).SetCheckedImage( image );
-}
-
-
-Actor CheckBoxButton::GetCheckedImage() const
-{
-  return Dali::Toolkit::GetImplementation( *this ).GetCheckedImage();
-}
-
-void CheckBoxButton::SetDisabledBackgroundImage( Image image )
-{
-  Dali::Toolkit::GetImplementation( *this ).SetDisabledBackgroundImage( image );
-}
-
-void CheckBoxButton::SetDisabledBackgroundImage( Actor image )
-{
-  Dali::Toolkit::GetImplementation( *this ).SetDisabledBackgroundImage( image );
-}
-
-Actor CheckBoxButton::GetDisabledBackgroundImage() const
-{
-  return Dali::Toolkit::GetImplementation( *this ).GetDisabledBackgroundImage();
-}
-
-void CheckBoxButton::SetDisabledCheckedImage( Image image )
-{
-  Dali::Toolkit::GetImplementation( *this ).SetDisabledCheckedImage( image );
-}
-
-void CheckBoxButton::SetDisabledCheckedImage( Actor image )
-{
-  Dali::Toolkit::GetImplementation( *this ).SetDisabledCheckedImage( image );
-}
-
-Actor CheckBoxButton::GetDisabledCheckedImage() const
-{
-  return Dali::Toolkit::GetImplementation( *this ).GetDisabledCheckedImage();
-}
-
 CheckBoxButton::CheckBoxButton( Internal::CheckBoxButton& implementation )
 : Button( implementation )
 {