DALi Version 1.0.38
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / builder / builder.cpp
index aed1cbe..38c5475 100644 (file)
@@ -1,18 +1,19 @@
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 
 // CLASS HEADER
 
@@ -53,7 +54,7 @@ void Builder::LoadFromString( const std::string &data, UIFormat rep )
   GetImpl(*this).LoadFromString( data );
 }
 
-void Builder::AddConstants( const PropertyValueMap& map )
+void Builder::AddConstants( const Property::Map& map )
 {
   GetImpl(*this).AddConstants( map );
 }
@@ -63,7 +64,7 @@ void Builder::AddConstant( const std::string& key, const Property::Value& value
   GetImpl(*this).AddConstant( key, value );
 }
 
-const PropertyValueMap& Builder::GetConstants() const
+const Property::Map& Builder::GetConstants() const
 {
   return GetImpl(*this).GetConstants();
 }
@@ -78,7 +79,7 @@ Animation Builder::CreateAnimation( const std::string& animationName )
   return GetImpl(*this).CreateAnimation( animationName );
 }
 
-Animation Builder::CreateAnimation( const std::string& animationName, const PropertyValueMap& map )
+Animation Builder::CreateAnimation( const std::string& animationName, const Property::Map& map )
 {
   return GetImpl(*this).CreateAnimation( animationName, map );
 }
@@ -88,34 +89,34 @@ Animation Builder::CreateAnimation( const std::string& animationName, Dali::Acto
   return GetImpl(*this).CreateAnimation( animationName, sourceActor );
 }
 
-Animation Builder::CreateAnimation( const std::string& animationName, const PropertyValueMap& map, Dali::Actor sourceActor )
+Animation Builder::CreateAnimation( const std::string& animationName, const Property::Map& map, Dali::Actor sourceActor )
 {
   return GetImpl(*this).CreateAnimation( animationName, map, sourceActor );
 }
 
-BaseHandle Builder::CreateFromStyle( const std::string& styleName )
+BaseHandle Builder::Create( const std::string& templateName )
 {
-  return BaseHandle();
+  return GetImpl(*this).Create( templateName );
 }
 
-BaseHandle Builder::CreateFromStyle( const std::string& styleName, const PropertyValueMap& map )
+BaseHandle Builder::Create( const std::string& templateName, const Property::Map& map )
 {
-  return BaseHandle();
+  return GetImpl(*this).Create( templateName, map );
 }
 
-BaseHandle Builder::Create( const std::string& templateName )
+BaseHandle Builder::CreateFromJson( const std::string& json )
 {
-  return GetImpl(*this).Create( templateName );
+  return GetImpl(*this).CreateFromJson( json );
 }
 
-BaseHandle Builder::Create( const std::string& templateName, const PropertyValueMap& map )
+bool Builder::ApplyStyle( const std::string& styleName, Handle& handle )
 {
-  return GetImpl(*this).Create( templateName, map );
+  return GetImpl(*this).ApplyStyle( styleName, handle );
 }
 
-void Builder::ApplyStyle( const std::string& styleName, Handle& handle )
+bool Builder::ApplyFromJson( Handle& handle, const std::string& json )
 {
-  GetImpl(*this).ApplyStyle( styleName, handle );
+  return GetImpl(*this).ApplyFromJson( handle, json );
 }
 
 void Builder::AddActors( Actor toActor )
@@ -128,31 +129,6 @@ void Builder::AddActors( const std::string &sectionName, Actor toActor )
   GetImpl(*this).AddActors( sectionName, toActor );
 }
 
-Font Builder::GetFont( const std::string &name ) const
-{
-  return GetImpl(*this).GetFont( name );
-}
-
-TextStyle Builder::GetTextStyle( const std::string &name ) const
-{
-  return GetImpl(*this).GetTextStyle( name );
-}
-
-Image Builder::GetImage( const std::string &name ) const
-{
-  return GetImpl(*this).GetImage( name );
-}
-
-Actor Builder::GetActor( const std::string &name ) const
-{
-  return GetImpl(*this).GetActor( name );
-}
-
-Animation Builder::GetAnimation( const std::string &name ) const
-{
-  return GetImpl(*this).GetAnimation( name );
-}
-
 void Builder::CreateRenderTask( const std::string &name )
 {
   GetImpl(*this).CreateRenderTask( name );
@@ -168,9 +144,14 @@ FrameBufferImage Builder::GetFrameBufferImage( const std::string &name )
   return GetImpl(*this).GetFrameBufferImage( name );
 }
 
-ActorContainer Builder::GetTopLevelActors( void ) const
+Path Builder::GetPath( const std::string &name )
+{
+  return GetImpl(*this).GetPath( name );
+}
+
+Builder::BuilderSignalType& Builder::QuitSignal()
 {
-  return GetImpl(*this).GetTopLevelActors();
+  return GetImpl( *this ).QuitSignal();
 }
 
 } // namespace Toolkit