Builder templated constant expansion
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / builder / builder.cpp
1 //
2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 // CLASS HEADER
18
19 #include "builder.h"
20
21 // EXTERNAL INCLUDES
22
23 // INTERNAL INCLUDES
24
25 #include <dali-toolkit/internal/builder/builder-impl.h>
26
27 namespace Dali
28 {
29
30 namespace Toolkit
31 {
32
33 Builder::Builder()
34 {
35 }
36
37 Builder::~Builder()
38 {
39 }
40
41 Builder Builder::New(void)
42 {
43   return Builder(new Internal::Builder());
44 }
45
46 Builder::Builder(Internal::Builder *impl)
47   : BaseHandle(impl)
48 {
49 }
50
51 void Builder::LoadFromString( const std::string &data, UIFormat rep )
52 {
53   GetImpl(*this).LoadFromString( data );
54 }
55
56 void Builder::AddConstants( const PropertyValueMap& map )
57 {
58   GetImpl(*this).AddConstants( map );
59 }
60
61 Animation Builder::CreateAnimation( const std::string& animationName )
62 {
63   return GetImpl(*this).CreateAnimation( animationName );
64 }
65
66 Animation Builder::CreateAnimation( const std::string& animationName, const PropertyValueMap& map )
67 {
68   return GetImpl(*this).CreateAnimation( animationName, map );
69 }
70
71 BaseHandle Builder::CreateFromStyle( const std::string& styleName )
72 {
73   return GetImpl(*this).CreateFromStyle( styleName );
74 }
75
76 BaseHandle Builder::CreateFromStyle( const std::string& styleName, const PropertyValueMap& map )
77 {
78   return GetImpl(*this).CreateFromStyle( styleName, map );
79 }
80
81 void Builder::ApplyStyle( const std::string& styleName, Handle& handle )
82 {
83   GetImpl(*this).ApplyStyle( styleName, handle );
84 }
85
86 void Builder::AddActors( Actor toActor )
87 {
88   GetImpl(*this).AddActors( toActor );
89 }
90
91 void Builder::AddActors( const std::string &sectionName, Actor toActor )
92 {
93   GetImpl(*this).AddActors( sectionName, toActor );
94 }
95
96 Font Builder::GetFont( const std::string &name ) const
97 {
98   return GetImpl(*this).GetFont( name );
99 }
100
101 TextStyle Builder::GetTextStyle( const std::string &name ) const
102 {
103   return GetImpl(*this).GetTextStyle( name );
104 }
105
106 Image Builder::GetImage( const std::string &name ) const
107 {
108   return GetImpl(*this).GetImage( name );
109 }
110
111 Actor Builder::GetActor( const std::string &name ) const
112 {
113   return GetImpl(*this).GetActor( name );
114 }
115
116 Animation Builder::GetAnimation( const std::string &name ) const
117 {
118   return GetImpl(*this).GetAnimation( name );
119 }
120
121 void Builder::CreateRenderTask( const std::string &name )
122 {
123   GetImpl(*this).CreateRenderTask( name );
124 }
125
126 ShaderEffect Builder::GetShaderEffect( const std::string &name )
127 {
128   return GetImpl(*this).GetShaderEffect( name );
129 }
130
131 FrameBufferImage Builder::GetFrameBufferImage( const std::string &name )
132 {
133   return GetImpl(*this).GetFrameBufferImage( name );
134 }
135
136 ActorContainer Builder::GetTopLevelActors( void ) const
137 {
138   return GetImpl(*this).GetTopLevelActors();
139 }
140
141 } // namespace Toolkit
142
143 } // namespace Dali
144