X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fpublic-api%2Fobject%2Fproperty-array.h;h=331d1e934499918f4646ab2a6666e80ec441f46f;hb=4d75040ab200bd306ec5a48f2a617480062eef4c;hp=64fa1574c8a3359fb001b3fa10d99e36c0cf2945;hpb=54dff6a35a504884c076a370b660ed9a0a6c6bdb;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/public-api/object/property-array.h b/dali/public-api/object/property-array.h old mode 100644 new mode 100755 index 64fa157..331d1e9 --- a/dali/public-api/object/property-array.h +++ b/dali/public-api/object/property-array.h @@ -2,7 +2,7 @@ #define __DALI_PROPERTY_ARRAY_H__ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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. @@ -29,14 +29,15 @@ namespace Dali { /** - * @addtogroup dali-core-object + * @addtogroup dali_core_object * @{ */ /** * @brief A Array of property values. + * @SINCE_1_0.0 */ -class DALI_IMPORT_API Property::Array +class DALI_CORE_API Property::Array { public: @@ -44,25 +45,29 @@ public: /** * @brief Default constructor. + * @SINCE_1_0.0 */ Array(); /** * @brief Copy Constructor. * - * @param[in] other The Array to copy from. + * @SINCE_1_0.0 + * @param[in] other The Array to copy from */ Array( const Array& other ); /** * @brief Non-virtual destructor. + * @SINCE_1_0.0 */ ~Array(); /** - * @brief Retrieve the number of elements in the array. + * @brief Retrieves the number of elements in the array. * - * @return The number of elements in the array. + * @SINCE_1_0.0 + * @return The number of elements in the array */ SizeType Size() const { @@ -70,16 +75,18 @@ public: } /** - * @brief Retrieve the number of elements in the array. + * @brief Retrieves the number of elements in the array. * - * @return The number of elements in the array. + * @SINCE_1_0.0 + * @return The number of elements in the array */ SizeType Count() const; /** * @brief Returns whether the array is empty. * - * @return true if empty, false otherwise + * @SINCE_1_0.0 + * @return @c true if empty, @c false otherwise */ bool Empty() const { @@ -88,39 +95,59 @@ public: /** * @brief Clears the array. + * @SINCE_1_0.0 */ void Clear(); /** - * @brief Increase the capcity of the array. + * @brief Increases the capacity of the array. + * @SINCE_1_0.0 + * @param[in] size The size to reserve */ void Reserve( SizeType size ); /** - * @brief Resize to size. + * @brief Resizes to size. + * @SINCE_1_0.0 + * @param[in] size The size to resize */ void Resize( SizeType size ); /** - * @brief Retrieve the capacity of the array. + * @brief Retrieves the capacity of the array. * + * @SINCE_1_0.0 * @return The allocated capacity of the array */ SizeType Capacity(); /** - * @brief Add an element to the array. + * @brief Adds an element to the array. * + * @SINCE_1_0.0 * @param[in] value The value to add to the end of the array */ void PushBack( const Value& value ); /** - * @brief Const access an element. + * @brief Add an element to the array. * - * @param[in] index The element index to access. No bounds checking is performed. + * @SINCE_1_2.11 + * @param[in] value The value to add to the end of the array + * @return A reference to this object + */ + inline Property::Array& Add( const Value& value ) + { + PushBack( value ); + return *this; + } + + /** + * @brief Const access an element. * - * @return The a reference to the element. + * @SINCE_1_0.0 + * @param[in] index The element index to access. No bounds checking is performed + * @return The a reference to the element */ const Value& GetElementAt( SizeType index ) const { @@ -128,11 +155,11 @@ public: } /** - * @brief Access an element. + * @brief Accesses an element. * - * @param[in] index The element index to access. No bounds checking is performed. - * - * @return The a reference to the element. + * @SINCE_1_0.0 + * @param[in] index The element index to access. No bounds checking is performed + * @return The a reference to the element */ Value& GetElementAt( SizeType index ) { @@ -142,9 +169,9 @@ public: /** * @brief Const operator to access an element. * - * @param[in] index The element index to access. No bounds checking is performed. - * - * @return The a reference to the element. + * @SINCE_1_0.0 + * @param[in] index The element index to access. No bounds checking is performed + * @return The a reference to the element * */ const Value& operator[]( SizeType index ) const; @@ -152,28 +179,45 @@ public: /** * @brief Operator to access an element. * - * @param[in] index The element index to access. No bounds checking is performed. - * - * @return The a reference to the element. + * @SINCE_1_0.0 + * @param[in] index The element index to access. No bounds checking is performed + * @return The a reference to the element * */ Value& operator[]( SizeType index ); /** - * @brief Assignment Operator + * @brief Assignment Operator. * - * @param[in] other The array to copy from. + * @SINCE_1_0.0 + * @param[in] other The array to copy from * * @return The copied array. */ Array& operator=( const Array& other ); + /** + * @brief Output to stream. + * @SINCE_1_1.28 + */ + friend DALI_CORE_API std::ostream& operator<<( std::ostream& stream, const Property::Array& array ); + private: struct DALI_INTERNAL Impl; ///< Private data Impl* mImpl; ///< Pointer to private data }; /** + * @brief Converts the values of the property array into a string and append to an output stream. + * + * @SINCE_1_1.28 + * @param[in] stream The output stream operator + * @param[in] array The array to insert + * @return The output stream operator + */ +DALI_CORE_API std::ostream& operator<<( std::ostream& stream, const Property::Array& array ); + +/** * @} */ } // namespace Dali