Update copyright year to 2015 for public api: toolkit
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / builder / builder.cpp
1 /*
2  * Copyright (c) 2015 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 "builder.h"
21
22 // EXTERNAL INCLUDES
23
24 // INTERNAL INCLUDES
25
26 #include <dali-toolkit/internal/builder/builder-impl.h>
27
28 namespace Dali
29 {
30
31 namespace Toolkit
32 {
33
34 Builder::Builder()
35 {
36 }
37
38 Builder::~Builder()
39 {
40 }
41
42 Builder Builder::New(void)
43 {
44   return Builder(new Internal::Builder());
45 }
46
47 Builder::Builder(Internal::Builder *impl)
48   : BaseHandle(impl)
49 {
50 }
51
52 void Builder::LoadFromString( const std::string &data, UIFormat rep )
53 {
54   GetImpl(*this).LoadFromString( data );
55 }
56
57 void Builder::AddConstants( const Property::Map& map )
58 {
59   GetImpl(*this).AddConstants( map );
60 }
61
62 void Builder::AddConstant( const std::string& key, const Property::Value& value )
63 {
64   GetImpl(*this).AddConstant( key, value );
65 }
66
67 const Property::Map& Builder::GetConstants() const
68 {
69   return GetImpl(*this).GetConstants();
70 }
71
72 const Property::Value& Builder::GetConstant( const std::string& key ) const
73 {
74   return GetImpl(*this).GetConstant( key );
75 }
76
77 Animation Builder::CreateAnimation( const std::string& animationName )
78 {
79   return GetImpl(*this).CreateAnimation( animationName );
80 }
81
82 Animation Builder::CreateAnimation( const std::string& animationName, const Property::Map& map )
83 {
84   return GetImpl(*this).CreateAnimation( animationName, map );
85 }
86
87 Animation Builder::CreateAnimation( const std::string& animationName, Dali::Actor sourceActor )
88 {
89   return GetImpl(*this).CreateAnimation( animationName, sourceActor );
90 }
91
92 Animation Builder::CreateAnimation( const std::string& animationName, const Property::Map& map, Dali::Actor sourceActor )
93 {
94   return GetImpl(*this).CreateAnimation( animationName, map, sourceActor );
95 }
96
97 BaseHandle Builder::Create( const std::string& templateName )
98 {
99   return GetImpl(*this).Create( templateName );
100 }
101
102 BaseHandle Builder::Create( const std::string& templateName, const Property::Map& map )
103 {
104   return GetImpl(*this).Create( templateName, map );
105 }
106
107 BaseHandle Builder::CreateFromJson( const std::string& json )
108 {
109   return GetImpl(*this).CreateFromJson( json );
110 }
111
112 bool Builder::ApplyStyle( const std::string& styleName, Handle& handle )
113 {
114   return GetImpl(*this).ApplyStyle( styleName, handle );
115 }
116
117 bool Builder::ApplyFromJson( Handle& handle, const std::string& json )
118 {
119   return GetImpl(*this).ApplyFromJson( handle, json );
120 }
121
122 void Builder::AddActors( Actor toActor )
123 {
124   GetImpl(*this).AddActors( toActor );
125 }
126
127 void Builder::AddActors( const std::string &sectionName, Actor toActor )
128 {
129   GetImpl(*this).AddActors( sectionName, toActor );
130 }
131
132 void Builder::CreateRenderTask( const std::string &name )
133 {
134   GetImpl(*this).CreateRenderTask( name );
135 }
136
137 ShaderEffect Builder::GetShaderEffect( const std::string &name )
138 {
139   return GetImpl(*this).GetShaderEffect( name );
140 }
141
142 FrameBufferImage Builder::GetFrameBufferImage( const std::string &name )
143 {
144   return GetImpl(*this).GetFrameBufferImage( name );
145 }
146
147 Path Builder::GetPath( const std::string &name )
148 {
149   return GetImpl(*this).GetPath( name );
150 }
151
152 Builder::BuilderSignalType& Builder::QuitSignal()
153 {
154   return GetImpl( *this ).QuitSignal();
155 }
156
157 } // namespace Toolkit
158
159 } // namespace Dali
160