[dali_2.3.19] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / control-wrapper.cpp
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali-toolkit/devel-api/controls/control-wrapper.h>
20
21 // INTERNAL INCLUDES
22 #include <dali-toolkit/devel-api/controls/control-wrapper-impl.h>
23
24 namespace Dali
25 {
26
27 namespace Toolkit
28 {
29
30 ///////////////////////////////////////////////////////////////////////////////////////////////////
31 // ControlWrapper
32 ///////////////////////////////////////////////////////////////////////////////////////////////////
33
34 ControlWrapper ControlWrapper::New( const std::string& typeName, Internal::ControlWrapper& implementation )
35 {
36   return Internal::ControlWrapper::New( typeName, &implementation );
37 }
38
39 ControlWrapper::ControlWrapper()
40 {
41 }
42
43 ControlWrapper::ControlWrapper( const ControlWrapper& handle )
44 : Control( handle )
45 {
46 }
47
48 ControlWrapper& ControlWrapper::operator=( const ControlWrapper& handle )
49 {
50   if( &handle != this )
51   {
52     Control::operator=( handle );
53   }
54   return *this;
55 }
56
57 ControlWrapper::ControlWrapper( Internal::ControlWrapper& implementation )
58 : Control( implementation )
59 {
60 }
61
62 ControlWrapper::ControlWrapper( Dali::Internal::CustomActor* internal )
63 : Control( internal )
64 {
65   VerifyCustomActorPointer<Internal::ControlWrapper>( internal );
66 }
67
68 ControlWrapper::~ControlWrapper()
69 {
70 }
71
72 ControlWrapper ControlWrapper::DownCast( BaseHandle handle )
73 {
74   return Control::DownCast<ControlWrapper, Internal::ControlWrapper>( handle );
75 }
76
77 } // namespace Toolkit
78
79 } // namespace Dali