Add move semantics to common and base Toolkit classes
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / model3d-view / model3d-view.cpp
1 /*
2  * Copyright (c) 2020 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
20 #include <dali-toolkit/public-api/controls/model3d-view/model3d-view.h>
21
22 // INTERNAL INCLUDES
23 #include <dali-toolkit/internal/controls/model3d-view/model3d-view-impl.h>
24
25 // EXTERNAL INCLUDES
26
27 namespace Dali
28 {
29
30 namespace Toolkit
31 {
32
33 Model3dView::Model3dView()
34 {}
35
36 Model3dView::Model3dView( const Model3dView& model3dView ) = default;
37
38 Model3dView::Model3dView( Model3dView&& rhs ) = default;
39
40 Model3dView& Model3dView::operator=( const Model3dView& model3dView ) = default;
41
42 Model3dView& Model3dView::operator=( Model3dView&& rhs ) = default;
43
44 Model3dView::~Model3dView()
45 {
46 }
47
48 Model3dView Model3dView::New()
49 {
50   return Internal::Model3dView::New();
51 }
52
53 Model3dView Model3dView::New( const std::string& objUrl, const std::string& mtlUrl, const std::string& imagesUrl )
54 {
55   Model3dView model3dView = Internal::Model3dView::New();
56   model3dView.SetProperty( Model3dView::Property::GEOMETRY_URL, Dali::Property::Value( objUrl ) );
57   model3dView.SetProperty( Model3dView::Property::MATERIAL_URL, Dali::Property::Value( mtlUrl ) );
58   model3dView.SetProperty( Model3dView::Property::IMAGES_URL, Dali::Property::Value( imagesUrl ) );
59
60   return model3dView;
61 }
62
63 Model3dView Model3dView::DownCast( BaseHandle handle )
64 {
65   return Control::DownCast<Model3dView, Internal::Model3dView>(handle);
66 }
67
68 Model3dView::Model3dView( Internal::Model3dView& implementation )
69  : Control( implementation )
70 {
71 }
72
73 Model3dView::Model3dView( Dali::Internal::CustomActor* internal )
74  : Control( internal )
75 {
76   VerifyCustomActorPointer<Internal::Model3dView>( internal );
77 }
78
79 } // namespace Toolkit
80
81 } // namespace Dali