Remove UNSIGNED_INTEGER property type as it does not fully work and causes headache
[platform/core/uifw/dali-core.git] / dali / public-api / object / property-input.h
1 #ifndef __DALI_PROPERTY_INPUT_H__
2 #define __DALI_PROPERTY_INPUT_H__
3
4 /*
5  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // INTERNAL INCLUDES
22 #include <dali/public-api/object/property.h>
23
24 namespace Dali
25 {
26
27 struct Vector2;
28 struct Vector3;
29 struct Vector4;
30 class Matrix3;
31 class Matrix;
32 class Quaternion;
33
34 /**
35  * @brief An abstract interface for receiving property values.
36  */
37 class DALI_IMPORT_API PropertyInput
38 {
39 public:
40
41   class Extension; ///< Forward declare future extension interface
42
43   /**
44    * @brief Virtual destructor.
45    */
46   virtual ~PropertyInput() = 0;
47
48   /**
49    * @brief Query the type of property input.
50    *
51    * @return The property type.
52    */
53   virtual Property::Type GetType() const = 0;
54
55   /**
56    * @brief Retrieve a boolean value.
57    *
58    * @pre GetType() returns Property::BOOLEAN.
59    * @return The boolean value.
60    */
61   virtual const bool& GetBoolean() const = 0;
62
63   /**
64    * @brief Retrieve a float value.
65    *
66    * @pre GetType() returns Property::FLOAT.
67    * @return The float value.
68    */
69   virtual const float& GetFloat() const = 0;
70
71   /**
72    * @brief Retrieve an integer value.
73    *
74    * @pre GetType() returns Property::INTEGER.
75    * @return The integer value.
76    */
77   virtual const int& GetInteger() const = 0;
78
79   /**
80    * @brief Retrieve a Vector2 value.
81    *
82    * @pre GetType() returns Property::VECTOR2.
83    * @return The Vector2 value.
84    */
85   virtual const Vector2& GetVector2() const = 0;
86
87   /**
88    * @brief Retrieve a Vector3 value.
89    *
90    * @pre GetType() returns Property::VECTOR3.
91    * @return The Vector3 value.
92    */
93   virtual const Vector3& GetVector3() const = 0;
94
95   /**
96    * @brief Retrieve a Vector4 value.
97    *
98    * @pre GetType() returns Property::VECTOR4.
99    * @return The Vector4 value.
100    */
101   virtual const Vector4& GetVector4() const = 0;
102
103   /**
104    * @brief Retrieve a Matrix (3x3) value.
105    *
106    * @pre GetType() returns Property::Matrix3.
107    * @return The Matrix value.
108    */
109   virtual const Matrix3& GetMatrix3() const = 0;
110
111   /**
112    * @brief Retrieve a Matrix (4x4) value.
113    *
114    * @pre GetType() returns Property::Matrix4.
115    * @return The Matrix value.
116    */
117   virtual const Matrix& GetMatrix() const = 0;
118
119   /**
120    * @brief Retrieve a Quaternion value.
121    *
122    * @pre GetType() returns Property::Quaternion.
123    * @return The Quaternion value.
124    */
125   virtual const Quaternion& GetQuaternion() const = 0;
126
127   /**
128    * Retrieve the extension for the PropertyInput
129    *
130    * @return The extension if available, NULL otherwise
131    */
132   virtual Extension* GetExtension()
133   {
134     return NULL;
135   }
136 };
137
138 } // namespace Dali
139
140 #endif // __DALI_PROPERTY_INPUT_H__