From: Kimmo Hoikka Date: Wed, 12 Nov 2014 13:30:24 +0000 (+0000) Subject: Cleaning up property public API X-Git-Tag: dali_1.0.17~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F89%2F30189%2F2;p=platform%2Fcore%2Fuifw%2Fdali-core.git Cleaning up property public API [Problem] [Cause] [Solution] Change-Id: Ia2748d13d3bba9f3a132e4e8bec57eb3707c92a7 --- 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" ) {