Making DALi public API typesafe using guaranteed types; uint8_t, uint32_t
[platform/core/uifw/dali-core.git] / dali / public-api / object / property-value.h
old mode 100644 (file)
new mode 100755 (executable)
index 5f2fa8e..b054810
@@ -2,7 +2,7 @@
 #define __DALI_PROPERTY_VALUE_H__
 
 /*
- * Copyright (c) 2016 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.
@@ -45,7 +45,7 @@ struct Extents;
  * @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:
 
@@ -71,7 +71,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.
@@ -127,7 +127,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.
@@ -270,7 +270,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.
@@ -280,7 +280,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.
@@ -412,7 +412,7 @@ public:
    * @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:
 
@@ -429,7 +429,7 @@ 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 );
 
 /**
  * @}