Adding 'override', removing 'virtual' from overriding functions' declarations in...
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / dummy-control.h
index 5988284..6f79c36 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_TOOLKIT_TEST_DUMMY_CONTROL_H__
-#define __DALI_TOOLKIT_TEST_DUMMY_CONTROL_H__
+#ifndef DALI_TOOLKIT_TEST_DUMMY_CONTROL_H
+#define DALI_TOOLKIT_TEST_DUMMY_CONTROL_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.
@@ -90,8 +90,8 @@ public:
   static DummyControl New();
 
 public:
-  inline void EnableGestureDetection(Gesture::Type type) { Internal::Control::EnableGestureDetection(type); }
-  inline void DisableGestureDetection(Gesture::Type type) { Internal::Control::DisableGestureDetection(type); }
+  inline void EnableGestureDetection(GestureType::Value type) { Internal::Control::EnableGestureDetection(type); }
+  inline void DisableGestureDetection(GestureType::Value type) { Internal::Control::DisableGestureDetection(type); }
   inline PinchGestureDetector GetPinchGestureDetector() const { return Internal::Control::GetPinchGestureDetector(); }
   inline PanGestureDetector GetPanGestureDetector() const { return Internal::Control::GetPanGestureDetector(); }
   inline TapGestureDetector GetTapGestureDetector() const { return Internal::Control::GetTapGestureDetector(); }
@@ -122,7 +122,7 @@ protected:
 
   DummyControlImpl();
 
-  virtual ~DummyControlImpl();
+  ~DummyControlImpl() override;
 };
 
 namespace Impl
@@ -148,37 +148,33 @@ private:
 
   DummyControl();
 
-  virtual ~DummyControl();
+  ~DummyControl() override;
 
 private: // From Internal::Control
 
-  virtual void OnInitialize();
-  virtual bool OnAccessibilityActivated();
-  virtual bool OnAccessibilityTouch( const TouchEvent& touchEvent );
-  virtual bool OnAccessibilityValueChange( bool isIncrease );
+  void OnInitialize() override;
+  bool OnAccessibilityActivated() override;
+  bool OnAccessibilityValueChange( bool isIncrease ) override;
 
-  virtual void OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change );
-  virtual void OnPinch(const PinchGesture& pinch);
-  virtual void OnPan(const PanGesture& pan);
-  virtual void OnTap(const TapGesture& tap);
-  virtual void OnLongPress(const LongPressGesture& longPress);
-  virtual Vector3 GetNaturalSize();
+  void OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change ) override;
+  void OnPinch(const PinchGesture& pinch) override;
+  void OnPan(const PanGesture& pan) override;
+  void OnTap(const TapGesture& tap) override;
+  void OnLongPress(const LongPressGesture& longPress) override;
+  Vector3 GetNaturalSize() override;
+  bool OnKeyEvent(const KeyEvent& event) override;
 
 private: // From CustomActorImpl
 
-  virtual void OnStageConnection( int depth );
-  virtual void OnStageDisconnection();
-  virtual void OnChildAdd(Actor& child);
-  virtual void OnChildRemove(Actor& child);
-  virtual void OnSizeSet(const Vector3& targetSize);
-  virtual void OnSizeAnimation(Animation& animation, const Vector3& targetSize);
-  virtual bool OnTouchEvent(const TouchEvent& event);
-  virtual bool OnHoverEvent(const HoverEvent& event);
-  virtual bool OnWheelEvent(const WheelEvent& event);
-  virtual bool OnKeyEvent(const KeyEvent& event);
-  virtual void OnKeyInputFocusGained();
-  virtual void OnKeyInputFocusLost();
-  virtual void OnRelayout( const Vector2& size, RelayoutContainer& container );
+  void OnSceneConnection( int depth ) override;
+  void OnSceneDisconnection() override;
+  void OnChildAdd(Actor& child) override;
+  void OnChildRemove(Actor& child) override;
+  void OnSizeSet(const Vector3& targetSize) override;
+  void OnSizeAnimation(Animation& animation, const Vector3& targetSize) override;
+  void OnKeyInputFocusGained() override;
+  void OnKeyInputFocusLost() override;
+  void OnRelayout( const Vector2& size, RelayoutContainer& container ) override;
 
   DALI_INTERNAL DummyControl( const DummyControl& );
   DALI_INTERNAL DummyControl& operator=( const DummyControl& );
@@ -187,7 +183,6 @@ public:
 
   bool initializeCalled;
   bool activatedCalled;
-  bool onAccTouchedCalled;
   bool onAccValueChangeCalled;
   bool themeChangeCalled;
   bool fontChangeCalled;
@@ -201,12 +196,13 @@ public:
   bool childRemoveCalled;
   bool sizeSetCalled;
   bool sizeAnimationCalled;
-  bool touchEventCalled;
   bool hoverEventCalled;
   bool wheelEventCalled;
   bool keyEventCalled;
   bool keyInputFocusGained;
   bool keyInputFocusLost;
+  static int constructorCount;
+  static int destructorCount;
 
   Property::Map mLayouts;
   RelayoutCallbackFunc mRelayoutCallback;
@@ -219,4 +215,4 @@ public:
 
 } // namespace Dali
 
-#endif // __DALI_TOOLKIT_TEST_DUMMY_CONTROL_H__
+#endif // DALI_TOOLKIT_TEST_DUMMY_CONTROL_H