2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an ”AS IS” BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 * @file FUi_TouchRotationGestureDetectorImpl.cpp
19 * @brief This is the implementation file for %_TouchRotationGestureDetectorImpl class
22 * This file contains the implementation of %_TouchRotationGestureDetectorImpl class.
27 #include <FUiTouchRotationGestureDetector.h>
28 #include "FUi_TouchRotationGestureDetector.h"
29 #include "FUi_TouchRotationGestureDetectorImpl.h"
31 namespace Tizen { namespace Ui
34 _TouchRotationGestureDetectorImpl::_TouchRotationGestureDetectorImpl(TouchRotationGestureDetector* pPublic, _TouchRotationGestureDetector* pCore)
35 : _TouchGestureDetectorImpl(pPublic, pCore)
39 _TouchRotationGestureDetectorImpl::~_TouchRotationGestureDetectorImpl(void)
43 _TouchRotationGestureDetectorImpl*
44 _TouchRotationGestureDetectorImpl::CreateInstanceN(TouchRotationGestureDetector* pPublic)
48 _TouchRotationGestureDetector* pCore = null;
49 pCore = new (std::nothrow) _TouchRotationGestureDetector;
50 SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is shortage.");
52 _TouchRotationGestureDetectorImpl* pImpl = new (std::nothrow) _TouchRotationGestureDetectorImpl(pPublic, pCore);
53 SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is shortage.");
63 const _TouchRotationGestureDetector&
64 _TouchRotationGestureDetectorImpl::GetCore(void) const
66 return static_cast<const _TouchRotationGestureDetector&>(_TouchGestureDetectorImpl::GetCore());
69 _TouchRotationGestureDetector&
70 _TouchRotationGestureDetectorImpl::GetCore(void)
72 return static_cast<_TouchRotationGestureDetector&>(_TouchGestureDetectorImpl::GetCore());
75 _TouchRotationGestureDetectorImpl*
76 _TouchRotationGestureDetectorImpl::GetInstance(TouchRotationGestureDetector& gestureDetector)
78 return static_cast<_TouchRotationGestureDetectorImpl*> (gestureDetector.__pTouchGestureDetectorImpl);
81 const _TouchRotationGestureDetectorImpl*
82 _TouchRotationGestureDetectorImpl::GetInstance(const TouchRotationGestureDetector& gestureDetector)
84 return static_cast<const _TouchRotationGestureDetectorImpl*> (gestureDetector.__pTouchGestureDetectorImpl);
88 _TouchRotationGestureDetectorImpl::GetAngle(void) const
92 return GetCore().GetAngle();
96 _TouchRotationGestureDetectorImpl::GetDistance(void) const
100 return GetCore().GetDistance();
104 _TouchRotationGestureDetectorImpl::GetDistanceF(void) const
108 return GetCore().GetDistance();