From 369b403594ce781e6b937f598f3fb04ee1e3695b Mon Sep 17 00:00:00 2001 From: Kimmo Hoikka Date: Wed, 12 Nov 2014 13:30:24 +0000 Subject: [PATCH] Cleaning up property public API [Problem] [Cause] [Solution] Change-Id: Ia2748d13d3bba9f3a132e4e8bec57eb3707c92a7 --- dali/public-api/object/property-map.cpp | 4 ++-- dali/public-api/object/property-map.h | 1 + dali/public-api/object/property-value.h | 7 ------- dali/public-api/object/property.h | 5 ----- dali/public-api/object/type-info.h | 6 +++++- dali/public-api/scripting/scripting.cpp | 2 +- 6 files changed, 9 insertions(+), 16 deletions(-) diff --git a/dali/public-api/object/property-map.cpp b/dali/public-api/object/property-map.cpp index 0e11d8a..9780c69 100644 --- a/dali/public-api/object/property-map.cpp +++ b/dali/public-api/object/property-map.cpp @@ -30,7 +30,7 @@ namespace Dali namespace { -typedef std::vector< Property::StringValuePair > Container; +typedef std::vector< StringValuePair > Container; }; // unnamed namespace struct Property::Map::Impl @@ -78,7 +78,7 @@ const std::string& Property::Map::GetKey( unsigned int position ) const return mImpl->mContainer[ position ].first; } -Property::StringValuePair& Property::Map::GetPair( unsigned int position ) const +StringValuePair& Property::Map::GetPair( unsigned int position ) const { DALI_ASSERT_ALWAYS( position < Count() && "position out-of-bounds" ); diff --git a/dali/public-api/object/property-map.h b/dali/public-api/object/property-map.h index 95592f3..5bf3afc 100644 --- a/dali/public-api/object/property-map.h +++ b/dali/public-api/object/property-map.h @@ -28,6 +28,7 @@ namespace Dali { +typedef std::pair StringValuePair; /** * @brief A Map of property values. diff --git a/dali/public-api/object/property-value.h b/dali/public-api/object/property-value.h index ed6b0c5..5edfcea 100644 --- a/dali/public-api/object/property-value.h +++ b/dali/public-api/object/property-value.h @@ -34,13 +34,6 @@ class Matrix3; class Matrix; /** - * @brief Container of Dali::Property::Value. - */ -typedef std::vector PropertyValueContainer; -typedef PropertyValueContainer::iterator PropertyValueIter; ///< Iterator for Dali::PropertyValueContainer -typedef PropertyValueContainer::const_iterator PropertyValueConstIter; ///< Const iterator for Dali::PropertyValueContainer - -/** * @brief A value-type representing a property value. */ class DALI_IMPORT_API Property::Value diff --git a/dali/public-api/object/property.h b/dali/public-api/object/property.h index 4e26e54..0c0b2a3 100644 --- a/dali/public-api/object/property.h +++ b/dali/public-api/object/property.h @@ -52,11 +52,6 @@ struct DALI_IMPORT_API Property class Value; /** - * @brief A pair of property values. - */ - typedef std::pair StringValuePair; - - /** * @brief A Map of property values. */ class Map; diff --git a/dali/public-api/object/type-info.h b/dali/public-api/object/type-info.h index cf46eb3..06bf230 100644 --- a/dali/public-api/object/type-info.h +++ b/dali/public-api/object/type-info.h @@ -33,6 +33,10 @@ namespace Internal DALI_INTERNAL class TypeInfo; }; +typedef std::vector PropertyValueContainer; +typedef PropertyValueContainer::iterator PropertyValueIter; ///< Iterator for Dali::PropertyValueContainer +typedef PropertyValueContainer::const_iterator PropertyValueConstIter; ///< Const iterator for Dali::PropertyValueContainer + /** * @brief TypeInfo class for instantiation of registered types and introspection of * their actions and signals. @@ -44,7 +48,7 @@ class DALI_IMPORT_API TypeInfo : public BaseHandle public: typedef BaseHandle (*CreateFunction)(); ///< Function signature for creating an instance of the associated object type. - typedef bool (*ActionFunction)(BaseObject*, const std::string&, const std::vector&); ///< Function signature for creating scriptable actions + typedef bool (*ActionFunction)(BaseObject*, const std::string&, const PropertyValueContainer&); ///< Function signature for creating scriptable actions /** * @brief Connects a callback function with the object's signals. diff --git a/dali/public-api/scripting/scripting.cpp b/dali/public-api/scripting/scripting.cpp index b9a2a07..7d95b42 100644 --- a/dali/public-api/scripting/scripting.cpp +++ b/dali/public-api/scripting/scripting.cpp @@ -443,7 +443,7 @@ Actor NewActor( const Property::Map& map ) // Now set the properties, or create children for ( unsigned int i = 0, mapCount = map.Count(); i < mapCount; ++i ) { - const Property::StringValuePair& pair( map.GetPair( i ) ); + const StringValuePair& pair( map.GetPair( i ) ); const std::string& key( pair.first ); if ( key == "type" ) { -- 2.7.4