Update the doxygen comment
[platform/core/uifw/dali-core.git] / dali / public-api / object / property-value.h
old mode 100644 (file)
new mode 100755 (executable)
index 5a4abed..9b0f203
@@ -1,8 +1,8 @@
-#ifndef __DALI_PROPERTY_VALUE_H__
-#define __DALI_PROPERTY_VALUE_H__
+#ifndef DALI_PROPERTY_VALUE_H
+#define DALI_PROPERTY_VALUE_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -20,6 +20,8 @@
 
 // EXTERNAL INCLUDES
 #include <iosfwd>
+#include <utility>
+#include <initializer_list>
 
 // INTERNAL INCLUDES
 #include <dali/public-api/object/property.h>
@@ -39,12 +41,15 @@ struct Vector3;
 struct Vector4;
 class Matrix3;
 class Matrix;
+struct Extents;
+
+typedef std::pair< Property::Key, Property::Value > KeyValuePair;
 
 /**
  * @brief A value-type representing a property value.
  * @SINCE_1_0.0
  */
-class DALI_IMPORT_API Property::Value
+class DALI_CORE_API Property::Value
 {
 public:
 
@@ -70,7 +75,7 @@ public:
    * @SINCE_1_0.0
    * @param[in] integerValue An integer value
    */
-  Value( int integerValue );
+  Value( int32_t integerValue );
 
   /**
    * @brief Creates a float property value.
@@ -126,7 +131,7 @@ public:
    * @SINCE_1_0.0
    * @param[in] vectorValue A vector of 4 integer values
    */
-  Value( const Rect<int>& vectorValue );
+  Value( const Rect<int32_t>& vectorValue );
 
   /**
    * @brief Creates an orientation property value.
@@ -169,14 +174,46 @@ public:
   Value( Property::Array& arrayValue );
 
   /**
+   * @brief Creates an array property value.
+   *
+   * @SINCE_1_4.16
+   * @param[in] arrayValue An r-value array
+   */
+  Value( Property::Array&& arrayValue );
+
+  /**
    * @brief Creates a map property value.
    *
    * @SINCE_1_0.0
-   * @param[in] mapValue An array
+   * @param[in] mapValue A map
    */
   Value( Property::Map& mapValue );
 
   /**
+   * @brief Creates a map property value.
+   *
+   * @SINCE_1_4.16
+   * @param[in] mapValue An r-value map
+   */
+  Value( Property::Map&& mapValue );
+
+  /**
+   * @brief Create a map property value from an initializer_list.
+   *
+   * @SINCE_1_4.16
+   * @param [in] values An initializer_list of pairs of index and value.
+   */
+  Value( const std::initializer_list< KeyValuePair >& values );
+
+  /**
+   * @brief Creates an extents property value.
+   *
+   * @SINCE_1_2.62
+   * @param[in] extentsValue A collection of 4 uint16_t values
+   */
+  Value( const Extents& extentsValue );
+
+  /**
    * @brief Explicitly sets a type and initialize it.
    *
    * @SINCE_1_0.0
@@ -193,6 +230,15 @@ public:
   Value( const Value& value );
 
   /**
+   * @brief Move constructor.
+   *
+   * A move constructor enables the resources owned by an rvalue object to be moved into an lvalue without copying.
+   * @SINCE_1_4.16
+   * @param[in] value The property value to move from
+   */
+  Value( Value&& value );
+
+  /**
    * @brief Assigns a property value.
    *
    * @SINCE_1_0.0
@@ -202,6 +248,15 @@ public:
   Value& operator=( const Value& value );
 
   /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_4.16
+   * @param[in] value The property value to move from
+   * @return a reference to this
+   */
+  Value& operator=( Value&& value );
+
+  /**
    * @brief Non-virtual destructor.
    *
    * This class is not a base class.
@@ -261,7 +316,7 @@ public:
    * @return @c true if the value is successfully retrieved, @c false if the type is not convertible
    * @pre GetType() is a type convertible to int.
    */
-  bool Get( int& integerValue ) const;
+  bool Get( int32_t& integerValue ) const;
 
   /**
    * @brief Retrieves an integer rectangle.
@@ -271,7 +326,7 @@ public:
    * @return @c true if the value is successfully retrieved, @c false if the type is not convertible
    * @pre GetType() is a type convertible to Rect<int>.
    */
-  bool Get( Rect<int>& rect ) const;
+  bool Get( Rect<int32_t>& rect ) const;
 
   /**
    * @brief Retrieves a vector value.
@@ -390,10 +445,20 @@ public:
   Property::Map* GetMap() const;
 
   /**
+   * @brief Retrieves an extents.
+   *
+   * @SINCE_1_2.62
+   * @param[out] extentsValue Extents, a collection of 4 uint16_t
+   * @return @c true if the value is successfully retrieved, @c false if the type is not convertible
+   * @pre GetType() is a type convertible to Extents.
+   */
+  bool Get( Extents& extentsValue ) const;
+
+  /**
    * @brief Output to stream.
    * @SINCE_1_0.0
    */
-  friend std::ostream& operator<<( std::ostream& ouputStream, const Property::Value& value );
+  friend DALI_CORE_API std::ostream& operator<<( std::ostream& ouputStream, const Property::Value& value );
 
 private:
 
@@ -410,11 +475,11 @@ private:
  * @param[in] value The value to insert
  * @return The output stream operator
  */
-DALI_IMPORT_API std::ostream& operator<<( std::ostream& ouputStream, const Property::Value& value );
+DALI_CORE_API std::ostream& operator<<( std::ostream& ouputStream, const Property::Value& value );
 
 /**
  * @}
  */
 } // namespace Dali
 
-#endif // __DALI_PROPERTY_VALUE_H__
+#endif // DALI_PROPERTY_VALUE_H