Removal of PropertyValueMap, using Property::Map instead 46/29046/4
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Mon, 20 Oct 2014 15:21:46 +0000 (16:21 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 21 Oct 2014 12:47:46 +0000 (13:47 +0100)
Change-Id: Id40f9cae99fd47fe5e35ffc27c092ac3ad97ef10

automated-tests/src/dali-toolkit/utc-Dali-Control.cpp
base/dali-toolkit/internal/builder/builder-impl.cpp
base/dali-toolkit/internal/builder/builder-impl.h
base/dali-toolkit/internal/builder/replacement.cpp
base/dali-toolkit/internal/builder/replacement.h
base/dali-toolkit/internal/styling/style-manager-impl.cpp
base/dali-toolkit/internal/styling/style-manager-impl.h
base/dali-toolkit/public-api/builder/builder.cpp
base/dali-toolkit/public-api/builder/builder.h
base/dali-toolkit/public-api/controls/control-impl.cpp

index f1d1e16..c58bb83 100644 (file)
@@ -414,7 +414,7 @@ int UtcDaliControlBackgroundProperties(void)
   DALI_TEST_CHECK( !control.GetBackgroundActor() );
   DALI_TEST_EQUALS( control.GetBackgroundColor(), Color::TRANSPARENT, TEST_LOCATION );
   DALI_TEST_EQUALS( control.GetProperty( Control::PROPERTY_BACKGROUND_COLOR ).Get< Vector4 >(), Color::TRANSPARENT, TEST_LOCATION );
-  DALI_TEST_CHECK( !control.GetProperty( Control::PROPERTY_BACKGROUND ).Get< Property::Map >().Count() );
+  DALI_TEST_CHECK( control.GetProperty( Control::PROPERTY_BACKGROUND ).Get< Property::Map >().Empty() );
 
   control.SetProperty( Control::PROPERTY_BACKGROUND_COLOR, Color::RED );
   DALI_TEST_CHECK( control.GetBackgroundActor() );
@@ -440,7 +440,7 @@ int UtcDaliControlBackgroundProperties(void)
   DALI_TEST_CHECK( !control.GetBackgroundActor() );
   DALI_TEST_EQUALS( control.GetBackgroundColor(), Color::TRANSPARENT, TEST_LOCATION );
   DALI_TEST_EQUALS( control.GetProperty( Control::PROPERTY_BACKGROUND_COLOR ).Get< Vector4 >(), Color::TRANSPARENT, TEST_LOCATION );
-  DALI_TEST_CHECK( !control.GetProperty( Control::PROPERTY_BACKGROUND ).Get< Property::Map >().Count() );
+  DALI_TEST_CHECK( control.GetProperty( Control::PROPERTY_BACKGROUND ).Get< Property::Map >().Empty() );
 
   END_TEST;
 }
index ab62c75..083e804 100644 (file)
@@ -766,7 +766,7 @@ void Builder::AddActors( const std::string &sectionName, Actor toActor )
 {
   DALI_ASSERT_ALWAYS(mParser.GetRoot() && "Builder script not loaded");
 
-  PropertyValueMap overrideMap;
+  Property::Map overrideMap;
   Replacement replacements(overrideMap, mReplacementMap);
 
   OptionalChild add = IsChild(*mParser.GetRoot(), sectionName);
@@ -824,13 +824,13 @@ Animation Builder::CreateAnimation( const std::string& animationName, const Repl
   return anim;
 }
 
-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 )
 {
   Replacement replacement(map, mReplacementMap);
   return CreateAnimation( animationName, replacement, sourceActor);
 }
 
-Animation Builder::CreateAnimation( const std::string& animationName, const PropertyValueMap& map )
+Animation Builder::CreateAnimation( const std::string& animationName, const Property::Map& map )
 {
   Replacement replacement(map, mReplacementMap);
   return CreateAnimation( animationName, replacement, Stage::GetCurrent().GetRootLayer() );
@@ -906,12 +906,9 @@ void Builder::LoadFromString( std::string const& data, Dali::Toolkit::Builder::U
 
 }
 
-void Builder::AddConstants( const PropertyValueMap& map )
+void Builder::AddConstants( const Property::Map& map )
 {
-  for(PropertyValueMap::const_iterator iter = map.begin(); iter != map.end(); ++iter)
-  {
-    mReplacementMap[ (*iter).first ] = (*iter).second;
-  }
+  mReplacementMap.Merge( map );
 }
 
 void Builder::AddConstant( const std::string& key, const Property::Value& value )
@@ -919,17 +916,17 @@ void Builder::AddConstant( const std::string& key, const Property::Value& value
   mReplacementMap[key] = value;
 }
 
-const PropertyValueMap& Builder::GetConstants() const
+const Property::Map& Builder::GetConstants() const
 {
   return mReplacementMap;
 }
 
 const Property::Value& Builder::GetConstant( const std::string& key ) const
 {
-  PropertyValueMap::const_iterator iter = mReplacementMap.find( key );
-  if( iter  != mReplacementMap.end() )
+  Property::Value* match = mReplacementMap.Find( key );
+  if( match )
   {
-    return (*iter).second;
+    return (*match);
   }
   else
   {
@@ -938,7 +935,7 @@ const Property::Value& Builder::GetConstant( const std::string& key ) const
   }
 }
 
-void Builder::LoadConstants( const TreeNode& root, PropertyValueMap& intoMap )
+void Builder::LoadConstants( const TreeNode& root, Property::Map& intoMap )
 {
   Replacement replacer(intoMap);
 
@@ -967,10 +964,10 @@ void Builder::LoadConstants( const TreeNode& root, PropertyValueMap& intoMap )
   }
 
 #if defined(DEBUG_ENABLED)
-  PropertyValueMap::const_iterator iter = intoMap.find( "CONFIG_SCRIPT_LOG_LEVEL" );
-  if( iter != intoMap.end() && (*iter).second.GetType() == Property::STRING )
+  Property::Value* iter = intoMap.Find( "CONFIG_SCRIPT_LOG_LEVEL" );
+  if( iter && iter->GetType() == Property::STRING )
   {
-    std::string logLevel( (*iter).second.Get< std::string >() );
+    std::string logLevel( iter->Get< std::string >() );
     if( logLevel == "NoLogging" )
     {
       gFilterScript->SetLogLevel( Integration::Log::NoLogging );
@@ -1016,7 +1013,7 @@ bool Builder::ApplyStyle( const std::string& styleName, Handle& handle, const Re
   }
 }
 
-BaseHandle Builder::Create( const std::string& templateName, const PropertyValueMap& map )
+BaseHandle Builder::Create( const std::string& templateName, const Property::Map& map )
 {
   Replacement replacement( map, mReplacementMap );
   return Create( templateName, replacement );
index e82ed93..5efb772 100644 (file)
@@ -81,7 +81,7 @@ public:
   /**
    * @copydoc Toolkit::Builder::AddConstants
    */
-  void AddConstants( const PropertyValueMap& map );
+  void AddConstants( const Property::Map& map );
 
   /**
    * @copydoc Toolkit::Builder::AddConstant
@@ -91,7 +91,7 @@ public:
   /**
    * @copydoc Toolkit::Builder::GetConstants
    */
-  const PropertyValueMap& GetConstants() const;
+  const Property::Map& GetConstants() const;
 
   /**
    * @copydoc Toolkit::Builder::GetConstant
@@ -104,9 +104,9 @@ public:
   Animation CreateAnimation( const std::string& animationName );
 
   /**
-   * @copydoc Toolkit::Builder::CreateAnimation( const std::string& animationName, const PropertyValueMap& map );
+   * @copydoc Toolkit::Builder::CreateAnimation( const std::string& animationName, const Property::Map& map );
    */
-  Animation CreateAnimation( const std::string& animationName, const PropertyValueMap& map );
+  Animation CreateAnimation( const std::string& animationName, const Property::Map& map );
 
   /**
    * @copydoc Toolkit::Builder::CreateAnimation( const std::string&,Dali::Actor);
@@ -114,9 +114,9 @@ public:
   Animation CreateAnimation( const std::string& animationName, Dali::Actor sourceActor );
 
   /**
-   * @copydoc Toolkit::Builder::CreateAnimation( const std::string&,const PropertyValueMap&,Dali::Actor);
+   * @copydoc Toolkit::Builder::CreateAnimation( const std::string&,const Property::Map&, Dali::Actor);
    */
-  Animation CreateAnimation( const std::string& animationName, const PropertyValueMap& map, Dali::Actor sourceActor );
+  Animation CreateAnimation( const std::string& animationName, const Property::Map& map, Dali::Actor sourceActor );
 
   /**
    * @copydoc Toolkit::Builder::Create( const std::string& templateName );
@@ -124,9 +124,9 @@ public:
   BaseHandle Create( const std::string& templateName );
 
   /**
-   * @copydoc Toolkit::Builder::Create( const std::string& templateName, const PropertyValueMap& map );
+   * @copydoc Toolkit::Builder::Create( const std::string& templateName, const Property::Map& map );
    */
-  BaseHandle Create( const std::string& templateName, const PropertyValueMap& map );
+  BaseHandle Create( const std::string& templateName, const Property::Map& map );
 
   /**
    * @copydoc Toolkit::Builder::CreateFromJson( const std::string& json );
@@ -210,13 +210,13 @@ private:
 
   SlotDelegate<Builder> mSlotDelegate;
 
-  PropertyValueMap mReplacementMap;
+  Property::Map mReplacementMap;
 
   BaseHandle Create( const std::string& templateName, const Replacement& constant );
 
   BaseHandle DoCreate( const TreeNode& root, const TreeNode& node, Actor parent, const Replacement& replacements );
 
-  void LoadConstants( const TreeNode& root, PropertyValueMap& intoMap );
+  void LoadConstants( const TreeNode& root, Property::Map& intoMap );
 
   void LoadIncludes( const std::string& data );
 
index 259cb87..7dc7818 100644 (file)
@@ -32,31 +32,16 @@ namespace Internal
 namespace  // anon
 {
 
-PropertyValueMap::const_iterator FindReplacement( const std::string &str,
-                                                const PropertyValueMap& overrideMap, const PropertyValueMap& defaultMap )
+Property::Value* FindReplacement( const std::string &str, const Property::Map& overrideMap, const Property::Map& defaultMap )
 {
-  PropertyValueMap::const_iterator ret  = defaultMap.end();
+  Property::Value* ret  = overrideMap.Find( str );
 
-  PropertyValueMap::const_iterator iter = overrideMap.find( str );
-
-  if( iter != overrideMap.end() )
-  {
-    ret = iter;
-  }
-  else
+  if ( !ret )
   {
-    PropertyValueMap::const_iterator iter = defaultMap.find( str );
+    ret = defaultMap.Find( str );
 
-    if( iter != defaultMap.end() )
-    {
-      ret = iter;
-    }
-    else
-    {
-      // @ todo
-      // try localized text ie dgettext. Look for colon  {DOMAIN:TEXT} {LC_MESSAGE:ID_XXXX}
-
-    }
+    // @ todo
+    // try localized text ie dgettext. Look for colon  {DOMAIN:TEXT} {LC_MESSAGE:ID_XXXX}
   }
 
   return ret;
@@ -114,7 +99,7 @@ bool GetSubstitutionPosition( const std::string &initialValue, std::size_t &star
 }
 
 bool ResolvePartialReplacement( const std::string &initialValue, Property::Value &out,
-                                const PropertyValueMap& overrideMap, const PropertyValueMap& defaultMap )
+                                const Property::Map& overrideMap, const Property::Map& defaultMap )
 {
 
   if( initialValue.size() >= 2 )
@@ -135,15 +120,15 @@ bool ResolvePartialReplacement( const std::string &initialValue, Property::Value
     {
       const std::string str( initialValue.substr( startPos, size ) );
 
-      PropertyValueMap::const_iterator iter = FindReplacement( str, overrideMap, defaultMap );
+      Property::Value* value = FindReplacement( str, overrideMap, defaultMap );
 
-      if( iter == defaultMap.end() )
+      if( !value )
       {
         DALI_SCRIPT_WARNING( "Cannot find replacement for '%s'\n", str.c_str() );
       }
       else
       {
-        if( Property::STRING != (*iter).second.GetType() )
+        if( Property::STRING != value->GetType() )
         {
           DALI_SCRIPT_WARNING( "Cannot replace substring in non string property type='%s'. Initial value '%s'\n",
                                PropertyTypes::GetName( out.GetType() ), initialValue.c_str() );
@@ -152,7 +137,7 @@ bool ResolvePartialReplacement( const std::string &initialValue, Property::Value
         {
           std::string newString = \
             initialValue.substr(0, startPos - 1) +
-            (*iter).second.Get<std::string>() +
+            value->Get< std::string >() +
             initialValue.substr( startPos + size + 1 );
 
           return ResolvePartialReplacement( newString, out, overrideMap,  defaultMap );
@@ -168,7 +153,7 @@ bool ResolvePartialReplacement( const std::string &initialValue, Property::Value
 } // namespace anon
 
 
-Replacement::Replacement( const PropertyValueMap& overrideMap, const PropertyValueMap& defaultMap )
+Replacement::Replacement( const Property::Map& overrideMap, const Property::Map& defaultMap )
   : mOverrideMap( &overrideMap ), mDefaultMap( &defaultMap )
 {
 
@@ -176,10 +161,10 @@ Replacement::Replacement( const PropertyValueMap& overrideMap, const PropertyVal
 
 namespace
 {
-PropertyValueMap noMap;
+Property::Map noMap;
 }
 
-Replacement::Replacement( const PropertyValueMap& defaultMap )
+Replacement::Replacement( const Property::Map& defaultMap )
   : mOverrideMap( &noMap ), mDefaultMap( &defaultMap )
 {
 
@@ -195,7 +180,7 @@ OptionalString Replacement::HasFullReplacement( const TreeNode & node ) const
 {
   OptionalString ret;
 
-  if( node.HasSubstitution() && ((*mOverrideMap).size() || (*mDefaultMap).size()) )
+  if( node.HasSubstitution() && ((*mOverrideMap).Count() || (*mDefaultMap).Count()) )
   {
     OptionalString v = ::IsString( node );
     if( v )
@@ -216,15 +201,15 @@ Property::Value Replacement::GetFullReplacement( const std::string& replacementS
   DALI_ASSERT_DEBUG( mOverrideMap && "missing map");
   DALI_ASSERT_DEBUG( mDefaultMap && "missing map");
 
-  PropertyValueMap::const_iterator iter = FindReplacement( replacementString, *mOverrideMap, *mDefaultMap );
+  Property::Value* value = FindReplacement( replacementString, *mOverrideMap, *mDefaultMap );
 
-  if( iter == (*mDefaultMap).end() )
+  if( !value )
   {
     DALI_SCRIPT_WARNING("Cannot find replacement for '%s'\n", replacementString.c_str());
   }
   else
   {
-    out = (*iter).second;
+    out = *value;
 #if defined(DEBUG_ENABLED)
     DALI_SCRIPT_VERBOSE("  Full replacement for '%s' => to Type '%s'\n",
                         replacementString.c_str(),
@@ -265,45 +250,6 @@ OptionalBoolean Replacement::IsBoolean( OptionalChild child ) const
   }
 }
 
-// template <typename T, OptionalValue<T> (*ISTYPE)( const TreeNode& node ), Property::Type TYPE>
-// OptionalValue<T> IsOfType( const TreeNode& node, const PropertyValueMap& overrideMap, const PropertyValueMap& defaultMap )
-// {
-//   OptionalValue<T> ret;
-//   if( OptionalString replace = HasFullReplacement( node, overrideMap, defaultMap ) )
-//   {
-//     Property::Value value = GetFullReplacement( *replace, overrideMap, defaultMap );
-//     if( TYPE == value.GetType() )
-//     {
-//       ret = value.Get<T>();
-//     }
-//   }
-//   else
-//   {
-//     ret = ISTYPE( node );
-//   }
-//   return ret;
-
-// }
-
-// OptionalFloat Replacement::IsFloat( const TreeNode & node ) const
-// {
-//   return IsOfType<float, ::IsFloat, Property::FLOAT>( node, *mOverrideMap, *mDefaultMap );
-//   /* OptionalFloat ret; */
-//   /* if( OptionalString replace = HasFullReplacement( node ) ) */
-//   /* { */
-//   /*   Property::Value value = GetFullReplacement( replace ); */
-//   /*   if( Property::FLOAT == value.GetType() ) */
-//   /*   { */
-//   /*     ret = value.Get<float>(); */
-//   /*   } */
-//   /* } */
-//   /* else */
-//   /* { */
-//   /*   ret = IsFloat( node ); */
-//   /* } */
-//   /* return ret; */
-// }
-
 OptionalFloat Replacement::IsFloat( const TreeNode & node ) const
 {
   OptionalFloat ret;
@@ -329,7 +275,7 @@ OptionalString Replacement::IsString( const TreeNode& node ) const
   DALI_ASSERT_DEBUG( mOverrideMap && "missing map");
   DALI_ASSERT_DEBUG( mDefaultMap && "missing map");
 
-  if( node.HasSubstitution() && ((*mOverrideMap).size() || (*mDefaultMap).size()) )
+  if( node.HasSubstitution() && ((*mOverrideMap).Count() || (*mDefaultMap).Count()) )
   {
     if( OptionalString v = ::IsString( node ) )
     {
index 71e55d0..0b54942 100644 (file)
@@ -56,7 +56,7 @@ public:
    * @param overrideMap The user overriding map
    * @param defaultMap The default map to use
    */
-  Replacement( const PropertyValueMap& overrideMap, const PropertyValueMap& defaultMap );
+  Replacement( const Property::Map& overrideMap, const Property::Map& defaultMap );
 
   /*
    * Constructor with default map
@@ -64,7 +64,7 @@ public:
    * Make a deep copy of the tree.
    * @param overrideMap The user overriding map
    */
-  Replacement( const PropertyValueMap& defaultMap );
+  Replacement( const Property::Map& defaultMap );
 
   /* @brief Check node for a type
    *
@@ -229,10 +229,10 @@ public:
 
 private:
   // Overriding map (overrides the default map). The map is not owned.
-  const PropertyValueMap* const mOverrideMap;
+  const Property::Map* const mOverrideMap;
 
-  // Defautl map. The map is not owned.
-  const PropertyValueMap* const mDefaultMap;
+  // Default map. The map is not owned.
+  const Property::Map* const mDefaultMap;
 
   // compiler
   // Replacement & operation=( Replacement& replacement );
index 0e43c19..9e5b6a1 100644 (file)
@@ -73,18 +73,6 @@ BaseHandle Create()
 }
 TypeRegistration STYLE_MANAGER_TYPE( typeid(Dali::Toolkit::StyleManager), typeid(Dali::BaseHandle), Create, true /* Create instance at startup */ );
 
-/**
- * Merge two maps into one
- */
-void MergeMaps( const PropertyValueMap& a, const PropertyValueMap& b, PropertyValueMap& out )
-{
-  out = a;
-  for( PropertyValueMap::const_iterator it = b.begin(), itEnd = b.end(); it != itEnd; ++it )
-  {
-    out[ it->first ] = it->second;
-  }
-}
-
 } // namespace
 
 Toolkit::StyleManager StyleManager::Get()
@@ -168,10 +156,10 @@ void StyleManager::SetStyleConstant( const std::string& key, const Property::Val
 
 bool StyleManager::GetStyleConstant( const std::string& key, Property::Value& valueOut )
 {
-  Toolkit::PropertyValueMap::iterator valueIt = mStyleBuilderConstants.find( key );
-  if( valueIt != mStyleBuilderConstants.end() )
+  Property::Value* value = mStyleBuilderConstants.Find( key );
+  if( value )
   {
-    valueOut = valueIt->second;
+    valueOut = *value;
     return true;
   }
 
@@ -186,7 +174,7 @@ void StyleManager::OnOrientationChanged( Orientation orientation )
   SetTheme();
 }
 
-Toolkit::Builder StyleManager::CreateBuilder( const PropertyValueMap& constants )
+Toolkit::Builder StyleManager::CreateBuilder( const Property::Map& constants )
 {
   Toolkit::Builder builder = Toolkit::Builder::New();
   builder.AddConstants( constants );
@@ -297,8 +285,8 @@ void StyleManager::ApplyStyle( Toolkit::Control control, const std::string& json
   else
   {
     // Merge theme and style constants
-    PropertyValueMap constants;
-    MergeMaps( mThemeBuilderConstants, mStyleBuilderConstants, constants );
+    Property::Map constants( mThemeBuilderConstants );
+    constants.Merge( mStyleBuilderConstants );
 
     // Create it
     builder = CreateBuilder( constants );
index 6e10e04..09a6d93 100644 (file)
@@ -20,9 +20,9 @@
 // EXTERNAL INCLUDES
 #include <string>
 #include <list>
+#include <dali/public-api/common/map-wrapper.h>
 
 // INTERNAL INCLUDES
-
 #include <dali/dali.h>
 #include <dali-toolkit/public-api/styling/style-manager.h>
 #include <dali-toolkit/public-api/builder/builder.h>
@@ -155,7 +155,7 @@ private:
    *
    * @return Return the newly created builder
    */
-  Toolkit::Builder CreateBuilder( const PropertyValueMap& constants );
+  Toolkit::Builder CreateBuilder( const Property::Map& constants );
 
   /**
    * @brief Load a JSON file into given builder
@@ -240,8 +240,8 @@ private:
 
   std::string mThemeFile;             ///< The full path of the current theme file
 
-  Toolkit::PropertyValueMap mThemeBuilderConstants;   ///< Contants to give the theme builder
-  Toolkit::PropertyValueMap mStyleBuilderConstants;   ///< Constants specific to building styles
+  Property::Map mThemeBuilderConstants;   ///< Contants to give the theme builder
+  Property::Map mStyleBuilderConstants;   ///< Constants specific to building styles
 
   BuilderMap mBuilderCache;           ///< Cache of builders keyed by JSON file name
 
index fbf4223..3f531a3 100644 (file)
@@ -54,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 );
 }
@@ -64,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();
 }
@@ -79,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 );
 }
@@ -89,7 +89,7 @@ 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 );
 }
@@ -99,7 +99,7 @@ BaseHandle Builder::Create( const std::string& templateName )
   return GetImpl(*this).Create( templateName );
 }
 
-BaseHandle Builder::Create( const std::string& templateName, const PropertyValueMap& map )
+BaseHandle Builder::Create( const std::string& templateName, const Property::Map& map )
 {
   return GetImpl(*this).Create( templateName, map );
 }
index e9c684c..d703749 100644 (file)
@@ -20,7 +20,6 @@
 
 // EXTERNAL INCLUDES
 #include <dali/dali.h>
-#include <dali/public-api/common/map-wrapper.h>
 
 namespace Dali DALI_IMPORT_API
 {
@@ -33,8 +32,6 @@ namespace Internal DALI_INTERNAL
 class Builder;
 }
 
-typedef std::map<std::string, Property::Value> PropertyValueMap;
-
 /**
  * This class provides the ability to load and style an actor tree from a string representation.
  *
@@ -162,14 +159,14 @@ class Builder : public BaseHandle
    * @brief Adds user defined constants to all future style template or animation expansions
    *
    * e.g.
-   *   PropertyValueMap map;
+   *   Property::Map map;
    *   map["IMAGE_DIRECTORY"] = "/usr/share/images";
    *   builder.AddConstants( map );
    *
    * @pre The Builder has been initialized.
    * @param map The user defined constants used in template expansions.
    */
-  void AddConstants( const PropertyValueMap& map );
+  void AddConstants( const Property::Map& map );
 
   /**
    * @brief Adds or modifies a user defined constant to all future style template or animation expansions
@@ -190,7 +187,7 @@ class Builder : public BaseHandle
    *
    * e.g.
    * @code
-   * PropertyValueMap map = builder.GetConstants(); // get copy of current constants
+   * Property::Map map = builder.GetConstants(); // get copy of current constants
    * map["IMAGE_DIRECTORY"] = "/usr/share/images";  // make modification
    * builder.AddConstants( map );                   // write back changes
    * @endcode
@@ -198,14 +195,14 @@ class Builder : public BaseHandle
    * @pre The Builder has been initialized.
    * @return A reference to the currently defined constants.
    */
-  const PropertyValueMap& GetConstants() const;
+  const Property::Map& GetConstants() const;
 
   /**
    * @brief Gets a currently defined constant, or returns Property::INVALID
    *
    * e.g.
    * @code
-   * PropertyValueMap map = builder.GetConstants(); // get copy of current constants
+   * Property::Map map = builder.GetConstants(); // get copy of current constants
    * map["IMAGE_DIRECTORY"] = "/usr/share/images";  // make modification
    * builder.AddConstants( map );                   // write back changes
    * @endcode
@@ -232,7 +229,7 @@ class Builder : public BaseHandle
    * @brief Creates an animation from the set of known animations with user defined constants
    *
    * e.g.
-   *   PropertyValueMap map;
+   *   Property::Map map;
    *   map["ACTOR"] = actor.GetName();       // replaces '{ACTOR} in the template
    *   Animation a = builder.CreateAnimation( "wobble");
    *
@@ -244,7 +241,7 @@ class Builder : public BaseHandle
    * @param map The user defined constants used in style template expansion.
    * @returns The base handle of the created object
    */
-  Animation CreateAnimation( const std::string& animationName, const PropertyValueMap& map );
+  Animation CreateAnimation( const std::string& animationName, const Property::Map& map );
 
   /**
    * @brief Creates an animation from the set of known animations.
@@ -268,7 +265,7 @@ class Builder : public BaseHandle
    *
    * The animation is applied to a specific actor.
    * e.g.
-   *   PropertyValueMap map;
+   *   Property::Map map;
    *   map["ACTOR"] = actor.GetName();       // replaces '{ACTOR} in the template
    *   Actor myInstance = builder.Create( "template-actor-tree" )
    *   Animation a = builder.CreateAnimation( "wobble", myInstance);
@@ -282,7 +279,7 @@ class Builder : public BaseHandle
    * @param sourceActor The starting point in an actor tree, from which to look for property owners
    * @returns The base handle of the created object
    */
-  Animation CreateAnimation( const std::string& animationName, const PropertyValueMap& map, Dali::Actor sourceActor );
+  Animation CreateAnimation( const std::string& animationName, const Property::Map& map, Dali::Actor sourceActor );
 
   /**
    * @brief Creates an object (e.g. an actor) from the set of known style templates
@@ -303,7 +300,7 @@ class Builder : public BaseHandle
    * @brief Creates an object from the style templates with user defined constants
    *
    * e.g.
-   *   PropertyValueMap map;
+   *   Property::Map map;
    *   map["IMAGE_DIR"] = "/usr/share/images"; // replaces '{IMAGE_DIR} in the template
    *   mActor.Add( Actor::DownCast(builder.Create( "default-image", map) ) );
    *
@@ -315,7 +312,7 @@ class Builder : public BaseHandle
    * @param map The user defined constants used in template expansion.
    * @returns The base handle of the created object
    */
-  BaseHandle Create( const std::string& templateName, const PropertyValueMap& map );
+  BaseHandle Create( const std::string& templateName, const Property::Map& map );
 
   /**
    * @brief Creates an object (e.g. an actor) from given json snippet
index de46873..35f68c4 100644 (file)
@@ -336,7 +336,7 @@ public:
               controlImpl.SetBackground( image );
             }
           }
-          else if ( ! value.Get< Property::Map >().Count() )
+          else if ( value.Get< Property::Map >().Empty() )
           {
             // An empty map means the background is no longer required
             controlImpl.ClearBackground();