2 // Open Service Platform
3 // Copyright (c) 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 #include <FUixVisionQrCodeObject.h>
19 #include "FUixVision_QrCodeObjectImpl.h"
21 namespace Tizen { namespace Uix { namespace Vision
24 QrCodeObject::QrCodeObject(void)
25 : __pQrCodeObjectImpl(0)
27 std::unique_ptr<_QrCodeObjectImpl> pQrCodeObjectImpl(new (std::nothrow) _QrCodeObjectImpl());
28 __pQrCodeObjectImpl = pQrCodeObjectImpl.release();
31 QrCodeObject::~QrCodeObject(void)
33 if (__pQrCodeObjectImpl != null)
35 delete __pQrCodeObjectImpl;
36 __pQrCodeObjectImpl = null;
41 QrCodeObject::GetId(void) const
43 if (__pQrCodeObjectImpl)
45 return __pQrCodeObjectImpl->GetId();
54 QrCodeObject::GetVersion(void) const
56 if (__pQrCodeObjectImpl)
58 return __pQrCodeObjectImpl->GetVersion();
66 Tizen::Uix::Vision::QrCodeErrorCorrectionLevel
67 QrCodeObject::GetErrorCorrectionLevel(void) const
69 if (__pQrCodeObjectImpl)
71 return __pQrCodeObjectImpl->GetErrorCorrectionLevel();
75 return Tizen::Uix::Vision::QR_CODE_ERROR_CORRECTION_LEVEL_L;
80 QrCodeObject::GetText(void) const
82 if (__pQrCodeObjectImpl)
84 return __pQrCodeObjectImpl->GetText();
88 return Tizen::Base::String("");
92 const Tizen::Graphics::FloatMatrix4*
93 QrCodeObject::GetTransformMatrix(void) const
95 if (__pQrCodeObjectImpl)
97 return __pQrCodeObjectImpl->GetTransformMatrix();
104 const Tizen::Base::Collection::IListT<Tizen::Graphics::FloatPoint>*
105 QrCodeObject::GetRectangle(void) const
107 if (__pQrCodeObjectImpl)
109 return __pQrCodeObjectImpl->GetRectangle();
118 QrCodeObject::Equals(const Object& obj) const
120 return (static_cast<const Object*>(this) == &obj);
124 QrCodeObject::GetHashCode(void) const
126 return (int)__pQrCodeObjectImpl;
129 } } } //Tizen::Uix::Vision